Version 2.7.0
com.wiredtiger.db.PackInputStream Class Reference

Public Member Functions

 PackInputStream (String format, byte[] value)
 
 PackInputStream (String format, byte[] value, int off, int len)
 
String getFormat ()
 
byte[] getValue ()
 
byte getByte () throws WiredTigerPackingException
 
void getByteArray (byte[] dest) throws WiredTigerPackingException
 
void getByteArray (byte[] dest, int off, int len) throws WiredTigerPackingException
 
byte[] getByteArray () throws WiredTigerPackingException
 
int getInt () throws WiredTigerPackingException
 
long getLong () throws WiredTigerPackingException
 
long getRecord () throws WiredTigerPackingException
 
short getShort () throws WiredTigerPackingException
 
String getString () throws WiredTigerPackingException
 

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

byte com.wiredtiger.db.PackInputStream.getByte ( ) throws WiredTigerPackingException

Retrieves a byte field from the stream.

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.

String com.wiredtiger.db.PackInputStream.getFormat ( )

Returns the raw packing format string.

int com.wiredtiger.db.PackInputStream.getInt ( ) throws WiredTigerPackingException

Retrieves an integer field from the stream.

long com.wiredtiger.db.PackInputStream.getLong ( ) throws WiredTigerPackingException

Retrieves a long field from the stream.

long com.wiredtiger.db.PackInputStream.getRecord ( ) throws WiredTigerPackingException

Retrieves a record field from the stream.

short com.wiredtiger.db.PackInputStream.getShort ( ) throws WiredTigerPackingException

Retrieves a short field from the stream.

String com.wiredtiger.db.PackInputStream.getString ( ) throws WiredTigerPackingException

Retrieves a string field from the stream.

byte [] com.wiredtiger.db.PackInputStream.getValue ( )

Returns the raw value byte array.