コード例 #1
0
ファイル: IsoFile.java プロジェクト: klhurley/mp4parser
  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);
      }
    }
  }
コード例 #2
0
 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);
     }
   }
 }