public int read(byte[] buf, int size)
  {
    int ret = -1;
    if (mOpenStream == null || !(mOpenStream instanceof InputStream))
      return -1;

    try
    {
      InputStream stream = (InputStream) mOpenStream;
      ret = stream.read(buf, 0, size);
      return ret;
    }
    catch (IOException e)
    {
      log.error("Got IO exception reading from stream: {}; {}",
          mOpenStream, e);
      return -1;
    }
  }
public int read(byte[] buf, int size)
  {
    int ret = -1;
    if (mOpenStream == null || !(mOpenStream instanceof InputStream))
      return -1;

    try
    {
      InputStream stream = (InputStream) mOpenStream;
      ret = stream.read(buf, 0, size);
      return ret;
    }
    catch (IOException e)
    {
      log.error("Got IO exception reading from stream: {}; {}",
          mOpenStream, e);
      return -1;
    }
  }
public int read ( byte [ ] buf , int size ) { int ret = - 1 ; if ( mOpenStream == null || ! ( mOpenStream instanceof InputStream ) ) return - 1 ; try { InputStream stream = ( InputStream ) mOpenStream ; ret = stream . read ( buf , 0 , size ) ; return ret ; } catch ( IOException e ) { log . error ( "Got IO exception reading from stream: {}; {}" , mOpenStream , e ) ; return - 1 ; } }
{@inheritDoc}
{