public class ClientSSKBlock extends java.lang.Object implements ClientKeyBlock
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_DECOMPRESSED_DATA_LENGTH |
| Constructor and Description |
|---|
ClientSSKBlock(byte[] data,
byte[] headers,
ClientSSK key,
boolean dontVerify) |
| Modifier and Type | Method and Description |
|---|---|
static ClientSSKBlock |
construct(SSKBlock block,
ClientSSK key) |
Bucket |
decode(BucketFactory factory,
int maxLength,
boolean dontDecompress)
Decode the data.
|
boolean |
equals(java.lang.Object o)
Return true if this is the same block as the other ClientSSKBlock, *and* it is the same key
|
KeyBlock |
getBlock() |
ClientSSK |
getClientKey() |
short |
getCompressionCodec() |
Key |
getKey() |
int |
hashCode()
Please be consistent with equals()
|
boolean |
isMetadata()
Does the block contain metadata? If not, it contains real data.
|
byte[] |
memoryDecode() |
byte[] |
memoryDecode(boolean dontDecompress)
Decode into RAM, if short.
|
public static final int MAX_DECOMPRESSED_DATA_LENGTH
public ClientSSKBlock(byte[] data,
byte[] headers,
ClientSSK key,
boolean dontVerify)
throws SSKVerifyException
SSKVerifyExceptionpublic static ClientSSKBlock construct(SSKBlock block, ClientSSK key) throws SSKVerifyException
SSKVerifyExceptionpublic Bucket decode(BucketFactory factory, int maxLength, boolean dontDecompress) throws KeyDecodeException, java.io.IOException
decode in interface ClientKeyBlockfactory - The BucketFactory to use to create the Bucket to return the data in.maxLength - The maximum size of the returned data in bytes.KeyDecodeExceptionjava.io.IOExceptionpublic boolean isMetadata()
ClientKeyBlockisMetadata in interface ClientKeyBlockpublic ClientSSK getClientKey()
getClientKey in interface ClientKeyBlockpublic short getCompressionCodec()
public byte[] memoryDecode()
throws KeyDecodeException
memoryDecode in interface ClientKeyBlockKeyDecodeExceptionpublic byte[] memoryDecode(boolean dontDecompress)
throws KeyDecodeException
KeyDecodeExceptionpublic int hashCode()
ClientKeyBlockhashCode in interface ClientKeyBlockhashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in interface ClientKeyBlockequals in class java.lang.Objectpublic KeyBlock getBlock()
getBlock in interface ClientKeyBlockpublic Key getKey()
getKey in interface ClientKeyBlock