code: @Override
      public void write(int byteValue, int streamPosition) {
          Preconditions.checkElementIndex(streamPosition, this.buf.length, "streamPosition");
          this.buf[streamPosition] = (byte) byteValue;
      }
docs: region RandomAccessOutputStream Implementation