|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.data.DataStructureImpl
public abstract class DataStructureImpl
Base implementation of all data structures
Constructor Summary | |
---|---|
DataStructureImpl()
|
Method Summary | |
---|---|
Hash |
calculateHash()
Calculate the SHA256 value of this object (useful for a few scenarios) |
void |
fromBase64(java.lang.String data)
Load the structure from the base 64 encoded data provided |
void |
fromByteArray(byte[] data)
|
protected int |
read(java.io.InputStream in,
byte[] target)
Repeated reads until the buffer is full or IOException is thrown |
java.lang.String |
toBase64()
render the structure into modified base 64 notation |
byte[] |
toByteArray()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.i2p.data.DataStructure |
---|
readBytes, writeBytes |
Constructor Detail |
---|
public DataStructureImpl()
Method Detail |
---|
public java.lang.String toBase64()
DataStructure
toBase64
in interface DataStructure
public void fromBase64(java.lang.String data) throws DataFormatException
DataStructure
fromBase64
in interface DataStructure
DataFormatException
public Hash calculateHash()
DataStructure
calculateHash
in interface DataStructure
public byte[] toByteArray()
toByteArray
in interface DataStructure
public void fromByteArray(byte[] data) throws DataFormatException
fromByteArray
in interface DataStructure
DataFormatException
protected int read(java.io.InputStream in, byte[] target) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |