begin working on bencode implementation
This commit is contained in:
parent
9633383a99
commit
76f642f8c8
2 changed files with 31 additions and 0 deletions
|
|
@ -0,0 +1,8 @@
|
||||||
|
package com.mykola2312.retracker.bencode;
|
||||||
|
|
||||||
|
public enum BType {
|
||||||
|
INTEGER,
|
||||||
|
LIST,
|
||||||
|
DICT,
|
||||||
|
STRING
|
||||||
|
}
|
||||||
23
src/main/java/com/mykola2312/retracker/bencode/BValue.java
Normal file
23
src/main/java/com/mykola2312/retracker/bencode/BValue.java
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue