public class Chunk extends Object
Modifier and Type | Field and Description |
---|---|
protected BigInteger |
chunkLength
The length of current chunk.
|
protected GUID |
guid
The GUID of represented chunk header.
|
protected long |
position
The position of current header object within file or stream.
|
Constructor and Description |
---|
Chunk(GUID headerGuid,
BigInteger chunkLen)
Creates an instance
|
Chunk(GUID headerGuid,
long pos,
BigInteger chunkLen)
Creates an instance
|
Modifier and Type | Method and Description |
---|---|
long |
getChunckEnd()
Deprecated.
typo, use
getChunkEnd() instead. |
long |
getChunkEnd()
This method returns the End of the current chunk introduced by current
header object.
|
BigInteger |
getChunkLength() |
GUID |
getGuid() |
long |
getPosition() |
String |
prettyPrint(String prefix)
This method creates a String containing useful information prepared to be
printed on STD-OUT.
|
void |
setPosition(long pos)
Sets the position.
|
String |
toString()
(overridden)
|
protected final BigInteger chunkLength
protected final GUID guid
protected long position
public Chunk(GUID headerGuid, BigInteger chunkLen)
headerGuid
- The GUID of header object.chunkLen
- Length of current chunk.public Chunk(GUID headerGuid, long pos, BigInteger chunkLen)
headerGuid
- The GUID of header object.pos
- Position of header object within stream or file.chunkLen
- Length of current chunk.@Deprecated public long getChunckEnd()
getChunkEnd()
instead.public long getChunkEnd()
public BigInteger getChunkLength()
public GUID getGuid()
public long getPosition()
public String prettyPrint(String prefix)
prefix
- each line gets this string prepended.public void setPosition(long pos)
pos
- position to set.public String toString()
toString
in class Object
Object.toString()
Copyright © 2005–2020 jthink.net. All rights reserved.