public class Jdk5Helper extends Object implements JdkHelper
JdkHelper implementation for JDK5.| Constructor and Description |
|---|
Jdk5Helper() |
| Modifier and Type | Method and Description |
|---|---|
long |
getThreadId(Thread currentThread)
return an ID for current thread
|
boolean |
isInterfaceUp(NetworkInterface iface)
Returns true if the given
NetworkInterface is up. |
Byte |
newByte(byte value)
return a Byte object for given value
|
Character |
newCharacter(char value)
return a Characted object for given value
|
ConcurrentHashMap<?,?> |
newConcurrentMap(int initialCapacity,
int concurrencyLevel)
return a
Map implementation for concurrent usage |
Integer |
newInteger(int value)
return an Integer object for given value
|
Long |
newLong(long value)
return a Long object for given value
|
Short |
newShort(short value)
return a Short object for given value
|
String |
newWrappedString(char[] chars,
int offset,
int size)
Wrap the given array of character as a String avoiding copying if possible.
|
String |
readChars(InputStream in,
boolean noecho)
reads characters without the trailing newline from standard input in case a
console is available else reading from the given input stream
|
public final ConcurrentHashMap<?,?> newConcurrentMap(int initialCapacity, int concurrencyLevel)
JdkHelperMap implementation for concurrent usagenewConcurrentMap in interface JdkHelperJdkHelper.newConcurrentMap(int, int)public final long getThreadId(Thread currentThread)
JdkHelpergetThreadId in interface JdkHelperJdkHelper.getThreadId(Thread)public final Byte newByte(byte value)
JdkHelpernewByte in interface JdkHelperJdkHelper.newByte(byte)public final Short newShort(short value)
JdkHelpernewShort in interface JdkHelperJdkHelper.newShort(short)public final Integer newInteger(int value)
JdkHelpernewInteger in interface JdkHelperJdkHelper.newInteger(int)public final Long newLong(long value)
JdkHelpernewLong in interface JdkHelperJdkHelper.newLong(long)public final Character newCharacter(char value)
JdkHelpernewCharacter in interface JdkHelperJdkHelper.newCharacter(char)public String readChars(InputStream in, boolean noecho)
JdkHelperreadChars in interface JdkHelperJdkHelper.readChars(InputStream, boolean)public String newWrappedString(char[] chars, int offset, int size)
JdkHelpernewWrappedString in interface JdkHelperpublic boolean isInterfaceUp(NetworkInterface iface) throws SocketException
JdkHelperNetworkInterface is up.isInterfaceUp in interface JdkHelperSocketExceptionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.