1 package org.sapia.ubik.util; 2 3 import java.io.IOException ; 4 import java.io.OutputStream ; 5 6 21 public class ByteVectorOutputStream extends OutputStream { 22 23 private ByteVector _bytes; 24 25 public ByteVectorOutputStream(ByteVector bytes){ 26 _bytes = bytes; 27 } 28 29 32 public ByteVector getByteVector(){ 33 return _bytes; 34 } 35 36 39 public void close() throws IOException { 40 } 41 42 45 public void flush() throws IOException { 46 } 47 48 51 public void write(byte[] b, int off, int len) throws IOException { 52 _bytes.write(b, off, len); 53 } 54 55 58 public void write(byte[] b) throws IOException { 59 _bytes.write(b); 60 } 61 62 65 public void write(int b) throws IOException { 66 _bytes.write(b); 67 } 68 } 69 | Popular Tags |