Class BDecodeNode

java.lang.Object
com.frostwire.jlibtorrent.BDecodeNode

public final class BDecodeNode extends Object
  • Constructor Details

    • BDecodeNode

      public BDecodeNode(bdecode_node n)
      Parameters:
      n - the native object
    • BDecodeNode

      public BDecodeNode(bdecode_node n, byte_vector buffer)
      Used to keep the buffer reference around.
      Parameters:
      n - the native object
      buffer - the buffer backing up the native object
  • Method Details

    • swig

      public bdecode_node swig()
      Returns:
      the native object
    • buffer

      public byte_vector buffer()
      This methods returns the internal buffer or null if it was constructed without one.

      This also prevent premature garbage collection in case the node was created from a constructed buffer.

      Returns:
      the pinned buffer
    • toString

      public String toString()
      A JSON style string representation
      Overrides:
      toString in class Object
      Returns:
      the string representation
    • hasList

      public boolean hasList(String key)
    • hasDict

      public boolean hasDict(String key)
    • hasString

      public boolean hasString(String key)
    • hasInt

      public boolean hasInt(String key)
    • getList

      public BDecodeNode getList(String key)
    • getDict

      public BDecodeNode getDict(String key)
    • getString

      public String getString(String key)
    • getInt

      public long getInt(String key)
    • bdecode

      public static BDecodeNode bdecode(byte[] data)