Class DataInputUtil


  • public final class DataInputUtil
    extends java.lang.Object
    A util class for DataInput.
    • Constructor Summary

      Constructors 
      Constructor Description
      DataInputUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void skipFully​(java.io.DataInput in, int skippedBytes)
      Skips requested number of bytes, throws EOFException if there is too few bytes in the DataInput.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DataInputUtil

        public DataInputUtil()
    • Method Detail

      • skipFully

        public static void skipFully​(java.io.DataInput in,
                                     int skippedBytes)
                              throws java.io.IOException
        Skips requested number of bytes, throws EOFException if there is too few bytes in the DataInput.
        Parameters:
        in - DataInput to be skipped.
        skippedBytes - number of bytes to skip. if skippedBytes <= zero, do nothing.
        Throws:
        java.io.EOFException - if EOF meets before requested number of bytes are skipped.
        java.io.IOException - if IOException occurs. It doesn't contain EOFException.
        java.lang.NullPointerException - if the param 'in' equals null.