Class Utils

java.lang.Object
org.bitcoinj.core.Utils

public class Utils extends Object
A collection of various utility methods that are helpful for working with the Bitcoin protocol. To enable debug logging from the library, run with -Dbitcoinj.logging=true on your command line.
  • Field Details

    • SPACE_JOINER

      @Deprecated public static final com.google.common.base.Joiner SPACE_JOINER
      Deprecated.
      Use @link java.util.StringJoiner} or a direct Guava dependency
      Joiner for concatenating words with a space inbetween.
    • WHITESPACE_SPLITTER

      @Deprecated public static final com.google.common.base.Splitter WHITESPACE_SPLITTER
      Deprecated.
      Use String.split(String) or a direct Guava dependency
      Splitter for splitting words on whitespaces.
    • MAX_INITIAL_ARRAY_LENGTH

      public static final int MAX_INITIAL_ARRAY_LENGTH
      Max initial size of variable length arrays and ArrayLists that could be attacked. Avoids this attack: Attacker sends a msg indicating it will contain a huge number (e.g. 2 billion) elements (e.g. transaction inputs) and forces bitcoinj to try to allocate a huge piece of the memory resulting in OutOfMemoryError.
      See Also:
  • Constructor Details

    • Utils

      public Utils()
  • Method Details

    • toString

      public static String toString(List<byte[]> stack)