docs: public void readAll(byte[] buf, int offset, int len) throws IOException
      {
          int rem = len;
          while (rem > 0)
          {
              int amount = read(buf, offset, rem);
              if (amount <= 0)
              {
                  throwUnexpectedEOFException();
              }
              rem -= amount;
              offset += amount;
          }
      }