/** Opens an input random access file */ public RandomDataInput openFileRandom(String filename) throws IOException { return new LocalRandomAccessFile(normalise(filename), "r"); }
/** * {@inheritDoc} */ public void close() throws IOException { dataFile.close(); }
@Override public final int read(final byte[] b) throws IOException { return read(b, 0, b.length); }
/** * load compressed file into memory * @param filename * @throws IOException */ public BitFileInMemoryLarge(String filename) throws IOException { this(new RandomDataInputMemory(filename)); }
/** * {@inheritDoc} */ public void close() throws IOException { rdim.close(); }
protected void openNewFile() throws Exception { if (is instanceof CountingInputStream) br = (CountingInputStream) is; else br = new CountingInputStream(is); }
/** Make a WrappedIOException with the specified message and cause */ public WrappedIOException(final String message, final Throwable e) { super(message); this.initCause(e); } }
@Override public final long skip(long n) throws IOException { seek(pos + n); return n; }
/** Construct a new RandomDataInputMemory object, backed by the specified buffer */ public RandomDataInputMemory(DataInputStream in, long length) throws IOException { super(getSeekable(in, length)); buf = (Seekable)super.in; }
/** Construct a new RandomDataInputMemory object, backed by the specified buffer */ public RandomDataInputMemory(byte[] b) { super(new SeeakableByteArrayInputStream(b)); buf = (Seekable)super.in; }
/** Opens a writable random access file */ public RandomDataOutput writeFileRandom(String filename) throws IOException { return new LocalRandomAccessFile(normalise(filename), "rw"); }
public void close() throws IOException { lexIdFile.close(); } }
/** Make a WrappedIOException with the specified cause */ public WrappedIOException(final Throwable e) { super(); this.initCause(e); }
/** Opens an input random access file */ public RandomDataInput openFileRandom(String filename) throws IOException { return new LocalRandomAccessFile(normalise(filename), "r"); }
public final void close() throws IOException { dataSource.close(); } }
/** Opens a writable random access file */ public RandomDataOutput writeFileRandom(String filename) throws IOException { return new LocalRandomAccessFile(normalise(filename), "rw"); }
public void close() throws IOException { lexIdFile.close(); } }