public long tell() throws IOException { try { return raf.getFilePointer(); } catch (IOException e) { PortableFileSystem.processIOException(e); throw e; //unreachable } }
void close() throws IOException { try { os.close(); } catch (IOException e) { PortableFileSystem.processIOException(e); } } }
public void write(byte[] b) throws IOException { try { raf.write(b); } catch (IOException e) { PortableFileSystem.processIOException(e); } }
void close() throws IOException { try { is.close(); } catch (IOException e) { PortableFileSystem.processIOException(e); } } }
public void seek(long pos) throws IOException { try { raf.seek(pos); } catch (IOException e) { PortableFileSystem.processIOException(e); } }
void close() throws IOException { try { raf.close(); } catch (IOException e) { PortableFileSystem.processIOException(e); } } }
public void putc(byte b) throws IOException { try { os.write(b); } catch (IOException e) { PortableFileSystem.processIOException(e); } finally { os.flush(); } }
public byte getc() throws IOException { int read; try { read = is.read(); } catch (IOException e) { PortableFileSystem.processIOException(e); throw e; //unreachable } if (read == -1) { throw new IOException("EOF"); } return (byte)read; }
public void write(byte[] b) throws IOException { try { os.write(b); } catch (IOException e) { PortableFileSystem.processIOException(e); } finally { os.flush(); } }
public byte[] read(int n) throws IOException { int read; byte[] bytes; try { bytes = new byte[n]; read = is.read(bytes); } catch (IOException e) { PortableFileSystem.processIOException(e); throw e; //unreachable } if (read == -1) { throw new IOException("EOF"); } return Arrays.copyOfRange(bytes, 0, read); }
public byte[] read(int n) throws IOException { int read; byte[] bytes; try { bytes = new byte[n]; read = raf.read(bytes); } catch (IOException e) { PortableFileSystem.processIOException(e); throw e; //unreachable } if (read == -1) { throw new IOException("EOF"); } return Arrays.copyOfRange(bytes, 0, read); }
public void putc(byte b) throws IOException { try { raf.writeByte(b); } catch (IOException e) { PortableFileSystem.processIOException(e); } }
public byte getc() throws IOException { try { return raf.readByte(); } catch (IOException e) { PortableFileSystem.processIOException(e); throw e; //unreachable } }