code: public int skipBytes(int length) throws IOException {
          // To be used with available. Ok to call if reading primitive buffer
          if (input == null) {
              throw new NullPointerException("source stream is null");
          }
  
          int offset = 0;
          while (offset < length) {
              checkReadPrimitiveTypes();
              long skipped = primitiveData.skip(length - offset);
              if (skipped == 0) {
                  return offset;
              }
              offset += (int) skipped;
          }
          return length;
      }
docs: Skips {@code length} bytes on the source stream. This method should not
  be used to skip bytes at any arbitrary position, just when reading
  primitive data types (int, char etc).
  
  @param length
  the number of bytes to skip.
  @return the number of bytes actually skipped.
  @throws IOException
  if an error occurs while skipping bytes on the source stream.
  @throws NullPointerException
  if the source stream is {@code null}.