platform/bb/RubyVM/src/com/rho/file/SimpleFile.java in rhodes-3.3.3.beta.4 vs platform/bb/RubyVM/src/com/rho/file/SimpleFile.java in rhodes-3.3.3

- old
+ new

@@ -31,11 +31,11 @@ import java.io.OutputStream; /** * Interface of simple file. Simple file can be automaticaslly opened by database given file path and access mode. */ -public interface SimpleFile extends IFile { +public interface SimpleFile {// extends IFile { /** * Open the file * @param path path to the file * @param readOnly if file is readonly * @param noFlush whther synchronous flush is needed @@ -71,6 +71,32 @@ public abstract InputStream getResourceAsStream(Class fromClass, String path); public abstract void renameOverwrite(String oldName, String newName); public abstract void copyJarFileToMemory(String strFileName, InputStream jarStream)throws IOException; + + void write(long pos, byte[] buf)throws IOException; + + /** + * Read data from the file + * @param pos offset in the file + * @param buf array to receive readen data (size is always equal to database page size) + * @return number of bytes actually readen + */ + int read(long pos, byte[] buf)throws IOException; + + /** + * Flush all fiels changes to the disk + */ + void sync()throws IOException; + + /** + * Close file + */ + void close()throws IOException; + + /** + * Length of the file + */ + //long length(); + }