com.sun.mail.iap
类 ByteArray

java.lang.Object
  继承者 com.sun.mail.iap.ByteArray

public class ByteArray
extends Object

A simple wrapper around a byte array, with a start position and count of bytes.

版本:
1.7, 07/05/04
作者:
John Mani

构造方法摘要
ByteArray(byte[] b, int start, int count)
          Constructor
ByteArray(int size)
          Constructor that creates a byte array of the specified size.
 
方法摘要
 byte[] getBytes()
          Returns the internal byte array.
 int getCount()
          Returns the count of bytes
 byte[] getNewBytes()
          Returns a new byte array that is a copy of the data.
 int getStart()
          Returns the start position
 void grow(int incr)
          Grow the byte array by incr bytes.
 void setCount(int count)
          Set the count of bytes.
 ByteArrayInputStream toByteArrayInputStream()
          Returns a ByteArrayInputStream.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

ByteArray

public ByteArray(byte[] b,
                 int start,
                 int count)
Constructor


ByteArray

public ByteArray(int size)
Constructor that creates a byte array of the specified size.

从以下版本开始:
JavaMail 1.4.1
方法详细信息

getBytes

public byte[] getBytes()
Returns the internal byte array. Note that this is a live reference to the actual data, not a copy.


getNewBytes

public byte[] getNewBytes()
Returns a new byte array that is a copy of the data.


getStart

public int getStart()
Returns the start position


getCount

public int getCount()
Returns the count of bytes


setCount

public void setCount(int count)
Set the count of bytes.

从以下版本开始:
JavaMail 1.4.1

toByteArrayInputStream

public ByteArrayInputStream toByteArrayInputStream()
Returns a ByteArrayInputStream.


grow

public void grow(int incr)
Grow the byte array by incr bytes.

从以下版本开始:
JavaMail 1.4.1


Copyright © 2013. All Rights Reserved.