com.sun.mail.util
类 ASCIIUtility

java.lang.Object
  继承者 com.sun.mail.util.ASCIIUtility

public class ASCIIUtility
extends Object


方法摘要
static byte[] getBytes(InputStream is)
           
static byte[] getBytes(String s)
           
static int parseInt(byte[] b, int start, int end)
          Convert the bytes within the specified range of the given byte array into a signed integer .
static int parseInt(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 long parseLong(byte[] b, int start, int end)
          Convert the bytes within the specified range of the given byte array into a signed long .
static long parseLong(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 String toString(byte[] b, int start, int end)
          Convert the bytes within the specified range of the given byte array into a String.
static String toString(ByteArrayInputStream is)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

方法详细信息

parseInt

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()

抛出:
NumberFormatException

parseInt

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.

抛出:
NumberFormatException

parseLong

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()

抛出:
NumberFormatException

parseLong

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.

抛出:
NumberFormatException

toString

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.


toString

public static String toString(ByteArrayInputStream is)

getBytes

public static byte[] getBytes(String s)

getBytes

public static byte[] getBytes(InputStream is)
                       throws IOException
抛出:
IOException


Copyright © 2013. All Rights Reserved.