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
public class UDPPacketReader.DataReader extends UDPPacketReader.Reader
parse out the data message
-
Constructor Summary
Constructors Constructor Description DataReader()
-
Method Summary
Modifier and Type Method Description int
getPacketSize()
long
readACK(int index)
ACKBitfield[]
readACKBitfields()
boolean
readACKBitfieldsIncluded()
int
readACKCount()
boolean
readACKsIncluded()
boolean
readECN()
boolean
readExtendedDataIncluded()
int
readFragmentCount()
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
readReplyRequested()
boolean
readWantPreviousACKs()
void
toRawString(StringBuilder buf)
String
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
-