org.apache.axiom.attachments.utils
Class BAAInputStream
java.lang.Object
java.io.InputStream
org.apache.axiom.attachments.utils.BAAInputStream
- All Implemented Interfaces:
- Closeable
public class BAAInputStream
- extends InputStream
BAAInputStream is like a ByteArrayInputStream.
A ByteArrayInputStream stores the backing data in a byte[].
BAAInputStream stores the backing data in a Array of
byte[]. Using several non-contiguous chunks reduces
memory copy and resizing.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BAAInputStream
public BAAInputStream(ArrayList data,
int size)
read
public int read()
throws IOException
- Specified by:
read
in class InputStream
- Throws:
IOException
available
public int available()
throws IOException
- Overrides:
available
in class InputStream
- Throws:
IOException
mark
public void mark(int readlimit)
- Overrides:
mark
in class InputStream
markSupported
public boolean markSupported()
- Overrides:
markSupported
in class InputStream
read
public int read(byte[] b,
int off,
int len)
throws IOException
- Overrides:
read
in class InputStream
- Throws:
IOException
read
public int read(byte[] b)
throws IOException
- Overrides:
read
in class InputStream
- Throws:
IOException
reset
public void reset()
throws IOException
- Overrides:
reset
in class InputStream
- Throws:
IOException
writeTo
public void writeTo(OutputStream os)
throws IOException
- Write all of the buffers to the output stream
- Parameters:
os
-
- Throws:
IOException
Copyright © 2004-2011 The Apache Software Foundation. All Rights Reserved.