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

io.github.jinghui70.rainbow.dbaccess.fieldmapper.BlobStringField Maven / Gradle / Ivy

There is a newer version: 5.2.11
Show newest version
package io.github.jinghui70.rainbow.dbaccess.fieldmapper;

import java.nio.charset.StandardCharsets;

public class BlobStringField extends BlobField {

    public BlobStringField() {
        super(true);
    }

    @Override
    protected byte[] getBytes(Object value) {
        String string = (String) value;
        return string.getBytes(StandardCharsets.UTF_8);
    }

    @Override
    protected String parse(byte[] bytes) {
        return new String(bytes, StandardCharsets.UTF_8);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy