INTEGRATION: CWS hsqldb (1.1.2); FILE ADDED

2004/09/10 12:50:09 oj 1.1.2.2: #i33348# code optimizing
2004/09/06 13:34:59 oj 1.1.2.1: #i33348# stream performance
This commit is contained in:
Jens-Heiner Rechtien 2004-11-09 11:05:43 +00:00
parent fe18d97795
commit cf342541d8

View file

@ -0,0 +1,48 @@
/*
* NativeOutputStreamHelper.java
*
* Created on 1. September 2004, 10:39
*/
package com.sun.star.sdbcx.comp.hsqldb;
import com.sun.star.embed.XStorage;
/**
*
* @author oj93728
*/
public class NativeOutputStreamHelper extends java.io.OutputStream{
private String key;
private String file;
XStorage storage;
private StorageNativeOutputStream out;
/** Creates a new instance of NativeOutputStreamHelper */
public NativeOutputStreamHelper(String key,String _file,XStorage _storage) {
file = _file;
storage = _storage;
this.key = key;
out = new StorageNativeOutputStream(file,key);
}
public void write(byte[] b, int off, int len) throws java.io.IOException{
out.write(storage,key,file,b, off, len);
}
public void write(byte[] b) throws java.io.IOException{
out.write(storage,key,file,b);
}
public void close() throws java.io.IOException{
out.close(storage,key,file);
}
public void write(int b) throws java.io.IOException{
out.write(storage,key,file,b);
}
public void flush() throws java.io.IOException{
out.flush(storage,key,file);
}
}