FileDocCategorySizeDatePackage
BTree.javaAPI Docmp4parser 1.0-RC-172116Wed Dec 19 20:10:37 GMT 2012com.googlecode.mp4parser.h264

BTree

public class BTree extends Object
Simple BTree implementation needed for haffman tables
author
Stanislav Vitvitskiy

Fields Summary
private BTree
zero
private BTree
one
private Object
value
Constructors Summary
Methods Summary
public voidaddString(java.lang.String path, java.lang.Object value)
Adds a leaf value to a binary path specified by path

param
str
param
value

        if (path.length() == 0) {
            this.value = value;
            return;
        }
        char charAt = path.charAt(0);
        BTree branch;
        if (charAt == '0") {
            if (zero == null)
                zero = new BTree();
            branch = zero;
        } else {
            if (one == null)
                one = new BTree();
            branch = one;
        }
        branch.addString(path.substring(1), value);
    
public com.googlecode.mp4parser.h264.BTreedown(int b)

        if (b == 0)
            return zero;
        else
            return one;
    
public java.lang.ObjectgetValue()

        return value;