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

org.zodiac.netty.marshallers.ByteBufMarshaller Maven / Gradle / Ivy

There is a newer version: 1.6.8
Show newest version
package org.zodiac.netty.marshallers;

import io.netty.buffer.ByteBuf;
import org.zodiac.sdk.toolkit.marshallers.Marshaller;

final class ByteBufMarshaller implements Marshaller {

    public ByteBufMarshaller() {
        super();
    }

    @Override
    public ByteBuf read(ByteBuf data, Object[] hints) throws Exception {
        return data;
    }

    @Override
    public void write(ByteBuf obj, ByteBuf into, Object[] hints) throws Exception {
        if (into == obj) {
            return;
        }
        into.writeBytes(obj);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy