Removed useless caching functionality
This commit is contained in:
parent
5d8bcb9cb1
commit
9c6e58d5dd
6 changed files with 8 additions and 157 deletions
|
|
@ -1,9 +1,5 @@
|
|||
package pl.jakubweg;
|
||||
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.RandomAccessFile;
|
||||
|
||||
public class SponsorSegment implements Comparable<SponsorSegment> {
|
||||
public final long start;
|
||||
public final long end;
|
||||
|
|
@ -17,15 +13,6 @@ public class SponsorSegment implements Comparable<SponsorSegment> {
|
|||
this.UUID = UUID;
|
||||
}
|
||||
|
||||
public static SponsorSegment readFrom(RandomAccessFile stream) throws IOException {
|
||||
long start = stream.readLong();
|
||||
long end = stream.readLong();
|
||||
String categoryName = stream.readUTF();
|
||||
String UUID = stream.readUTF();
|
||||
SponsorBlockSettings.SegmentInfo category = SponsorBlockSettings.SegmentInfo.valueOf(categoryName);
|
||||
return new SponsorSegment(start, end, category, UUID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SegmentInfo{" +
|
||||
|
|
@ -40,10 +27,4 @@ public class SponsorSegment implements Comparable<SponsorSegment> {
|
|||
return (int) (this.start - o.start);
|
||||
}
|
||||
|
||||
public void writeTo(DataOutputStream stream) throws IOException {
|
||||
stream.writeLong(start);
|
||||
stream.writeLong(end);
|
||||
stream.writeUTF(category.name());
|
||||
stream.writeUTF(UUID);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue