Version 3.2.1
com.wiredtiger.db.PackFormatInputStream Class Reference

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

String format
 
boolean isRaw
 
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

◆ PackFormatInputStream()

com.wiredtiger.db.PackFormatInputStream.PackFormatInputStream ( String  format,
boolean  isRaw 
)
protected

Constructor for a format stream.

Parameters
formatthe encoded format backing string.

Member Function Documentation

◆ available()

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.

◆ checkType()

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.

◆ consume()

void com.wiredtiger.db.PackFormatInputStream.consume ( )
protected

Move the format stream position ahead one position.

◆ getLengthFromFormat()

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.

◆ getType()

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.

◆ hasLength()

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

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

◆ reset()

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

Reset the current stream position.

◆ toString()

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

Standard toString - returns the string used during construction.