org.apache.derby.iapi.services.io
Class NewByteArrayInputStream
java.lang.Object
java.io.InputStream
org.apache.derby.iapi.services.io.NewByteArrayInputStream
- All Implemented Interfaces:
- java.io.Closeable
public final class NewByteArrayInputStream
- extends java.io.InputStream
An InputStream that is like java.io.ByteArrayInputStream but supports
a close() call that causes all methods to throw an IOException.
Java's ByteInputStream has a close() method that does not do anything.
Methods inherited from class java.io.InputStream |
mark, markSupported, read, reset |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
data
private byte[] data
offset
private int offset
length
private int length
NewByteArrayInputStream
public NewByteArrayInputStream(byte[] data)
NewByteArrayInputStream
public NewByteArrayInputStream(byte[] data,
int offset,
int length)
read
public int read()
throws java.io.IOException
- Specified by:
read
in class java.io.InputStream
- Throws:
java.io.IOException
read
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
- Overrides:
read
in class java.io.InputStream
- Throws:
java.io.IOException
skip
public long skip(long count)
throws java.io.IOException
- Overrides:
skip
in class java.io.InputStream
- Throws:
java.io.IOException
available
public int available()
throws java.io.IOException
- Overrides:
available
in class java.io.InputStream
- Throws:
java.io.IOException
getData
public byte[] getData()
close
public void close()
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.InputStream
Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.