docs: public void expect(byte[] out) throws IOException {
          int i, off = 0;
          while (off < out.length && (i = in.read(out, off, out.length - off)) > 0) {
              off += i;
          }
          if (off < out.length) {
              throw new IOException("Not enough data available on stream: " + off + " < " + out.length);
          }
      }