Package org.stellar.sdk.xdr
Class SerializedBinaryFuseFilter
java.lang.Object
org.stellar.sdk.xdr.SerializedBinaryFuseFilter
- All Implemented Interfaces:
XdrElement
SerializedBinaryFuseFilter's original definition in the XDR file is:
struct SerializedBinaryFuseFilter
{
BinaryFuseFilterType type;
// Seed used to hash input to filter
ShortHashSeed inputHashSeed;
// Seed used for internal filter hash operations
ShortHashSeed filterSeed;
uint32 segmentLength;
uint32 segementLengthMask;
uint32 segmentCount;
uint32 segmentCountLength;
uint32 fingerprintLength; // Length in terms of element count, not bytes
// Array of uint8_t, uint16_t, or uint32_t depending on filter type
opaque fingerprints<>;
};
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionSerializedBinaryFuseFilter(BinaryFuseFilterType type, ShortHashSeed inputHashSeed, ShortHashSeed filterSeed, Uint32 segmentLength, Uint32 segementLengthMask, Uint32 segmentCount, Uint32 segmentCountLength, Uint32 fingerprintLength, byte[] fingerprints) Creates a newSerializedBinaryFuseFilterinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static SerializedBinaryFuseFilterdecode(XdrDataInputStream stream) static SerializedBinaryFuseFilterdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic SerializedBinaryFuseFilterstatic SerializedBinaryFuseFilterfromXdrBase64(String xdr) static SerializedBinaryFuseFilterfromXdrByteArray(byte[] xdr) Value of thefilterSeedfield.Value of thefingerprintLengthfield.byte[]Value of thefingerprintsfield.Value of theinputHashSeedfield.Value of thesegementLengthMaskfield.Value of thesegmentCountfield.Value of thesegmentCountLengthfield.Value of thesegmentLengthfield.getType()Value of thetypefield.inthashCode()voidsetFilterSeed(ShortHashSeed filterSeed) Value of thefilterSeedfield.voidsetFingerprintLength(Uint32 fingerprintLength) Value of thefingerprintLengthfield.voidsetFingerprints(byte[] fingerprints) Value of thefingerprintsfield.voidsetInputHashSeed(ShortHashSeed inputHashSeed) Value of theinputHashSeedfield.voidsetSegementLengthMask(Uint32 segementLengthMask) Value of thesegementLengthMaskfield.voidsetSegmentCount(Uint32 segmentCount) Value of thesegmentCountfield.voidsetSegmentCountLength(Uint32 segmentCountLength) Value of thesegmentCountLengthfield.voidsetSegmentLength(Uint32 segmentLength) Value of thesegmentLengthfield.voidsetType(BinaryFuseFilterType type) Value of thetypefield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
SerializedBinaryFuseFilter
public SerializedBinaryFuseFilter() -
SerializedBinaryFuseFilter
public SerializedBinaryFuseFilter(BinaryFuseFilterType type, ShortHashSeed inputHashSeed, ShortHashSeed filterSeed, Uint32 segmentLength, Uint32 segementLengthMask, Uint32 segmentCount, Uint32 segmentCountLength, Uint32 fingerprintLength, byte[] fingerprints) Creates a newSerializedBinaryFuseFilterinstance.- Parameters:
type- thetypefield valueinputHashSeed- theinputHashSeedfield valuefilterSeed- thefilterSeedfield valuesegmentLength- thesegmentLengthfield valuesegementLengthMask- thesegementLengthMaskfield valuesegmentCount- thesegmentCountfield valuesegmentCountLength- thesegmentCountLengthfield valuefingerprintLength- thefingerprintLengthfield valuefingerprints- thefingerprintsfield value
-
-
Method Details
-
encode
Description copied from interface:XdrElementEncodes this value to XDR and writes it to the provided stream.- Specified by:
encodein interfaceXdrElement- Parameters:
stream- the destination XDR output stream- Throws:
IOException- if an I/O error occurs while writing the value
-
decode
public static SerializedBinaryFuseFilter decode(XdrDataInputStream stream, int maxDepth) throws IOException - Throws:
IOException
-
decode
- Throws:
IOException
-
fromXdrBase64
- Throws:
IOException
-
fromXdrByteArray
- Throws:
IOException
-
toJson
Description copied from interface:XdrElementSerializes this value to JSON.- Specified by:
toJsonin interfaceXdrElement- Returns:
- the JSON representation of this value
-
fromJson
-
builder
-
toBuilder
-
getType
Value of thetypefield.- Returns:
- the
typefield value
-
getInputHashSeed
Value of theinputHashSeedfield.- Returns:
- the
inputHashSeedfield value
-
getFilterSeed
Value of thefilterSeedfield.- Returns:
- the
filterSeedfield value
-
getSegmentLength
Value of thesegmentLengthfield.- Returns:
- the
segmentLengthfield value
-
getSegementLengthMask
Value of thesegementLengthMaskfield.- Returns:
- the
segementLengthMaskfield value
-
getSegmentCount
Value of thesegmentCountfield.- Returns:
- the
segmentCountfield value
-
getSegmentCountLength
Value of thesegmentCountLengthfield.- Returns:
- the
segmentCountLengthfield value
-
getFingerprintLength
Value of thefingerprintLengthfield.- Returns:
- the
fingerprintLengthfield value
-
getFingerprints
public byte[] getFingerprints()Value of thefingerprintsfield.- Returns:
- the
fingerprintsfield value
-
setType
Value of thetypefield.- Parameters:
type- thetypefield value
-
setInputHashSeed
Value of theinputHashSeedfield.- Parameters:
inputHashSeed- theinputHashSeedfield value
-
setFilterSeed
Value of thefilterSeedfield.- Parameters:
filterSeed- thefilterSeedfield value
-
setSegmentLength
Value of thesegmentLengthfield.- Parameters:
segmentLength- thesegmentLengthfield value
-
setSegementLengthMask
Value of thesegementLengthMaskfield.- Parameters:
segementLengthMask- thesegementLengthMaskfield value
-
setSegmentCount
Value of thesegmentCountfield.- Parameters:
segmentCount- thesegmentCountfield value
-
setSegmentCountLength
Value of thesegmentCountLengthfield.- Parameters:
segmentCountLength- thesegmentCountLengthfield value
-
setFingerprintLength
Value of thefingerprintLengthfield.- Parameters:
fingerprintLength- thefingerprintLengthfield value
-
setFingerprints
public void setFingerprints(byte[] fingerprints) Value of thefingerprintsfield.- Parameters:
fingerprints- thefingerprintsfield value
-
equals
-
hashCode
public int hashCode() -
toString
-