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
All Methods Instance Methods Concrete Methods 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
-
-
-
-
Method Detail
-
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
-
toRawString
public void toRawString(StringBuilder buf) throws DataFormatException
- Throws:
DataFormatException
-
-