1*c3ab0d6aSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*c3ab0d6aSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*c3ab0d6aSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*c3ab0d6aSAndrew Rist * distributed with this work for additional information 6*c3ab0d6aSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*c3ab0d6aSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*c3ab0d6aSAndrew Rist * "License"); you may not use this file except in compliance 9*c3ab0d6aSAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*c3ab0d6aSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*c3ab0d6aSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*c3ab0d6aSAndrew Rist * software distributed under the License is distributed on an 15*c3ab0d6aSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*c3ab0d6aSAndrew Rist * KIND, either express or implied. See the License for the 17*c3ab0d6aSAndrew Rist * specific language governing permissions and limitations 18*c3ab0d6aSAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*c3ab0d6aSAndrew Rist *************************************************************/ 21*c3ab0d6aSAndrew Rist 22*c3ab0d6aSAndrew Rist 23cdf0e10cSrcweir /* 24cdf0e10cSrcweir * StorageNativeInputStream.java 25cdf0e10cSrcweir * 26cdf0e10cSrcweir * Created on 9. September 2004, 11:52 27cdf0e10cSrcweir */ 28cdf0e10cSrcweir 29cdf0e10cSrcweir package com.sun.star.sdbcx.comp.hsqldb; 30cdf0e10cSrcweir 31cdf0e10cSrcweir /** 32cdf0e10cSrcweir * 33cdf0e10cSrcweir * @author Ocke 34cdf0e10cSrcweir */ 35cdf0e10cSrcweir public class StorageNativeInputStream { NativeLibraries.load()36cdf0e10cSrcweir static { NativeLibraries.load(); } 37cdf0e10cSrcweir 38cdf0e10cSrcweir /** Creates a new instance of StorageNativeInputStream */ StorageNativeInputStream(String key,String _file)39cdf0e10cSrcweir public StorageNativeInputStream(String key,String _file) { 40cdf0e10cSrcweir openStream(key,_file, NativeStorageAccess.READ); 41cdf0e10cSrcweir } openStream(String key,String name, int mode)42cdf0e10cSrcweir public native void openStream(String key,String name, int mode); read(String key,String name)43cdf0e10cSrcweir public native int read(String key,String name) throws java.io.IOException; read(String key,String name,byte[] b, int off, int len)44cdf0e10cSrcweir public native int read(String key,String name,byte[] b, int off, int len) throws java.io.IOException; close(String key,String name)45cdf0e10cSrcweir public native void close(String key,String name) throws java.io.IOException; skip(String key,String name,long n)46cdf0e10cSrcweir public native long skip(String key,String name,long n) throws java.io.IOException; available(String key,String name)47cdf0e10cSrcweir public native int available(String key,String name) throws java.io.IOException; read(String key,String name,byte[] b)48cdf0e10cSrcweir public native int read(String key,String name,byte[] b) throws java.io.IOException; 49cdf0e10cSrcweir } 50