data-generator/data-generator-runtime/src/main/java/it/cavallium/buffer/BufDataInput.java

44 lines
868 B
Java
Raw Normal View History

2023-03-03 00:13:36 +01:00
package it.cavallium.buffer;
import it.cavallium.stream.SafeByteArrayInputStream;
import it.cavallium.stream.SafeDataInputStream;
import org.jetbrains.annotations.NotNull;
public class BufDataInput extends SafeDataInputStream {
/**
* Creates a DataInputStream that uses the specified underlying InputStream.
*
* @param in the specified input stream
*/
private BufDataInput(@NotNull SafeByteArrayInputStream in) {
super(in);
}
public static BufDataInput create(Buf byteList) {
return new BufDataInput(byteList.binaryInputStream());
}
@Deprecated
@Override
public void close() {
2023-04-19 17:52:59 +02:00
super.close();
2023-03-03 00:13:36 +01:00
}
@Override
public void mark(int readlimit) {
throw new UnsupportedOperationException();
}
@Override
public void reset() {
throw new UnsupportedOperationException();
}
@Override
public boolean markSupported() {
return false;
}
}