org.klomp.snark
Class Request
java.lang.Object
org.klomp.snark.Request
class Request
- extends java.lang.Object
Holds all information needed for a partial piece request.
Field Summary |
(package private) byte[] |
bs
|
(package private) int |
len
|
(package private) int |
off
|
(package private) int |
piece
|
(package private) long |
sendTime
|
Constructor Summary |
Request(int piece,
byte[] bs,
int off,
int len)
Creates a new Request. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
piece
final int piece
bs
final byte[] bs
off
final int off
len
final int len
sendTime
long sendTime
Request
Request(int piece,
byte[] bs,
int off,
int len)
- Creates a new Request.
- Parameters:
piece
- Piece number requested.bs
- byte array where response should be stored.off
- the offset in the array.len
- the number of bytes requested.
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object