org.xwt.mips -> org.ibex.nestedvm
[nestedvm.git] / src / org / xwt / mips / util / SeekableFile.java
diff --git a/src/org/xwt/mips/util/SeekableFile.java b/src/org/xwt/mips/util/SeekableFile.java
deleted file mode 100644 (file)
index 168d43a..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-package org.xwt.mips.util;
-
-import java.io.*;
-
-public class SeekableFile implements SeekableData {
-    private final RandomAccessFile raf;
-    
-    public SeekableFile(String fileName) throws IOException { this(fileName,false); }
-    public SeekableFile(String fileName, boolean writable) throws IOException { this(new File(fileName),writable); }    
-    
-    public SeekableFile(File file, boolean writable) throws IOException {
-        raf = new RandomAccessFile(file,writable ? "rw" : "r");
-    }
-    
-    // NOTE: RandomAccessFile.setLength() is a Java2 function
-    public void setLength(int n) throws IOException { raf.setLength(n); }
-    
-    public int read(byte[] buf, int offset, int length) throws IOException { return raf.read(buf,offset,length); }
-    public int write(byte[] buf, int offset, int length) throws IOException { raf.write(buf,offset,length); return length; }
-    public void seek(int pos) throws IOException{ raf.seek(pos); }
-    public int pos()  throws IOException { return (int) raf.getFilePointer(); }
-    public int length() throws IOException { return (int)raf.length(); }
-    public void close() throws IOException { raf.close(); }
-}