Class DataReaderFactory.DataReaderWithStats<T>

    • Field Detail

      • nanos

        public long nanos
    • Constructor Detail

      • DataReaderWithStats

        public DataReaderWithStats​(DataReader<T> delegate)
    • Method Detail

      • readData

        public T readData()
                   throws IOException
        Description copied from interface: DataReader
        Read a single object
        Specified by:
        readData in interface DataReader<T>
        Returns:
        an object or a primitive value read
        Throws:
        IOException - as per java IO contract
      • readDataArray

        public T readDataArray​(int length)
                        throws IOException
        Description copied from interface: DataReader
        Read an array of specified length. Normally this is a byte array. The intent here is optimization: reading an array may be faster than reading elements one by one.
        Specified by:
        readDataArray in interface DataReader<T>
        Parameters:
        length - the length of the array to be read
        Returns:
        the array of objects
        Throws:
        IOException - as per java IO contract