@Override public int read(byte[] b, int off, int len) throws IOException { return read(ByteBuffer.wrap(b, off, len)); }
@Override public int read() throws IOException { /* Allocation can be removed if required. * probably no need to optimize or encourage single byte read. */ byte[] buf = new byte[1]; int ret = read(buf, 0, 1); if (ret > 0) { return (int)(buf[0] & 0xff); } if (ret != -1) { // unexpected throw new IOException("Could not read from stream"); } return ret; }
@Override public int read(byte[] b, int off, int len) throws IOException { return read(ByteBuffer.wrap(b, off, len)); }
public int read(byte[] b, int off, int len) throws IOException { return read(ByteBuffer.wrap(b, off, len)); }
@Override public int read() throws IOException { /* Allocation can be removed if required. * probably no need to optimize or encourage single byte read. */ byte[] buf = new byte[1]; if (read(buf, 0, 1) > 0) { return (byte)buf[0]; } throw new IOException("Could not read from stream"); }
@Override public int read(byte[] b, int off, int len) throws IOException { return read(ByteBuffer.wrap(b, off, len)); }
@Override public int read(byte[] b, int off, int len) throws IOException { return read(ByteBuffer.wrap(b, off, len)); }
@Override public int read(byte[] b, int off, int len) throws IOException { return read(ByteBuffer.wrap(b, off, len)); }
@Override public int read() throws IOException { /* Allocation can be removed if required. * probably no need to optimize or encourage single byte read. */ byte[] buf = new byte[1]; int ret = read(buf, 0, 1); if (ret > 0) { return (int)(buf[0] & 0xff); } if (ret != -1) { // unexpected throw new IOException("Could not read from stream"); } return ret; }
public int read(byte[] b, int off, int len) throws IOException { return read(ByteBuffer.wrap(b, off, len)); }
@Override public int read() throws IOException { /* Allocation can be removed if required. * probably no need to optimize or encourage single byte read. */ byte[] buf = new byte[1]; int ret = read(buf, 0, 1); if (ret > 0) { return (int)(buf[0] & 0xff); } if (ret != -1) { // unexpected throw new IOException("Could not read from stream"); } return ret; }
@Override public int read() throws IOException { /* Allocation can be removed if required. * probably no need to optimize or encourage single byte read. */ byte[] buf = new byte[1]; int ret = read(buf, 0, 1); if (ret > 0) { return (int)(buf[0] & 0xff); } if (ret != -1) { // unexpected throw new IOException("Could not read from stream"); } return ret; }
@Override public int read() throws IOException { /* Allocation can be removed if required. * probably no need to optimize or encourage single byte read. */ byte[] buf = new byte[1]; int ret = read(buf, 0, 1); if (ret > 0) { return (int)(buf[0] & 0xff); } if (ret != -1) { // unexpected throw new IOException("Could not read from stream"); } return ret; }
@Override public int read() throws IOException { /* Allocation can be removed if required. * probably no need to optimize or encourage single byte read. */ byte[] buf = new byte[1]; int ret = read(buf, 0, 1); if (ret > 0) { return (byte)buf[0]; } if (ret != -1) { // unexpected throw new IOException("Could not read from stream"); } return ret; }