1 /*
2  * NativeOutputStreamHelper.java
3  *
4  * Created on 1. September 2004, 10:39
5  */
6 
7 package com.sun.star.sdbcx.comp.hsqldb;
8 
9 /**
10  *
11  * @author  oj93728
12  */
13 public class NativeOutputStreamHelper extends java.io.OutputStream{
14 
15     private String key;
16     private String file;
17     private StorageNativeOutputStream out;
18     /** Creates a new instance of NativeOutputStreamHelper */
19     public NativeOutputStreamHelper(String key,String _file) {
20         file = _file;
21         this.key = key;
22         out = new StorageNativeOutputStream(file,key);
23     }
24 
25     public void write(byte[] b, int off, int len)  throws java.io.IOException{
26         out.write(key,file,b, off, len);
27     }
28 
29     public void write(byte[] b)  throws java.io.IOException{
30         out.write(key,file,b);
31     }
32 
33     public void close()  throws java.io.IOException{
34         out.close(key,file);
35     }
36 
37     public void write(int b)  throws java.io.IOException{
38         out.write(key,file,b);
39     }
40 
41     public void flush()  throws java.io.IOException{
42         out.flush(key,file);
43     }
44 
45     public void sync()  throws java.io.IOException{
46         out.sync(key,file);
47     }
48 }
49