class Request extends Object
Modifier and Type | Field and Description |
---|---|
(package private) int |
len |
(package private) int |
off |
(package private) long |
sendTime |
Constructor and Description |
---|
Request(PartialPiece piece,
int off,
int len)
Creates a new Request.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
PartialPiece |
getPartialPiece()
The PartialPiece this Request is for
|
int |
getPiece()
The piece number this Request is for
|
int |
hashCode() |
void |
read(DataInputStream din) |
String |
toString() |
Request(PartialPiece piece, int off, int len)
piece
- Piece number requested.off
- the offset in the array.len
- the number of bytes requested.public void read(DataInputStream din) throws IOException
IOException
public int getPiece()
public PartialPiece getPartialPiece()