public void write(byte[] buffer,int offset,int length) throws IOException {
  OutputStream os=getOutputStream();
  for (; length > 0x8000; length-=0x8000) {
    os.write('D');
    os.write(0x80);
    os.write(0x00);
    os.write(buffer,offset,0x8000);
    offset+=0x8000;
  }
  os.write('D');
  os.write(length >> 8);
  os.write(length);
  os.write(buffer,offset,length);
}

public void write ( byte [ ] buffer , int offset , int length ) throws IOException { OutputStream os = getOutputStream ( ) ; for ( ; length > 0x8000 ; length -= 0x8000 ) { os . write ( 'D' ) ; os . write ( 0x80 ) ; os . write ( 0x00 ) ; os . write ( buffer , offset , 0x8000 ) ; offset += 0x8000 ; } os . write ( 'D' ) ; os . write ( length > > 8 ) ; os . write ( length ) ; os . write ( buffer , offset , length ) ; }
writes data to the output stream .
