io.activej.serializer.stream.StreamDecoder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of activej-serializer Show documentation
Show all versions of activej-serializer Show documentation
Extremely fast and space-efficient serializers. Implemented using bytecode engineering.
package io.activej.serializer.stream;
import io.activej.serializer.BinaryInput;
import java.io.IOException;
public interface StreamDecoder {
T decode(StreamInput input) throws IOException;
default T fromByteArray(byte[] byteArray) throws IOException {
BinaryInput binaryInput = new BinaryInput(byteArray);
try (StreamInput streamInput = StreamInput.create(binaryInput)) {
return decode(streamInput);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy