public class Util extends Object
Modifier and Type | Field and Description |
---|---|
static int |
LAST_READ_KEY |
static int |
SIZE_KEY |
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static String |
cipherToAuthType(String cipher) |
static int[] |
fill(byte[] buf,
int offset,
ByteArrayInputStream in) |
static int[] |
fill(byte[] buf,
int offset,
InputStream in) |
static boolean |
isWhiteSpace(char c) |
static boolean |
isYes(String yesString) |
static void |
main(String[] args) |
static String |
pad(String s,
int length,
boolean left) |
static Map |
parseArgs(String[] cargs) |
static void |
pipeStream(InputStream in,
OutputStream out) |
static void |
pipeStream(InputStream in,
OutputStream out,
boolean autoClose) |
static byte[] |
resizeArray(byte[] bytes) |
static byte[] |
streamToBytes(ByteArrayInputStream in) |
static byte[] |
streamToBytes(ByteArrayInputStream in,
int maxLength) |
static byte[] |
streamToBytes(InputStream in) |
static byte[] |
streamToBytes(InputStream in,
int maxLength) |
static HostPort |
toAddress(String target,
int defaultPort) |
static InetAddress |
toInetAddress(String s)
Utility method to make sure IP-literals don't trigger reverse-DNS lookups.
|
static String |
trim(String s) |
public static final int SIZE_KEY
public static final int LAST_READ_KEY
public Util()
public static boolean isWhiteSpace(char c)
public static void pipeStream(InputStream in, OutputStream out) throws IOException
IOException
public static void pipeStream(InputStream in, OutputStream out, boolean autoClose) throws IOException
IOException
public static byte[] streamToBytes(ByteArrayInputStream in, int maxLength)
public static byte[] streamToBytes(InputStream in, int maxLength) throws IOException
IOException
public static byte[] streamToBytes(InputStream in) throws IOException
IOException
public static byte[] streamToBytes(ByteArrayInputStream in)
public static int[] fill(byte[] buf, int offset, InputStream in) throws IOException
IOException
public static int[] fill(byte[] buf, int offset, ByteArrayInputStream in)
public static byte[] resizeArray(byte[] bytes)
public static HostPort toAddress(String target, int defaultPort) throws UnknownHostException
UnknownHostException
public static String cipherToAuthType(String cipher)
public static InetAddress toInetAddress(String s) throws UnknownHostException
UnknownHostException