FileDocCategorySizeDatePackage
IsoTypeWriterVariable.javaAPI Docmp4parser 1.0-RC-171471Wed Dec 19 20:10:38 GMT 2012com.coremedia.iso

IsoTypeWriterVariable

public final class IsoTypeWriterVariable extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidwrite(long v, java.nio.ByteBuffer bb, int bytes)

        switch (bytes) {
            case 1:
                IsoTypeWriter.writeUInt8(bb, (int) (v & 0xff));
                break;
            case 2:
                IsoTypeWriter.writeUInt16(bb, (int) (v & 0xffff));
                break;
            case 3:
                IsoTypeWriter.writeUInt24(bb, (int) (v & 0xffffff));
                break;
            case 4:
                IsoTypeWriter.writeUInt32(bb, v);
                break;
            case 8:
                IsoTypeWriter.writeUInt64(bb, v);
                break;
            default:
                throw new RuntimeException("I don't know how to read " + bytes + " bytes");
        }