Tag: cws_src680_hsqldb2 User: oj Date: 05/01/28 04:21:09 Modified: /dba/connectivity/com/sun/star/sdbcx/comp/hsqldb/ NativeOutputStreamHelper.java, StorageAccess.java, StorageFileAccess.java, StorageNativeOutputStream.java
Log: #i39922# new interfaces in hsqldb File Changes: Directory: /dba/connectivity/com/sun/star/sdbcx/comp/hsqldb/ ============================================================ File [changed]: NativeOutputStreamHelper.java Url: http://dba.openoffice.org/source/browse/dba/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeOutputStreamHelper.java?r1=1.2.20.1&r2=1.2.20.2 Delta lines: +7 -9 ------------------- --- NativeOutputStreamHelper.java 26 Jan 2005 09:05:06 -0000 1.2.20.1 +++ NativeOutputStreamHelper.java 28 Jan 2005 12:21:05 -0000 1.2.20.2 @@ -15,37 +15,35 @@ 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) { + public NativeOutputStreamHelper(String key,String _file) { 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); + out.write(key,file,b, off, len); } public void write(byte[] b) throws java.io.IOException{ - out.write(storage,key,file,b); + out.write(key,file,b); } public void close() throws java.io.IOException{ - out.close(storage,key,file); + out.close(key,file); } public void write(int b) throws java.io.IOException{ - out.write(storage,key,file,b); + out.write(key,file,b); } public void flush() throws java.io.IOException{ - out.flush(storage,key,file); + out.flush(key,file); } public void sync() throws java.io.IOException{ - out.sync(storage,key,file); + out.sync(key,file); } } File [changed]: StorageAccess.java Url: http://dba.openoffice.org/source/browse/dba/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageAccess.java?r1=1.2.20.1&r2=1.2.20.2 Delta lines: +4 -4 ------------------- --- StorageAccess.java 26 Jan 2005 09:05:06 -0000 1.2.20.1 +++ StorageAccess.java 28 Jan 2005 12:21:05 -0000 1.2.20.2 @@ -2,9 +2,9 @@ * * $RCSfile: StorageAccess.java,v $ * - * $Revision: 1.2.20.1 $ + * $Revision: 1.2.20.2 $ * - * last change: $Author: oj $ $Date: 2005/01/26 09:05:06 $ + * last change: $Author: oj $ $Date: 2005/01/28 12:21:05 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -190,8 +190,8 @@ // fredt - minor change of brackets public long readLong() throws java.io.IOException { - return ((long)(readInt()) << 32) + (readInt() & 0xFFFFFFFFL); - // return (((long) readInt()) << 32) + (((long) readInt()) & 0xFFFFFFFFL); + // return ((long)(readInt()) << 32) + (readInt() & 0xFFFFFFFFL); + return (((long) readInt()) << 32) + (((long) readInt()) & 0xFFFFFFFFL); } public boolean wasNio() { File [changed]: StorageFileAccess.java Url: http://dba.openoffice.org/source/browse/dba/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageFileAccess.java?r1=1.3.2.1&r2=1.3.2.2 Delta lines: +1 -2 ------------------- --- StorageFileAccess.java 26 Jan 2005 09:05:07 -0000 1.3.2.1 +++ StorageFileAccess.java 28 Jan 2005 12:21:05 -0000 1.3.2.2 @@ -84,7 +84,6 @@ // load shared library for JNI code NativeLibraryLoader.loadLibrary(StorageNativeOutputStream.class.getClassLoader(), "hsqldb2"); } - XStorage storage; String ds_name; String key; /** Creates a new instance of StorageFileAccess */ @@ -104,7 +103,7 @@ } public java.io.OutputStream openOutputStreamElement(java.lang.String streamName) throws java.io.IOException { - return new NativeOutputStreamHelper(key,streamName,storage); + return new NativeOutputStreamHelper(key,streamName); } public void removeElement(java.lang.String filename) throws java.util.NoSuchElementException, java.io.IOException { File [changed]: StorageNativeOutputStream.java Url: http://dba.openoffice.org/source/browse/dba/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageNativeOutputStream.java?r1=1.3.2.1&r2=1.3.2.2 Delta lines: +7 -7 ------------------- --- StorageNativeOutputStream.java 26 Jan 2005 09:05:07 -0000 1.3.2.1 +++ StorageNativeOutputStream.java 28 Jan 2005 12:21:06 -0000 1.3.2.2 @@ -32,7 +32,7 @@ public StorageNativeOutputStream(String _name,Object _key) { name = _name; key = _key; - openStream(name, (String)key, ElementModes.WRITE); + openStream(name, (String)key, ElementModes.WRITE | ElementModes.TRUNCATE); } public native void openStream(String name,String key, int mode); @@ -65,7 +65,7 @@ * an <code>IOException</code> is thrown if the output * stream is closed. */ - public native void write(XStorage storage,String key,String _file,byte[] b, int off, int len) throws java.io.IOException; + public native void write(String key,String _file,byte[] b, int off, int len) throws java.io.IOException; /** * Writes <code>b.length</code> bytes from the specified byte array @@ -77,7 +77,7 @@ * @exception IOException if an I/O error occurs. * @see java.io.OutputStream#write(byte[], int, int) */ - public native void write(XStorage storage,String key,String _file,byte[] b) throws java.io.IOException; + public native void write(String key,String _file,byte[] b) throws java.io.IOException; /** * Closes this output stream and releases any system resources @@ -91,7 +91,7 @@ * * @exception IOException if an I/O error occurs. */ - public native void close(XStorage storage,String key,String _file) throws java.io.IOException; + public native void close(String key,String _file) throws java.io.IOException; /** * Writes the specified byte to this output stream. The general @@ -110,7 +110,7 @@ * an <code>IOException</code> may be thrown if the * output stream has been closed. */ - public native void write(XStorage storage,String key,String _file,int b) throws java.io.IOException; + public native void write(String key,String _file,int b) throws java.io.IOException; /** * Flushes this output stream and forces any buffered output bytes @@ -126,7 +126,7 @@ * * @exception IOException if an I/O error occurs. */ - public native void flush(XStorage storage,String key,String _file) throws java.io.IOException; + public native void flush(String key,String _file) throws java.io.IOException; /** * Force all system buffers to synchronize with the underlying @@ -150,6 +150,6 @@ * or because the system cannot guarantee that all the * buffers have been synchronized with physical media. */ - public native void sync(XStorage storage,String key,String _file) throws java.io.IOException; + public native void sync(String key,String _file) throws java.io.IOException; } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
