Archived
0

избавляемся от странного кода

This commit is contained in:
2019-01-27 01:05:51 +03:00
parent 5dad2242b6
commit 0a833fb715
4 changed files with 20 additions and 12 deletions

View File

@@ -2,10 +2,11 @@ package mc.core.network;
import lombok.Getter;
import lombok.Setter;
import org.jetbrains.annotations.NotNull;
import java.io.IOException;
import java.io.InputStream;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicInteger;
public abstract class NetInputStream extends InputStream {
@Getter
@@ -23,7 +24,7 @@ public abstract class NetInputStream extends InputStream {
public abstract short readShort();
public abstract int readInt();
public abstract int readVarInt();
public abstract int readVarInt(int[] countReadBytes);
public abstract int readVarInt(AtomicInteger countReadBytes);
public abstract long readLong();
public abstract float readFloat();
public abstract double readDouble();
@@ -33,22 +34,22 @@ public abstract class NetInputStream extends InputStream {
public abstract void skipBytes(int count);
@Override
public int read() throws IOException {
public int read() {
return readByte();
}
@Override
public int read(byte[] b) throws IOException {
public int read(@NotNull byte[] b) {
return readBytes(b);
}
@Override
public int read(byte[] b, int off, int len) throws IOException {
public int read(@NotNull byte[] b, int off, int len) {
return readBytes(b, off, len);
}
@Override
public long skip(long n) throws IOException {
public long skip(long n) {
skipBytes((int) n);
return n;
}