Package com.jsoniter.output
Class JsonStream
java.lang.Object
java.io.OutputStream
com.jsoniter.output.JsonStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) byte[]
(package private) int
(package private) int
private OutputStream
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuffer()
void
close()
(package private) final void
ensure
(int minimal) void
flush()
(package private) final void
private final void
growAtLeast
(int minimal) static void
registerNativeEncoder
(Class clazz, Encoder.ReflectionEncoder encoder) void
reset
(OutputStream out) static String
static String
serialize
(Config config, TypeLiteral typeLiteral, Object obj) static void
serialize
(Config config, TypeLiteral typeLiteral, Object obj, OutputStream out) static String
static void
serialize
(Config config, Object obj, OutputStream out) static String
serialize
(TypeLiteral typeLiteral, Object obj) static void
serialize
(TypeLiteral typeLiteral, Object obj, OutputStream out) static String
static void
serialize
(Object obj, OutputStream out) static void
serialize
(Type type, Object obj, OutputStream out) static void
setIndentionStep
(int indentionStep) static void
setMode
(EncodingMode mode) final void
write
(byte[] b, int off, int len) final void
write
(byte b1, byte b2) final void
write
(byte b1, byte b2, byte b3) final void
write
(byte b1, byte b2, byte b3, byte b4) final void
write
(byte b1, byte b2, byte b3, byte b4, byte b5) final void
write
(byte b1, byte b2, byte b3, byte b4, byte b5, byte b6) final void
write
(int b) final void
final void
final void
final void
final void
void
private void
writeIndention
(int delta) final void
final void
final void
final void
writeObjectField
(Object key) final void
writeObjectField
(Object key, Encoder keyEncoder) final void
writeObjectField
(String field) final void
final void
final void
final void
final void
writeVal
(boolean val) final void
writeVal
(double val) final void
writeVal
(float val) final void
writeVal
(int val) final void
writeVal
(long val) final void
writeVal
(short val) final void
final <T> void
writeVal
(TypeLiteral<T> typeLiteral, T obj) final void
final void
final void
final void
final void
final void
final <T> void
final void
final void
Methods inherited from class java.io.OutputStream
write
-
Field Details
-
configCache
-
indention
int indention -
out
-
buf
byte[] buf -
count
int count
-
-
Constructor Details
-
JsonStream
-
-
Method Details
-
reset
-
ensure
- Throws:
IOException
-
growAtLeast
private final void growAtLeast(int minimal) -
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
flushBuffer
- Throws:
IOException
-
writeVal
- Throws:
IOException
-
writeRaw
- Throws:
IOException
-
writeRaw
- Throws:
IOException
-
writeVal
- Throws:
IOException
-
writeVal
- Throws:
IOException
-
writeTrue
- Throws:
IOException
-
writeFalse
- Throws:
IOException
-
writeVal
- Throws:
IOException
-
writeVal
- Throws:
IOException
-
writeVal
- Throws:
IOException
-
writeVal
- Throws:
IOException
-
writeVal
- Throws:
IOException
-
writeVal
- Throws:
IOException
-
writeVal
- Throws:
IOException
-
writeVal
- Throws:
IOException
-
writeVal
- Throws:
IOException
-
writeVal
- Throws:
IOException
-
writeVal
- Throws:
IOException
-
writeNull
- Throws:
IOException
-
writeEmptyObject
- Throws:
IOException
-
writeEmptyArray
- Throws:
IOException
-
writeArrayStart
- Throws:
IOException
-
writeMore
- Throws:
IOException
-
writeIndention
- Throws:
IOException
-
writeIndention
- Throws:
IOException
-
writeArrayEnd
- Throws:
IOException
-
writeObjectStart
- Throws:
IOException
-
writeObjectField
- Throws:
IOException
-
writeObjectField
- Throws:
IOException
-
writeObjectField
- Throws:
IOException
-
writeObjectEnd
- Throws:
IOException
-
writeVal
- Throws:
IOException
-
writeVal
- Throws:
IOException
-
writeVal
- Throws:
IOException
-
currentConfig
-
serialize
-
serialize
-
serialize
-
serialize
-
serialize
-
serialize
-
serialize
-
serialize
-
serialize
-
serialize
-
setMode
-
setIndentionStep
public static void setIndentionStep(int indentionStep) -
registerNativeEncoder
-
buffer
-