Version 2.7.0
com.wiredtiger.db.PackFormatInputStream Class Reference

Public Member Functions

String toString ()
 
int available ()
 
void reset ()
 

Protected Member Functions

 PackFormatInputStream (String format)
 
char getType () throws WiredTigerPackingException
 
void checkType (char asking, boolean consume) throws WiredTigerPackingException
 
void consume ()
 
int getLengthFromFormat (boolean advance)
 
boolean hasLength ()
 

Protected Attributes

String format
 
int formatOff
 
int formatRepeatCount
 

Detailed Description

An internal helper class for consuming pack format strings.

Applications should not need to use this class.

Constructor & Destructor Documentation

com.wiredtiger.db.PackFormatInputStream.PackFormatInputStream ( String  format)
protected

Constructor for a format stream.

Parameters
formatthe encoded format backing string.

Member Function Documentation

int com.wiredtiger.db.PackFormatInputStream.available ( )

Returns the approximate count of elements left in the format. This method does not account for repeat counts or string length encodings - so should be used as a guide only.

void com.wiredtiger.db.PackFormatInputStream.checkType ( char  asking,
boolean  consume 
) throws WiredTigerPackingException
protected

Check to see if the next entry is compatible with the requested type.

Parameters
askingthe format type to match.
consumeindicates whether to update the stream position.
void com.wiredtiger.db.PackFormatInputStream.consume ( )
protected

Move the format stream position ahead one position.

int com.wiredtiger.db.PackFormatInputStream.getLengthFromFormat ( boolean  advance)
protected

Retrieve a length from the format string. Either for a repeat count or a string length. Return one if no explicit repeat count.

Parameters
advancewhether to move the stream position.
char com.wiredtiger.db.PackFormatInputStream.getType ( ) throws WiredTigerPackingException
protected

Return the decoded type for the next entry in the format stream. Does not adjust the position of the stream.

boolean com.wiredtiger.db.PackFormatInputStream.hasLength ( )
protected

Return whether there is an explicit length indicated in the format string.

void com.wiredtiger.db.PackFormatInputStream.reset ( )

Reset the current stream position.

String com.wiredtiger.db.PackFormatInputStream.toString ( )

Standard toString - returns the string used during construction.