org.apache.cassandra.io.util

## Interface DataInputPlus

All Superinterfaces:
  java.io.DataInput

All Known Subinterfaces:
  FileDataInput, RewindableDataInput

All Known Implementing Classes:
  ChecksummedDataInput, CompressedChecksummedDataInput, DataInputBuffer, DataInputPlus.DataInputStreamPlus, EncryptedChecksummedDataInput, EncryptedFileSegmentInputStream, FileSegmentInputStream, MemoryInputStream, NIODataInputStream, RandomAccessReader, RebufferingInputStream, RewindableDataInputStreamPlus, TrackedDataInputPlus

    public interface DataInputPlus
    extends java.io.DataInput

Extension to DataInput that provides support for reading varints

### Nested Class Summary

Nested Classes
`static class` `DataInputPlus.DataInputStreamPlus` Wrapper around an InputStream that provides no buffering but can decode varints

### Method Summary

All Methods Instance Methods Abstract Methods Default Methods
`default long` `readUnsignedVInt()` Think hard before opting for an unsigned encoding.
`default long` `readVInt()`
`int` `skipBytes(int n)` Always skips the requested number of bytes, unless EOF is reached
`default void` `skipBytesFully(int n)`

### Methods inherited from interface java.io.DataInput

`readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF`

### Method Detail

#### readVInt

    default long readVInt()
                   throws java.io.IOException

Throws:
  `java.io.IOException`

#### readUnsignedVInt

    default long readUnsignedVInt()
                           throws java.io.IOException

Think hard before opting for an unsigned encoding. Is this going to bite someone because some day they might need to pass in a sentinel value using negative numbers? Is the risk worth it to save a few bytes? Signed, not a fan of unsigned values in protocols and formats

Throws:
  `java.io.IOException`

#### skipBytes

    int skipBytes(int n)
           throws java.io.IOException

Always skips the requested number of bytes, unless EOF is reached

Specified by:
  `skipBytes` in interface `java.io.DataInput`
Parameters:
  `n` - number of bytes to skip
Returns:
  number of bytes skipped
Throws:
  `java.io.IOException`

#### skipBytesFully

    default void skipBytesFully(int n)
                         throws java.io.IOException

Throws:
  `java.io.IOException`