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

    try
    {
      DataOutput output = (DataOutput) mOpenStream;
      output.write(buf, 0, size);
      return size;
    }
    catch (IOException e)
    {
      log.error("Got error writing to file: {}; {}", mOpenStream, e);
      return -1;
    }
  }
public int write ( byte [ ] buf , int size ) { if ( mOpenStream == null || ! ( mOpenStream instanceof DataOutput ) ) return - 1 ; try { DataOutput output = ( DataOutput ) mOpenStream ; output . write ( buf , 0 , size ) ; return size ; } catch ( IOException e ) { log . error ( "Got error writing to file: {}; {}" , mOpenStream , e ) ; return - 1 ; } }
{@inheritDoc}