Class SerializedBinaryFuseFilter

java.lang.Object
org.stellar.sdk.xdr.SerializedBinaryFuseFilter
All Implemented Interfaces:
XdrElement

public class SerializedBinaryFuseFilter extends Object implements 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<>;
 };
 
  • 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 new SerializedBinaryFuseFilter instance.
      Parameters:
      type - the type field value
      inputHashSeed - the inputHashSeed field value
      filterSeed - the filterSeed field value
      segmentLength - the segmentLength field value
      segementLengthMask - the segementLengthMask field value
      segmentCount - the segmentCount field value
      segmentCountLength - the segmentCountLength field value
      fingerprintLength - the fingerprintLength field value
      fingerprints - the fingerprints field value
  • Method Details

    • encode

      public void encode(XdrDataOutputStream stream) throws IOException
      Description copied from interface: XdrElement
      Encodes this value to XDR and writes it to the provided stream.
      Specified by:
      encode in interface XdrElement
      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

      public static SerializedBinaryFuseFilter decode(XdrDataInputStream stream) throws IOException
      Throws:
      IOException
    • fromXdrBase64

      public static SerializedBinaryFuseFilter fromXdrBase64(String xdr) throws IOException
      Throws:
      IOException
    • fromXdrByteArray

      public static SerializedBinaryFuseFilter fromXdrByteArray(byte[] xdr) throws IOException
      Throws:
      IOException
    • toJson

      public String toJson()
      Description copied from interface: XdrElement
      Serializes this value to JSON.
      Specified by:
      toJson in interface XdrElement
      Returns:
      the JSON representation of this value
    • fromJson

      public static SerializedBinaryFuseFilter fromJson(String json)
    • builder

    • toBuilder

    • getType

      public BinaryFuseFilterType getType()
      Value of the type field.
      Returns:
      the type field value
    • getInputHashSeed

      public ShortHashSeed getInputHashSeed()
      Value of the inputHashSeed field.
      Returns:
      the inputHashSeed field value
    • getFilterSeed

      public ShortHashSeed getFilterSeed()
      Value of the filterSeed field.
      Returns:
      the filterSeed field value
    • getSegmentLength

      public Uint32 getSegmentLength()
      Value of the segmentLength field.
      Returns:
      the segmentLength field value
    • getSegementLengthMask

      public Uint32 getSegementLengthMask()
      Value of the segementLengthMask field.
      Returns:
      the segementLengthMask field value
    • getSegmentCount

      public Uint32 getSegmentCount()
      Value of the segmentCount field.
      Returns:
      the segmentCount field value
    • getSegmentCountLength

      public Uint32 getSegmentCountLength()
      Value of the segmentCountLength field.
      Returns:
      the segmentCountLength field value
    • getFingerprintLength

      public Uint32 getFingerprintLength()
      Value of the fingerprintLength field.
      Returns:
      the fingerprintLength field value
    • getFingerprints

      public byte[] getFingerprints()
      Value of the fingerprints field.
      Returns:
      the fingerprints field value
    • setType

      public void setType(BinaryFuseFilterType type)
      Value of the type field.
      Parameters:
      type - the type field value
    • setInputHashSeed

      public void setInputHashSeed(ShortHashSeed inputHashSeed)
      Value of the inputHashSeed field.
      Parameters:
      inputHashSeed - the inputHashSeed field value
    • setFilterSeed

      public void setFilterSeed(ShortHashSeed filterSeed)
      Value of the filterSeed field.
      Parameters:
      filterSeed - the filterSeed field value
    • setSegmentLength

      public void setSegmentLength(Uint32 segmentLength)
      Value of the segmentLength field.
      Parameters:
      segmentLength - the segmentLength field value
    • setSegementLengthMask

      public void setSegementLengthMask(Uint32 segementLengthMask)
      Value of the segementLengthMask field.
      Parameters:
      segementLengthMask - the segementLengthMask field value
    • setSegmentCount

      public void setSegmentCount(Uint32 segmentCount)
      Value of the segmentCount field.
      Parameters:
      segmentCount - the segmentCount field value
    • setSegmentCountLength

      public void setSegmentCountLength(Uint32 segmentCountLength)
      Value of the segmentCountLength field.
      Parameters:
      segmentCountLength - the segmentCountLength field value
    • setFingerprintLength

      public void setFingerprintLength(Uint32 fingerprintLength)
      Value of the fingerprintLength field.
      Parameters:
      fingerprintLength - the fingerprintLength field value
    • setFingerprints

      public void setFingerprints(byte[] fingerprints)
      Value of the fingerprints field.
      Parameters:
      fingerprints - the fingerprints field value
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object