net.i2p.router.transport.udp
Class UDPPacketReader.DataReader
java.lang.Object
net.i2p.router.transport.udp.UDPPacketReader.DataReader
- Enclosing class:
- UDPPacketReader
public class UDPPacketReader.DataReader
- extends Object
parse out the data message
UDPPacketReader.DataReader
public UDPPacketReader.DataReader()
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
public ACKBitfield[] readACKBitfields()
throws DataFormatException
- Throws:
DataFormatException
readFragmentCount
public int readFragmentCount()
throws DataFormatException
- Throws:
DataFormatException
readMessageId
public long readMessageId(int fragmentNum)
throws DataFormatException
- Throws:
DataFormatException
readMessageFragmentNum
public int readMessageFragmentNum(int fragmentNum)
throws DataFormatException
- Throws:
DataFormatException
readMessageIsLast
public boolean readMessageIsLast(int fragmentNum)
throws DataFormatException
- Throws:
DataFormatException
readMessageFragmentSize
public int readMessageFragmentSize(int fragmentNum)
throws DataFormatException
- Throws:
DataFormatException
readMessageFragment
public void readMessageFragment(int fragmentNum,
byte[] target,
int targetOffset)
throws DataFormatException
- Throws:
DataFormatException
toString
public String toString()
- Overrides:
toString
in class Object
toRawString
public void toRawString(StringBuilder buf)
throws DataFormatException
- Throws:
DataFormatException