org.apache.jackrabbit.mk.json
Class JsopStream

java.lang.Object
  extended by org.apache.jackrabbit.mk.json.JsopStream
All Implemented Interfaces:
JsopReader, JsopWriter

public class JsopStream
extends Object
implements JsopReader, JsopWriter

A fast Jsop writer / reader.


Constructor Summary
JsopStream()
           
 
Method Summary
 JsopStream append(JsopWriter w)
           
 JsopStream array()
           
 JsopStream encodedValue(String raw)
           
 JsopStream endArray()
           
 JsopStream endObject()
           
 String getToken()
           
 int getTokenType()
           
 JsopStream key(String key)
           
 boolean matches(int type)
           
 JsopStream newline()
           
 JsopStream object()
           
 int read()
           
 String read(int type)
           
 String readRawValue()
           
 String readString()
           
 void resetReader()
           
 void resetWriter()
           
 void setLineLength(int i)
           
 JsopStream tag(char tag)
           
 String toString()
           
 JsopStream value(boolean b)
           
 JsopStream value(long x)
           
 JsopStream value(String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JsopStream

public JsopStream()
Method Detail

append

public JsopStream append(JsopWriter w)
Specified by:
append in interface JsopWriter

tag

public JsopStream tag(char tag)
Specified by:
tag in interface JsopWriter

array

public JsopStream array()
Specified by:
array in interface JsopWriter

encodedValue

public JsopStream encodedValue(String raw)
Specified by:
encodedValue in interface JsopWriter

endArray

public JsopStream endArray()
Specified by:
endArray in interface JsopWriter

endObject

public JsopStream endObject()
Specified by:
endObject in interface JsopWriter

key

public JsopStream key(String key)
Specified by:
key in interface JsopWriter

newline

public JsopStream newline()
Specified by:
newline in interface JsopWriter

object

public JsopStream object()
Specified by:
object in interface JsopWriter

value

public JsopStream value(String value)
Specified by:
value in interface JsopWriter

value

public JsopStream value(long x)
Specified by:
value in interface JsopWriter

value

public JsopStream value(boolean b)
Specified by:
value in interface JsopWriter

resetReader

public void resetReader()
Specified by:
resetReader in interface JsopReader

resetWriter

public void resetWriter()
Specified by:
resetWriter in interface JsopWriter

setLineLength

public void setLineLength(int i)
Specified by:
setLineLength in interface JsopWriter

getToken

public String getToken()
Specified by:
getToken in interface JsopReader

getTokenType

public int getTokenType()
Specified by:
getTokenType in interface JsopReader

matches

public boolean matches(int type)
Specified by:
matches in interface JsopReader

read

public String read(int type)
Specified by:
read in interface JsopReader

read

public int read()
Specified by:
read in interface JsopReader

readRawValue

public String readRawValue()
Specified by:
readRawValue in interface JsopReader

readString

public String readString()
Specified by:
readString in interface JsopReader

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.