org.joda.beans.ser.bin
Class MsgPackInput

java.lang.Object
  extended by org.joda.beans.ser.bin.MsgPack
      extended by org.joda.beans.ser.bin.MsgPackInput
Direct Known Subclasses:
MsgPackVisualizer

public abstract class MsgPackInput
extends MsgPack

Receives and processes MsgPack data.


Constructor Summary
MsgPackInput(byte[] bytes)
          Creates an instance.
MsgPackInput(DataInputStream stream)
          Creates an instance.
MsgPackInput(InputStream stream)
          Creates an instance.
 
Method Summary
protected  void handleArrayHeader(int size)
           
protected  void handleBinary(byte[] bytes)
           
protected  void handleBoolean(boolean bool)
           
protected  void handleDouble(double value)
           
protected  void handleExtension(int type, byte[] bytes)
           
protected  void handleFloat(float value)
           
protected  void handleInt(int value)
           
protected  void handleMapHeader(int size)
           
protected  void handleNil()
           
protected  void handleObjectStart()
           
protected  void handleSignedLong(long value)
           
protected  void handleString(String str)
           
protected  void handleUnknown(byte b)
           
protected  void handleUnsignedLong(long value)
           
protected  void readAll()
          Reads all the data in the stream, closing the stream.
protected  void readArrayItem()
           
protected  void readMapKey()
           
protected  void readMapValue()
           
protected  void readObject(int unsigned)
           
static void skipObject(DataInputStream input)
          Skips over the next object in an input stream.
 
Methods inherited from class org.joda.beans.ser.bin.MsgPack
isArray, isIntegral, isMap, isString, toHex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MsgPackInput

public MsgPackInput(byte[] bytes)
Creates an instance.

Parameters:
bytes - the bytes to read, not null

MsgPackInput

public MsgPackInput(InputStream stream)
Creates an instance.

Parameters:
stream - the stream to read from, not null

MsgPackInput

public MsgPackInput(DataInputStream stream)
Creates an instance.

Parameters:
stream - the stream to read from, not null
Method Detail

readAll

protected void readAll()
Reads all the data in the stream, closing the stream.


readObject

protected void readObject(int unsigned)
                   throws IOException
Throws:
IOException

readArrayItem

protected void readArrayItem()
                      throws IOException
Throws:
IOException

readMapKey

protected void readMapKey()
                   throws IOException
Throws:
IOException

readMapValue

protected void readMapValue()
                     throws IOException
Throws:
IOException

handleObjectStart

protected void handleObjectStart()

handleBoolean

protected void handleBoolean(boolean bool)

handleNil

protected void handleNil()

handleInt

protected void handleInt(int value)

handleUnsignedLong

protected void handleUnsignedLong(long value)

handleSignedLong

protected void handleSignedLong(long value)

handleFloat

protected void handleFloat(float value)

handleDouble

protected void handleDouble(double value)

handleUnknown

protected void handleUnknown(byte b)

handleString

protected void handleString(String str)

handleArrayHeader

protected void handleArrayHeader(int size)

handleMapHeader

protected void handleMapHeader(int size)

handleBinary

protected void handleBinary(byte[] bytes)
                     throws IOException
Throws:
IOException

handleExtension

protected void handleExtension(int type,
                               byte[] bytes)
                        throws IOException
Throws:
IOException

skipObject

public static void skipObject(DataInputStream input)
                       throws IOException
Skips over the next object in an input stream.

Parameters:
input - the input stream, not null
Throws:
IOException - if an error occurs


Copyright © 2007–2014 Joda.org. All rights reserved.