Version 2.3.1
com.wiredtiger.db.PackInputStream Class Reference

An internal helper class for decoding WiredTiger packed values. More...

Public Member Functions

 PackInputStream (String format, byte[] value)
 Constructor. More...
 
 PackInputStream (String format, byte[] value, int off, int len)
 Constructor. More...
 
String getFormat ()
 Returns the raw packing format string.
 
byte[] getValue ()
 Returns the raw value byte array.
 
byte getByte () throws WiredTigerPackingException
 Retrieves a byte field from the stream.
 
void getByteArray (byte[] dest) throws WiredTigerPackingException
 Retrieves a byte array field from the stream. More...
 
void getByteArray (byte[] dest, int off, int len) throws WiredTigerPackingException
 Retrieves a byte array field from the stream. More...
 
byte[] getByteArray () throws WiredTigerPackingException
 Retrieves a byte array field from the stream. More...
 
int getInt () throws WiredTigerPackingException
 Retrieves an integer field from the stream.
 
long getLong () throws WiredTigerPackingException
 Retrieves a long field from the stream.
 
long getRecord () throws WiredTigerPackingException
 Retrieves a record field from the stream.
 
short getShort () throws WiredTigerPackingException
 Retrieves a short field from the stream.
 
String getString () throws WiredTigerPackingException
 Retrieves a string field from the stream.
 

Protected Attributes

PackFormatInputStream format
 
byte[] value
 
int valueOff
 
int valueLen
 

Detailed Description

An internal helper class for decoding WiredTiger packed values.

Applications should not need to use this class.

Constructor & Destructor Documentation

com.wiredtiger.db.PackInputStream.PackInputStream ( String  format,
byte[]  value 
)

Constructor.

Parameters
formatA String that contains the WiredTiger format that defines the layout of this packed value.
valueThe raw bytes that back the stream.
com.wiredtiger.db.PackInputStream.PackInputStream ( String  format,
byte[]  value,
int  off,
int  len 
)

Constructor.

Parameters
formatA String that contains the WiredTiger format that defines the layout of this packed value.
valueThe raw bytes that back the stream.
offOffset into the value array at which the stream begins.
lenLength of the value array that forms the stream.

Member Function Documentation

void com.wiredtiger.db.PackInputStream.getByteArray ( byte[]  dest) throws WiredTigerPackingException

Retrieves a byte array field from the stream.

Parameters
destThe byte array where the returned value will be stored. The array should be large enough to store the entire data item, if it is not, a truncated value will be returned.
void com.wiredtiger.db.PackInputStream.getByteArray ( byte[]  dest,
int  off,
int  len 
) throws WiredTigerPackingException

Retrieves a byte array field from the stream.

Parameters
destThe byte array where the returned value will be stored.
offOffset into the destination buffer to start copying into.
lenThe length should be large enough to store the entire data item, if it is not, a truncated value will be returned.
byte [] com.wiredtiger.db.PackInputStream.getByteArray ( ) throws WiredTigerPackingException

Retrieves a byte array field from the stream.

Creates a new byte array that is the size of the object being retrieved.