All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.activej.serializer.stream.StreamDecoder Maven / Gradle / Ivy

Go to download

Extremely fast and space-efficient serializers. Implemented using bytecode engineering.

There is a newer version: 6.0-rc2
Show newest version
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