1 21 22 package org.apache.derby.impl.store.raw.data; 23 24 import java.io.InputStream ; 25 import java.io.IOException ; 26 27 public class ByteHolderInputStream 28 extends InputStream 29 { 30 protected ByteHolder bh; 31 32 public ByteHolderInputStream(ByteHolder bh) { 33 this.bh = bh; 34 } 35 36 public int read() throws IOException { 37 return bh.read(); 38 } 39 40 public int read(byte b[], int off, int len) 41 throws IOException { 42 return bh.read(b,off,len); 43 } 44 45 public long skip(long count) throws IOException { 46 return bh.skip(count); 47 } 48 49 public int available() throws IOException { 50 return bh.available(); 51 } 52 53 public void setByteHolder(ByteHolder bh) { 54 this.bh = bh; 55 } 56 57 public ByteHolder getByteHolder() { 58 return bh; 59 } 60 } 61 | Popular Tags |