public int read() throws IOException { return input.read(); }
public int read(byte b[], int off, int len) throws IOException { return input.read(b, off, len); }
public byte readByte() throws IOException { int ch=read(); if (ch < 0) throw new EOFException(); return (byte)(ch); }
public boolean readBoolean() throws IOException { int ch=read(); if(ch < 0) throw new EOFException(); return ch != 0; }
public int readUnsignedByte() throws IOException { int ch=read(); if (ch < 0) throw new EOFException(); return ch; }
public void readFully(byte[] b, int off, int len) throws IOException { if (len < 0) throw new IndexOutOfBoundsException(); int n = 0; while (n < len) { int count=read(b, off + n, len - n); if (count < 0) throw new EOFException(); n += count; } }
public String readLine() throws IOException { StringBuilder sb=new StringBuilder(35); int ch; while(true) { ch=read(); if(ch == -1) return sb.length() == 0? null : sb.toString(); if(ch == '\r') ; else { if(ch == '\n') break; sb.append((char)ch); } } return sb.toString(); }
public byte readByte() throws IOException { int ch=read(); if (ch < 0) throw new EOFException(); return (byte)(ch); }
public boolean readBoolean() throws IOException { int ch=read(); if(ch < 0) throw new EOFException(); return ch != 0; }
public int readUnsignedByte() throws IOException { int ch=read(); if (ch < 0) throw new EOFException(); return ch; }
public void readFully(byte[] b, int off, int len) throws IOException { if (len < 0) throw new IndexOutOfBoundsException(); int n = 0; while (n < len) { int count=read(b, off + n, len - n); if (count < 0) throw new EOFException(); n += count; } }