RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
Index.java
1package com.osroyale.fs.cache;
2
3import com.osroyale.fs.util.ByteBufferUtil;
4
5import java.nio.ByteBuffer;
6
43
44public final class Index {
45
47 private final int length;
48
50 private final int id;
51
60 private Index(int length, int id) {
61 this.length = length;
62 this.id = id;
63 }
64
71 public static Index decode(ByteBuffer buffer) {
72 int length = ByteBufferUtil.getMedium(buffer);
73 int id = ByteBufferUtil.getMedium(buffer);
74 return new Index(length, id);
75 }
76
78 public int getId() {
79 return id;
80 }
81
83 public int getLength() {
84 return length;
85 }
86
88 public boolean check() {
89 return length > 0;
90 }
91
92}
static Index decode(ByteBuffer buffer)
Definition Index.java:71