begin working on bencode implementation

This commit is contained in:
mykola2312 2024-10-13 04:34:43 +03:00
parent 9633383a99
commit 76f642f8c8
2 changed files with 31 additions and 0 deletions

View file

@ -0,0 +1,8 @@
package com.mykola2312.retracker.bencode;
public enum BType {
INTEGER,
LIST,
DICT,
STRING
}

View file

@ -0,0 +1,23 @@
package com.mykola2312.retracker.bencode;
abstract public class BValue {
private BType type;
private BValue next = null;
private BValue child = null;
protected BValue(BType type) {
this.type = type;
}
public BType getType() {
return type;
}
public BValue getNext() {
return next;
}
public BValue getChild() {
return child;
}
}