Serializable, DataStructureAbuseReason, AbuseSeverity, Certificate, DatabaseEntry, DateAndFlags, DeliveryInstructions, GarlicClove, I2CPMessageImpl, I2NPMessageImpl, KeysAndCert, Lease, MessageId, Payload, RouterAddress, SessionConfig, SessionId, SimpleDataStructure, TunnelIdpublic abstract class DataStructureImpl extends Object implements DataStructure, Serializable
| Constructor | Description |
|---|---|
DataStructureImpl() |
| Modifier and Type | Method | Description |
|---|---|---|
Hash |
calculateHash() |
Calculate the SHA256 value of this object (useful for a few scenarios)
|
void |
fromBase64(String data) |
Load the structure from the base 64 encoded data provided
Warning - many classes will throw IllegalStateException if data is already set.
|
void |
fromByteArray(byte[] data) |
Load the structure from the data provided
Warning - many classes will throw IllegalStateException if data is already set.
|
protected int |
read(InputStream in,
byte[] target) |
Repeated reads until the buffer is full or IOException is thrown
|
String |
toBase64() |
render the structure into modified base 64 notation
|
byte[] |
toByteArray() |
readBytes, writeBytespublic String toBase64()
DataStructuretoBase64 in interface DataStructurepublic void fromBase64(String data) throws DataFormatException
DataStructurefromBase64 in interface DataStructureDataFormatExceptionpublic Hash calculateHash()
DataStructurecalculateHash in interface DataStructurepublic byte[] toByteArray()
toByteArray in interface DataStructurepublic void fromByteArray(byte[] data)
throws DataFormatException
DataStructurefromByteArray in interface DataStructureDataFormatExceptionprotected int read(InputStream in, byte[] target) throws IOException
IOException