Ejemplo n.º 1
0
  public void getBox(WritableByteChannel os) throws IOException {
    parseDetails();
    for (Box box : boxes) {

      if (os instanceof FileChannel) {
        long startPos = ((FileChannel) os).position();
        box.getBox(os);
        long size = ((FileChannel) os).position() - startPos;
        assert size == box.getSize();
      } else {
        box.getBox(os);
      }
    }
  }
 protected final void writeChildBoxes(ByteBuffer paramByteBuffer) {
   ByteBufferByteChannel localByteBufferByteChannel = new ByteBufferByteChannel(paramByteBuffer);
   Iterator localIterator = this.boxes.iterator();
   while (localIterator.hasNext()) {
     Box localBox = (Box) localIterator.next();
     try {
       localBox.getBox(localByteBufferByteChannel);
     } catch (IOException localIOException) {
       throw new RuntimeException("Cannot happen.", localIOException);
     }
   }
 }