Ejemplo n.º 1
0
 void writeToStream(OutputStream outputStream) throws IOException {
   @SuppressWarnings("resource")
   LittleEndianDataOutputStream stream = new LittleEndianDataOutputStream(outputStream);
   stream.writeInt(mScreenshot);
   stream.writeLong(mHandle);
   stream.writeByte((byte) (mCaption.length()));
   stream.writeChars(mCaption);
 }
 private void fillChunk(byte[] b, int off, int len) {
   try {
     cursor.write(dataOutputStream);
     dataOutputStream.write(b, off, len);
     cursor.setDocSize(0);
     cursor.setNextBlock(Integer.MAX_VALUE);
     onFillBlock();
   } catch (IOException e) {
     throw new RuntimeException("Can't write readed data");
   }
 }