Package net.i2p.router.transport.udp
Class UDPPacketReader.DataReader
java.lang.Object
net.i2p.router.transport.udp.UDPPacketReader.Reader
net.i2p.router.transport.udp.UDPPacketReader.DataReader
- Enclosing class:
UDPPacketReader
parse out the data message
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
long
readACK
(int index) boolean
int
boolean
boolean
readECN()
boolean
int
void
readMessageFragment
(int fragmentNum, byte[] target, int targetOffset) int
readMessageFragmentNum
(int fragmentNum) int
readMessageFragmentSize
(int fragmentNum) long
readMessageId
(int fragmentNum) boolean
readMessageIsLast
(int fragmentNum) boolean
boolean
void
toRawString
(StringBuilder buf) toString()
Methods inherited from class net.i2p.router.transport.udp.UDPPacketReader.Reader
readExtendedOptions
-
Constructor Details
-
DataReader
public DataReader()
-
-
Method Details
-
getPacketSize
public int getPacketSize()- Returns:
- the data size, NOT including IP header, UDP header, IV, or MAC
-
readACKsIncluded
public boolean readACKsIncluded() -
readACKBitfieldsIncluded
public boolean readACKBitfieldsIncluded() -
readECN
public boolean readECN() -
readWantPreviousACKs
public boolean readWantPreviousACKs() -
readReplyRequested
public boolean readReplyRequested() -
readExtendedDataIncluded
public boolean readExtendedDataIncluded() -
readACKCount
public int readACKCount() -
readACK
public long readACK(int index) -
readACKBitfields
- Throws:
DataFormatException
-
readFragmentCount
- Throws:
DataFormatException
-
readMessageId
- Throws:
DataFormatException
-
readMessageFragmentNum
- Throws:
DataFormatException
-
readMessageIsLast
- Throws:
DataFormatException
-
readMessageFragmentSize
- Throws:
DataFormatException
-
readMessageFragment
public void readMessageFragment(int fragmentNum, byte[] target, int targetOffset) throws DataFormatException - Throws:
DataFormatException
-
toString
-
toRawString
- Throws:
DataFormatException
-