Package org.bitcoinj.core
Class Utils
java.lang.Object
org.bitcoinj.core.Utils
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 Summary
Modifier and TypeFieldDescriptionstatic final int
Max initial size of variable length arrays and ArrayLists that could be attacked.static final com.google.common.base.Joiner
Deprecated.Use @link java.util.StringJoiner} or a direct Guava dependencystatic final com.google.common.base.Splitter
Deprecated.UseString.split(String)
or a direct Guava dependency -
Constructor Summary
-
Method Summary
-
Field Details
-
SPACE_JOINER
Deprecated.Use @link java.util.StringJoiner} or a direct Guava dependencyJoiner for concatenating words with a space inbetween. -
WHITESPACE_SPLITTER
Deprecated.UseString.split(String)
or a direct Guava dependencySplitter for splitting words on whitespaces. -
MAX_INITIAL_ARRAY_LENGTH
public static final int MAX_INITIAL_ARRAY_LENGTHMax 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
-