protected void doWrite(ByteBuffer out) { for (Box box : boxes) { box.write(out); } }
protected void doWrite(ByteBuffer out) { for (Box box : boxes) { box.write(out); } }
protected void doWrite(ByteBuffer out) { for (Box box : boxes) { box.write(out); } }
public static ByteBuffer writeBox(Box box, int approxSize) { ByteBuffer buf = ByteBuffer.allocate(approxSize); box.write(buf); buf.flip(); return buf; } }
public static ByteBuffer writeBox(Box box, int approxSize) { ByteBuffer buf = ByteBuffer.allocate(approxSize); box.write(buf); buf.flip(); return buf; } }
public static ByteBuffer writeBox(Box box, int approxSize) { ByteBuffer buf = ByteBuffer.allocate(approxSize); box.write(buf); buf.flip(); return buf; } }
protected void doWrite(ByteBuffer out) { for (Entry<Integer, List<Box>> entry : values.entrySet()) { ByteBuffer fork = out.duplicate(); out.putInt(0); out.putInt(entry.getKey()); for (Box box : entry.getValue()) { box.write(out); } fork.putInt(out.position() - fork.position()); } }
public static Box doCloneBox(Box box, int approxSize, IBoxFactory bf) { ByteBuffer buf = ByteBuffer.allocate(approxSize); box.write(buf); buf.flip(); return parseChildBox(buf, bf); }
private boolean rewriteBox(ByteBuffer buffer, Box box) { try { buffer.clear(); box.write(buffer); if (buffer.hasRemaining()) { if (buffer.remaining() < 8) return false; buffer.putInt(buffer.remaining()); buffer.put(new byte[] { 'f', 'r', 'e', 'e' }); } buffer.flip(); return true; } catch (BufferOverflowException e) { return false; } }
public static Box cloneBox(Box box, int approxSize, BoxFactory bf) { ByteBuffer buf = ByteBuffer.allocate(approxSize); box.write(buf); buf.flip(); return NodeBox.parseChildBox(buf, bf); }
public static Box cloneBox(Box box, int approxSize, BoxFactory bf) { ByteBuffer buf = ByteBuffer.allocate(approxSize); box.write(buf); buf.flip(); return NodeBox.parseChildBox(buf, bf); }