Package com.sun.mail.util
Class ASCIIUtility
java.lang.Object
com.sun.mail.util.ASCIIUtility
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]getBytes(InputStream is) static byte[]static intparseInt(byte[] b, int start, int end) Convert the bytes within the specified range of the given byte array into a signed integer .static intparseInt(byte[] b, int start, int end, int radix) Convert the bytes within the specified range of the given byte array into a signed integer in the given radix .static longparseLong(byte[] b, int start, int end) Convert the bytes within the specified range of the given byte array into a signed long .static longparseLong(byte[] b, int start, int end, int radix) Convert the bytes within the specified range of the given byte array into a signed long in the given radix .static StringtoString(byte[] b) Convert the bytes into a String.static StringtoString(byte[] b, int start, int end) Convert the bytes within the specified range of the given byte array into a String.static String
-
Method Details
-
parseInt
Convert the bytes within the specified range of the given byte array into a signed integer in the given radix . The range extends fromstarttill, but not includingend.Based on java.lang.Integer.parseInt()
- Parameters:
b- the bytesstart- the first byte offsetend- the last byte offsetradix- the radix- Returns:
- the integer value
- Throws:
NumberFormatException- for conversion errors
-
parseInt
Convert the bytes within the specified range of the given byte array into a signed integer . The range extends fromstarttill, but not includingend.- Parameters:
b- the bytesstart- the first byte offsetend- the last byte offset- Returns:
- the integer value
- Throws:
NumberFormatException- for conversion errors
-
parseLong
Convert the bytes within the specified range of the given byte array into a signed long in the given radix . The range extends fromstarttill, but not includingend.Based on java.lang.Long.parseLong()
- Parameters:
b- the bytesstart- the first byte offsetend- the last byte offsetradix- the radix- Returns:
- the long value
- Throws:
NumberFormatException- for conversion errors
-
parseLong
Convert the bytes within the specified range of the given byte array into a signed long . The range extends fromstarttill, but not includingend.- Parameters:
b- the bytesstart- the first byte offsetend- the last byte offset- Returns:
- the long value
- Throws:
NumberFormatException- for conversion errors
-
toString
Convert the bytes within the specified range of the given byte array into a String. The range extends fromstarttill, but not includingend.- Parameters:
b- the bytesstart- the first byte offsetend- the last byte offset- Returns:
- the String
-
toString
Convert the bytes into a String.- Parameters:
b- the bytes- Returns:
- the String
- Since:
- JavaMail 1.4.4
-
toString
-
getBytes
-
getBytes
- Throws:
IOException
-