code: public int read() throws IOException
     {
        if (position > endRange)
        {
           return -1;
        }
  
        int curReaded = nativeInputStream.read();
        if (curReaded >= 0)
        {
           position++;
        }
        return curReaded;
     }
docs: {@inheritDoc}