org.msgpack.util.json
Class JSONPacker

java.lang.Object
  extended by org.msgpack.packer.AbstractPacker
      extended by org.msgpack.util.json.JSONPacker
All Implemented Interfaces:
Closeable, Flushable, Packer
Direct Known Subclasses:
JSONBufferPacker

public class JSONPacker
extends AbstractPacker


Field Summary
protected  Output out
           
 
Fields inherited from class org.msgpack.packer.AbstractPacker
msgpack
 
Constructor Summary
protected JSONPacker(MessagePack msgpack, Output out)
           
  JSONPacker(MessagePack msgpack, OutputStream stream)
           
  JSONPacker(OutputStream stream)
           
 
Method Summary
 void close()
           
 void flush()
           
 void reset()
           
 Packer writeArrayBegin(int size)
           
 Packer writeArrayEnd(boolean check)
           
protected  void writeBigInteger(BigInteger v)
           
protected  void writeBoolean(boolean v)
           
protected  void writeByte(byte v)
           
protected  void writeByteArray(byte[] b, int off, int len)
           
protected  void writeByteBuffer(ByteBuffer bb)
           
protected  void writeDouble(double v)
           
protected  void writeFloat(float v)
           
protected  void writeInt(int v)
           
protected  void writeLong(long v)
           
 Packer writeMapBegin(int size)
           
 Packer writeMapEnd(boolean check)
           
 Packer writeNil()
           
protected  void writeShort(short v)
           
protected  void writeString(String s)
           
 
Methods inherited from class org.msgpack.packer.AbstractPacker
write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, writeArrayEnd, writeByteArray, writeMapEnd
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

protected final Output out
Constructor Detail

JSONPacker

public JSONPacker(OutputStream stream)

JSONPacker

public JSONPacker(MessagePack msgpack,
                  OutputStream stream)

JSONPacker

protected JSONPacker(MessagePack msgpack,
                     Output out)
Method Detail

writeBoolean

protected void writeBoolean(boolean v)
                     throws IOException
Specified by:
writeBoolean in class AbstractPacker
Throws:
IOException

writeByte

protected void writeByte(byte v)
                  throws IOException
Specified by:
writeByte in class AbstractPacker
Throws:
IOException

writeShort

protected void writeShort(short v)
                   throws IOException
Specified by:
writeShort in class AbstractPacker
Throws:
IOException

writeInt

protected void writeInt(int v)
                 throws IOException
Specified by:
writeInt in class AbstractPacker
Throws:
IOException

writeLong

protected void writeLong(long v)
                  throws IOException
Specified by:
writeLong in class AbstractPacker
Throws:
IOException

writeBigInteger

protected void writeBigInteger(BigInteger v)
                        throws IOException
Specified by:
writeBigInteger in class AbstractPacker
Throws:
IOException

writeFloat

protected void writeFloat(float v)
                   throws IOException
Specified by:
writeFloat in class AbstractPacker
Throws:
IOException

writeDouble

protected void writeDouble(double v)
                    throws IOException
Specified by:
writeDouble in class AbstractPacker
Throws:
IOException

writeByteArray

protected void writeByteArray(byte[] b,
                              int off,
                              int len)
                       throws IOException
Specified by:
writeByteArray in class AbstractPacker
Throws:
IOException

writeByteBuffer

protected void writeByteBuffer(ByteBuffer bb)
                        throws IOException
Specified by:
writeByteBuffer in class AbstractPacker
Throws:
IOException

writeString

protected void writeString(String s)
                    throws IOException
Specified by:
writeString in class AbstractPacker
Throws:
IOException

writeNil

public Packer writeNil()
                throws IOException
Throws:
IOException

writeArrayBegin

public Packer writeArrayBegin(int size)
                       throws IOException
Throws:
IOException

writeArrayEnd

public Packer writeArrayEnd(boolean check)
                     throws IOException
Throws:
IOException

writeMapBegin

public Packer writeMapBegin(int size)
                     throws IOException
Throws:
IOException

writeMapEnd

public Packer writeMapEnd(boolean check)
                   throws IOException
Throws:
IOException

flush

public void flush()
           throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class AbstractPacker
Throws:
IOException

reset

public void reset()


Copyright © 2011. All Rights Reserved.