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

de.bytefish.pgbulkinsert.pgsql.handlers.ByteValueHandler Maven / Gradle / Ivy

There is a newer version: 7.0.1
Show newest version
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

package de.bytefish.pgbulkinsert.pgsql.handlers;

import java.io.DataOutputStream;

public class ByteValueHandler extends BaseValueHandler {

    @Override
    protected void internalHandle(DataOutputStream buffer, final T value) throws Exception {
        buffer.writeInt(1);
        buffer.writeByte(value.byteValue());
    }

    @Override
    public int getLength(T value) {
        return 1;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy