|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.system.server.profileservice.repository.clustered.sync.ByteChunk
public class ByteChunk
Encapsulates the results of an IO read operation for transmission across the cluster.
Constructor Summary | |
---|---|
ByteChunk(byte[] bytes,
int byteCount)
Create a new ByteChunk. |
Method Summary | |
---|---|
int |
getByteCount()
Gets the number of valid bytes. |
byte[] |
getBytes()
The bytes contained by this chunk. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ByteChunk(byte[] bytes, int byteCount)
bytes
- source bytes. Note that this array will not necessarily
be defensively copied, so callers should not alter it
after passing it to this object.byteCount
- number of bytes in bytes
that are valid;
rest are filler. -1
indicates end of stream.Method Detail |
---|
public int getByteCount()
-1
to indicate end of streampublic byte[] getBytes()
getByteCount()
in which case the excess bytes
are filler.
null
if getByteCount()
would
return -1
. Not that this may be a direct reference
to this object's internal byte buffer, so callers should not
alter the byte array.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |