org.msgpack.template.NotNullableTemplate Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of msgpack Show documentation
Show all versions of msgpack Show documentation
MessagePack for Java is a binary-based efficient object
serialization library in Java.
The newest version!
package org.msgpack.template;
import java.io.IOException;
import org.msgpack.packer.Packer;
import org.msgpack.unpacker.Unpacker;
public class NotNullableTemplate extends AbstractTemplate {
private Template tmpl;
public NotNullableTemplate(Template elementTemplate) {
tmpl = elementTemplate;
}
@Override
public void write(Packer pk, T v, boolean required) throws IOException {
tmpl.write(pk, v, required);
}
@Override
public void write(Packer pk, T v) throws IOException {
write(pk, v, true);
}
@Override
public T read(Unpacker u, T to, boolean required) throws IOException {
return tmpl.read(u, to, required);
}
@Override
public T read(Unpacker u, T to) throws IOException {
return read(u, to, true);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy