Top Constructors Methods
com.sun.mail.util

public Class ASCIIUtility

extends Object
Class Inheritance
Imports
java.io.ByteArrayInputStream, .ByteArrayOutputStream, .InputStream, .IOException

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static byte[]
public static byte[]
public static int

Returns:

the integer value
parseInt
(byte[]
the bytes
b
,
int
the first byte offset
start
,
int
the last byte offset
end
,
int
the radix
radix
)

Convert the bytes within the specified range of the given byte array into a signed integer in the given radix .

public static int

Returns:

the integer value
parseInt
(byte[]
the bytes
b
,
int
the first byte offset
start
,
int
the last byte offset
end
)

Convert the bytes within the specified range of the given byte array into a signed integer .

public static long

Returns:

the long value
parseLong
(byte[]
the bytes
b
,
int
the first byte offset
start
,
int
the last byte offset
end
,
int
the radix
radix
)

Convert the bytes within the specified range of the given byte array into a signed long in the given radix .

public static long

Returns:

the long value
parseLong
(byte[]
the bytes
b
,
int
the first byte offset
start
,
int
the last byte offset
end
)

Convert the bytes within the specified range of the given byte array into a signed long .

public static String

Returns:

the String
toString
(byte[]
the bytes
b
,
int
the first byte offset
start
,
int
the last byte offset
end
)

Convert the bytes within the specified range of the given byte array into a String.

public static String

Returns:

the String
toString
(byte[]
the bytes
b
)

Convert the bytes into a String.

public static String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ASCIIUtilityback to summary
private ASCIIUtility()

Method Detail

getBytesback to summary
public static byte[] getBytes(String s)
getBytesback to summary
public static byte[] getBytes(InputStream is) throws IOException
parseIntback to summary
public static int parseInt(byte[] b, int start, int end, int radix) throws NumberFormatException

Convert the bytes within the specified range of the given byte array into a signed integer in the given radix . The range extends from start till, but not including end.

Based on java.lang.Integer.parseInt()

Parameters
b:byte[]

the bytes

start:int

the first byte offset

end:int

the last byte offset

radix:int

the radix

Returns:int

the integer value

Exceptions
NumberFormatException:
for conversion errors
parseIntback to summary
public static int parseInt(byte[] b, int start, int end) throws NumberFormatException

Convert the bytes within the specified range of the given byte array into a signed integer . The range extends from start till, but not including end.

Parameters
b:byte[]

the bytes

start:int

the first byte offset

end:int

the last byte offset

Returns:int

the integer value

Exceptions
NumberFormatException:
for conversion errors
parseLongback to summary
public static long parseLong(byte[] b, int start, int end, int radix) throws NumberFormatException

Convert the bytes within the specified range of the given byte array into a signed long in the given radix . The range extends from start till, but not including end.

Based on java.lang.Long.parseLong()

Parameters
b:byte[]

the bytes

start:int

the first byte offset

end:int

the last byte offset

radix:int

the radix

Returns:long

the long value

Exceptions
NumberFormatException:
for conversion errors
parseLongback to summary
public static long parseLong(byte[] b, int start, int end) throws NumberFormatException

Convert the bytes within the specified range of the given byte array into a signed long . The range extends from start till, but not including end.

Parameters
b:byte[]

the bytes

start:int

the first byte offset

end:int

the last byte offset

Returns:long

the long value

Exceptions
NumberFormatException:
for conversion errors
toStringback to summary
public static String toString(byte[] b, int start, int end)

Convert the bytes within the specified range of the given byte array into a String. The range extends from start till, but not including end.

Parameters
b:byte[]

the bytes

start:int

the first byte offset

end:int

the last byte offset

Returns:String

the String

toStringback to summary
public static String toString(byte[] b)

Convert the bytes into a String.

Parameters
b:byte[]

the bytes

Returns:String

the String

Since
JavaMail 1.4.4
toStringback to summary
public static String toString(ByteArrayInputStream is)