Example usage for java.lang String String

List of usage examples for java.lang String String

Introduction

In this page you can find the example usage for java.lang String String.

Prototype

String(char[] value, int off, int len, Void sig) 

Source Link

Usage

From source file:Main.java

protected static final String encodingUTF8andChange(byte[] src, int srart, int length) throws Exception {
    byte[] b = new String(src, srart, length, "euc-kr").getBytes("utf-8");
    String str = new String(b).trim();
    return new BigDecimal(str).setScale(2, BigDecimal.ROUND_HALF_UP).toString();
}

From source file:Main.java

protected static final String encodingUTF8andIndex(byte[] src, int srart, int length) throws Exception {
    byte[] b = new String(src, srart, length, "euc-kr").getBytes("utf-8");
    String str = new String(b).trim();
    return new DecimalFormat("###,###.00").format(Double.valueOf(str));
}