|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pfsw.tools.beluga.ldap.protocol.ber.ProtocolDecoder
public class ProtocolDecoder
A protocol decoder that helps to get the data from a BER encoded stream to useful objects.
Constructor Summary | |
---|---|
ProtocolDecoder(byte[] data)
Initialize the new instance with default values. |
Method Summary | |
---|---|
int |
bytesLeft()
Returns the number of bytes left in the decoder to parse |
SequenceInfo |
getPutBackSequence()
|
boolean |
hasMoreData()
Returns true if ther is more data available in the decoder |
boolean |
hasPutBackSequence()
Returns true if the decoder has a sequence that was put back for further parsing. |
boolean |
isEndOfSequence(SequenceInfo seqInfo)
Returns true if this decoder has reached the parse position which is the end of the given sequence info. |
boolean |
notDoneForSequence(SequenceInfo seqInfo)
Returns true if this decoder has NOT yet reached the parse position which is the end of the given sequence info and if it still has data. |
boolean |
parseBoolean()
Returns next data from the stream as boolean |
int |
parseByte()
Returns the next byte ; |
int |
parseEnumeration()
Returns the next data as enumeration tag |
int |
parseInteger()
Returns the next integer from the underlying data |
byte[] |
parsePassword()
Returns the password as byte array from the next data in the stream |
SequenceInfo |
parseSequence()
Returns the next bytes as SEQUENCE information |
int |
parseSequenceTag()
Returns only the next byte as SEQUENCE tag |
String |
parseString()
Returns the next string from the underlying data |
String |
parseString(int length)
Returns the next length bytes as string from the underlying data |
SubstringFilter |
parseSubstringFilter()
|
void |
setPutBackSequence(SequenceInfo newValue)
|
boolean |
useUTF8()
|
void |
useUTF8(boolean newValue)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProtocolDecoder(byte[] data)
Method Detail |
---|
public boolean useUTF8()
public void useUTF8(boolean newValue)
public SequenceInfo getPutBackSequence()
public void setPutBackSequence(SequenceInfo newValue)
public SequenceInfo parseSequence() throws Exception
Exception
public int parseSequenceTag() throws Exception
Exception
public int parseInteger() throws Exception
Exception
public String parseString() throws Exception
Exception
public String parseString(int length) throws Exception
Exception
public byte[] parsePassword() throws Exception
Exception
public int parseEnumeration() throws Exception
Exception
public boolean parseBoolean() throws Exception
Exception
public int parseByte() throws Exception
Exception
public SubstringFilter parseSubstringFilter() throws Exception
Exception
public int bytesLeft()
public boolean hasMoreData()
public boolean hasPutBackSequence()
public boolean isEndOfSequence(SequenceInfo seqInfo)
public boolean notDoneForSequence(SequenceInfo seqInfo)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |