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

com.javaoffers.brief.modelhelper.convert.ByteArray2StringConvert Maven / Gradle / Ivy

There is a newer version: 3.6.8
Show newest version
package com.javaoffers.brief.modelhelper.convert;

public class ByteArray2StringConvert extends AbstractConver {
    @Override
    public String convert(byte[] bytes) {
        return new String(bytes);
    }
}

class ByteArray2StringConvert2 extends AbstractConver {
    @Override
    public String convert(Byte[] bytes) {
        byte[] bs = new byte[bytes.length];
        if(bytes.length>0){
            int i = 0;
            for(Byte b : bytes){
                bs[i] = b;
                i++;
            }
        }
        return new String(bs);
    }

    public ByteArray2StringConvert2() {
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy