public final class Ascii extends Object
Constructor and Description |
---|
Ascii() |
Modifier and Type | Method and Description |
---|---|
static void |
intToHexString(Buffer buffer,
int i) |
static void |
intToUnsignedString(Buffer buffer,
int value,
int shift)
Convert the integer to an unsigned number.
|
static boolean |
isAlpha(int c)
Returns true if the specified ASCII character is upper or lower case.
|
static boolean |
isDigit(int c)
Returns true if the specified ASCII character is a digit.
|
static boolean |
isLower(int c)
Returns true if the specified ASCII character is lower case.
|
static boolean |
isUpper(int c)
Returns true if the specified ASCII character is upper case.
|
static boolean |
isWhite(int c)
Returns true if the specified ASCII character is white space.
|
static int |
parseInt(Buffer b,
int off,
int len)
Parses an unsigned int from the specified sub-array of bytes.
|
static int |
parseInt(byte[] b,
int off,
int len)
Parses an unsigned integer from the specified sub-array of bytes.
|
static int |
parseInt(char[] b,
int off,
int len) |
static long |
parseLong(Buffer b,
int off,
int len)
Parses an unsigned long from the specified sub-array of bytes.
|
static long |
parseLong(byte[] b,
int off,
int len)
Parses an unsigned long from the specified sub-array of bytes.
|
static long |
parseLong(char[] b,
int off,
int len) |
static long |
parseLong(DataChunk dataChunk) |
static long |
parseLong(DataChunk dataChunk,
int offset,
int length) |
static long |
parseLong(String s,
int off,
int len) |
static void |
toLower(byte[] bytes)
Converts passed bytes (representing ASCII characters) to the lower case
equivalent.
|
static int |
toLower(int c)
Returns the lower case equivalent of the specified ASCII character.
|
static void |
toUpper(byte[] bytes)
Converts passed bytes (representing ASCII characters) to the upper case
equivalent.
|
static int |
toUpper(int c)
Returns the upper case equivalent of the specified ASCII character.
|
public static int toUpper(int c)
public static void toUpper(byte[] bytes)
public static int toLower(int c)
public static void toLower(byte[] bytes)
public static boolean isAlpha(int c)
public static boolean isUpper(int c)
public static boolean isLower(int c)
public static boolean isWhite(int c)
public static boolean isDigit(int c)
public static int parseInt(byte[] b, int off, int len) throws NumberFormatException
b
- the bytes to parseoff
- the start offset of the byteslen
- the length of the bytesNumberFormatException
- if the integer format was invalidpublic static int parseInt(char[] b, int off, int len) throws NumberFormatException
NumberFormatException
public static int parseInt(Buffer b, int off, int len) throws NumberFormatException
b
- the Buffer to parseoff
- the start offset of the byteslen
- the length of the bytesNumberFormatException
- if the long format was invalidpublic static long parseLong(byte[] b, int off, int len) throws NumberFormatException
b
- the bytes to parseoff
- the start offset of the byteslen
- the length of the bytesNumberFormatException
- if the long format was invalidpublic static long parseLong(char[] b, int off, int len) throws NumberFormatException
NumberFormatException
public static long parseLong(String s, int off, int len) throws NumberFormatException
NumberFormatException
public static long parseLong(Buffer b, int off, int len) throws NumberFormatException
b
- the Buffer to parseoff
- the start offset of the byteslen
- the length of the bytesNumberFormatException
- if the long format was invalidpublic static long parseLong(DataChunk dataChunk)
public static long parseLong(DataChunk dataChunk, int offset, int length)
public static void intToHexString(Buffer buffer, int i)
public static void intToUnsignedString(Buffer buffer, int value, int shift)
Copyright © 2014 Oracle Corporation. All rights reserved.