remove unnecessary import in Persistent.java
[org.ibex.io.git] / src / org / ibex / io / UnReaderStream.java
1 // Copyright 2000-2007 the Contributors, as shown in the revision logs.
2 // Licensed under the Apache Public Source License 2.0 ("the License").
3 // You may not use this file except in compliance with the License.
4
5 package org.ibex.io;
6
7 import java.io.*;
8
9 /** package-private helper */
10 class UnReaderStream extends OutputStream {
11
12     private final ByteBufInputStream bbis;
13     public UnReaderStream(ByteBufInputStream bbis) {
14         this.bbis = bbis;
15     }
16
17     public void close() { }
18     public void write(int i) throws IOException { byte[] b = new byte[1]; b[0] = (byte)i; write(b, 0, 1); }
19     public void write(byte[] b) throws IOException { write(b, 0, b.length); }
20     public void write(byte[] b, int p, int l) {
21         bbis.pushback(b, p, l);
22     }
23 }