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
SSKVerifyException
public static ClientSSKBlock construct(SSKBlock block, ClientSSK key) throws SSKVerifyException
SSKVerifyException
public Bucket decode(BucketFactory factory, int maxLength, boolean dontDecompress) throws KeyDecodeException, java.io.IOException
decode
in interface ClientKeyBlock
factory
- The BucketFactory to use to create the Bucket to return the data in.maxLength
- The maximum size of the returned data in bytes.KeyDecodeException
java.io.IOException
public boolean isMetadata()
ClientKeyBlock
isMetadata
in interface ClientKeyBlock
public ClientSSK getClientKey()
getClientKey
in interface ClientKeyBlock
public short getCompressionCodec()
public byte[] memoryDecode() throws KeyDecodeException
memoryDecode
in interface ClientKeyBlock
KeyDecodeException
public byte[] memoryDecode(boolean dontDecompress) throws KeyDecodeException
KeyDecodeException
public int hashCode()
ClientKeyBlock
hashCode
in interface ClientKeyBlock
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in interface ClientKeyBlock
equals
in class java.lang.Object
public KeyBlock getBlock()
getBlock
in interface ClientKeyBlock
public Key getKey()
getKey
in interface ClientKeyBlock