org.apache.derby.iapi.services.io
Class NewByteArrayInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byorg.apache.derby.iapi.services.io.NewByteArrayInputStream

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.


Field Summary
private  byte[] data
           
private  int length
           
private  int offset
           
 
Fields inherited from class java.io.InputStream
 
Constructor Summary
NewByteArrayInputStream(byte[] data)
           
NewByteArrayInputStream(byte[] data, int offset, int length)
           
 
Method Summary
 int available()
           
 void close()
           
 byte[] getData()
           
 int read()
           
 int read(byte[] b, int off, int len)
           
 long skip(long count)
           
 
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
 

Field Detail

data

private byte[] data

offset

private int offset

length

private int length
Constructor Detail

NewByteArrayInputStream

public NewByteArrayInputStream(byte[] data)

NewByteArrayInputStream

public NewByteArrayInputStream(byte[] data,
                               int offset,
                               int length)
Method Detail

read

public int read()
         throws java.io.IOException
Throws:
java.io.IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Throws:
java.io.IOException

skip

public long skip(long count)
          throws java.io.IOException
Throws:
java.io.IOException

available

public int available()
              throws java.io.IOException
Throws:
java.io.IOException

getData

public byte[] getData()

close

public void close()

Built on Tue 2006-10-10 19:23:47+0200, from revision exported

Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.