2004-11-09 05:05:43 -06:00
|
|
|
/*
|
|
|
|
* NativeOutputStreamHelper.java
|
|
|
|
*
|
|
|
|
* Created on 1. September 2004, 10:39
|
|
|
|
*/
|
|
|
|
|
|
|
|
package com.sun.star.sdbcx.comp.hsqldb;
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @author oj93728
|
|
|
|
*/
|
|
|
|
public class NativeOutputStreamHelper extends java.io.OutputStream{
|
|
|
|
|
|
|
|
private String key;
|
|
|
|
private String file;
|
|
|
|
private StorageNativeOutputStream out;
|
|
|
|
/** Creates a new instance of NativeOutputStreamHelper */
|
2005-02-16 08:48:14 -06:00
|
|
|
public NativeOutputStreamHelper(String key,String _file) {
|
2004-11-09 05:05:43 -06:00
|
|
|
file = _file;
|
|
|
|
this.key = key;
|
|
|
|
out = new StorageNativeOutputStream(file,key);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void write(byte[] b, int off, int len) throws java.io.IOException{
|
2005-02-16 08:48:14 -06:00
|
|
|
out.write(key,file,b, off, len);
|
2004-11-09 05:05:43 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
public void write(byte[] b) throws java.io.IOException{
|
2005-02-16 08:48:14 -06:00
|
|
|
out.write(key,file,b);
|
2004-11-09 05:05:43 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
public void close() throws java.io.IOException{
|
2005-02-16 08:48:14 -06:00
|
|
|
out.close(key,file);
|
2004-11-09 05:05:43 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
public void write(int b) throws java.io.IOException{
|
2005-02-16 08:48:14 -06:00
|
|
|
out.write(key,file,b);
|
2004-11-09 05:05:43 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
public void flush() throws java.io.IOException{
|
2005-02-16 08:48:14 -06:00
|
|
|
out.flush(key,file);
|
2004-11-09 05:05:43 -06:00
|
|
|
}
|
|
|
|
|
2005-02-16 08:48:14 -06:00
|
|
|
public void sync() throws java.io.IOException{
|
|
|
|
out.sync(key,file);
|
|
|
|
}
|
2004-11-09 05:05:43 -06:00
|
|
|
}
|