Task.Support.CoreSupport
Class ByteBuffer
java.lang.Object
Task.Support.CoreSupport.ByteBuffer
- All Implemented Interfaces:
- java.io.Serializable, ConstantsIF, MIMETypeConstantsIF
public class ByteBuffer
- extends java.lang.Object
- implements ConstantsIF, java.io.Serializable
ByteBuffer is a container for bytes. A ByteBuffer is to bytes, what a StringBuffer is to
Strings.
- Since:
- 3/9/2000,11:54am
- Version:
- 1.0
- Author:
- Nazmul Idris
- See Also:
- Serialized Form
| Fields inherited from interface Task.Support.CoreSupport.MIMETypeConstantsIF |
BINARY_TYPE, CSS_TYPE, GIF_TYPE, HTML_TEXT_TYPE, ICS_TYPE, JPEG_TYPE, MAIL_HOST, MAIL_PORT, MAIL_PSWD, MAIL_USER, MESSAGE_SENT_OK, MP3_AUDIO_TYPE, MPEG_VIDEO_TYPE, MSWORD_TYPE, PDF_TYPE, PLAIN_TEXT_TYPE, PNG_TYPE, RTF_TYPE, SEND_EMAIL, SEND_EMAIL_WITH_ATTACHMENT, TIFF_TYPE, WINDOWS_BMP_TYPE, XML_TYPE, ZIP_TYPE |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BUFFER_SIZE
public static final int BUFFER_SIZE
- See Also:
- Constant Field Values
byteRay
protected byte[] byteRay
enc
protected java.lang.String enc
ByteBuffer
public ByteBuffer()
ByteBuffer
public ByteBuffer(byte[] srcBuf)
ByteBuffer
public ByteBuffer(ByteBuffer bb)
ByteBuffer
public ByteBuffer(java.io.InputStream is)
throws java.io.IOException
- this method does not close the InputStream. Simply reads all data on the stream into a byte
buffer.
- Throws:
java.io.IOException
append
public ByteBuffer append(byte[] srcBuf,
int srcStartIndex,
int srcLength)
toByteArray
public byte[] toByteArray()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
setEncoding
public void setEncoding(java.lang.String enc)
arrayCopy
protected final void arrayCopy(byte[] srcBuf,
int srcStartIndex,
byte[] destBuf,
int destStartIndex,
int numberOfBytesToCopy)
getBytes
public byte[] getBytes()
getInputStream
public java.io.ByteArrayInputStream getInputStream()
getSize
public int getSize()
append
public void append(byte[] srcBuf)
append
public void append(ByteBuffer buf)
clear
public void clear()
main
public static void main(java.lang.String[] args)
Copyright © 2011. All Rights Reserved.