co.cask.tigon.io
Class BinaryDecoder

java.lang.Object
  extended by co.cask.tigon.io.BinaryDecoder
All Implemented Interfaces:
Decoder

public final class BinaryDecoder
extends Object
implements Decoder

An Decoder for binary-format data.


Constructor Summary
BinaryDecoder(InputStream input)
           
 
Method Summary
 boolean readBool()
           
 ByteBuffer readBytes()
           
 double readDouble()
           
 float readFloat()
           
 int readInt()
           
 long readLong()
           
 Object readNull()
          Returns a null value.
 String readString()
           
 void skipBytes()
          Skips a byte array.
 void skipDouble()
          Skips a double.
 void skipFloat()
          Skips a float.
 void skipString()
          Skips the a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryDecoder

public BinaryDecoder(InputStream input)
Method Detail

readNull

public Object readNull()
                throws IOException
Description copied from interface: Decoder
Returns a null value.

Specified by:
readNull in interface Decoder
Returns:
Always returns null
Throws:
IOException

readBool

public boolean readBool()
                 throws IOException
Specified by:
readBool in interface Decoder
Throws:
IOException

readInt

public int readInt()
            throws IOException
Specified by:
readInt in interface Decoder
Throws:
IOException

readLong

public long readLong()
              throws IOException
Specified by:
readLong in interface Decoder
Throws:
IOException

readFloat

public float readFloat()
                throws IOException
Specified by:
readFloat in interface Decoder
Throws:
IOException

readDouble

public double readDouble()
                  throws IOException
Specified by:
readDouble in interface Decoder
Throws:
IOException

readString

public String readString()
                  throws IOException
Specified by:
readString in interface Decoder
Throws:
IOException

readBytes

public ByteBuffer readBytes()
                     throws IOException
Specified by:
readBytes in interface Decoder
Throws:
IOException

skipFloat

public void skipFloat()
               throws IOException
Description copied from interface: Decoder
Skips a float.

Specified by:
skipFloat in interface Decoder
Throws:
IOException

skipDouble

public void skipDouble()
                throws IOException
Description copied from interface: Decoder
Skips a double.

Specified by:
skipDouble in interface Decoder
Throws:
IOException

skipString

public void skipString()
                throws IOException
Description copied from interface: Decoder
Skips the a string.

Specified by:
skipString in interface Decoder
Throws:
IOException

skipBytes

public void skipBytes()
               throws IOException
Description copied from interface: Decoder
Skips a byte array.

Specified by:
skipBytes in interface Decoder
Throws:
IOException


Copyright © 2014 Cask Data, Inc. Licensed under the Apache License, Version 2.0.