Package org.bitcoinj.core
Class Utils
- java.lang.Object
 - 
- org.bitcoinj.core.Utils
 
 
- 
public class Utils extends java.lang.ObjectA 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
Fields Modifier and Type Field Description static intMAX_INITIAL_ARRAY_LENGTHMax initial size of variable length arrays and ArrayLists that could be attacked.static com.google.common.base.JoinerSPACE_JOINERDeprecated.Use @link java.util.StringJoiner} or a direct Guava dependencystatic com.google.common.base.SplitterWHITESPACE_SPLITTERDeprecated.UseString.split(String)or a direct Guava dependency 
- 
Constructor Summary
Constructors Constructor Description Utils() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringtoString(java.util.List<byte[]> stack) 
 - 
 
- 
- 
Field Detail
- 
SPACE_JOINER
@Deprecated public static final com.google.common.base.Joiner SPACE_JOINER
Deprecated.Use @link java.util.StringJoiner} or a direct Guava dependencyJoiner for concatenating words with a space inbetween. 
- 
WHITESPACE_SPLITTER
@Deprecated public static final com.google.common.base.Splitter 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_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:
 - Constant Field Values
 
 
 - 
 
 -