base64 인코딩된 데이터를 바이트로 디코딩후 이미지로 변환할 때 사용함.

Code
/**
     * byte array to image
     *
     * @param path      이미지 경로
     * @param buffer    이미지 데이터
     * @throws FileNotFoundException
     * @throws IOException
     */
    public static void byte2Image(String path, byte[] buffer) throws FileNotFoundException, IOException {
        FileImageOutputStream imageOutput = new FileImageOutputStream(new File(path));
        imageOutput.write(buffer, 0, buffer.length);
        imageOutput.close();
    }

'java > util' 카테고리의 다른 글

[java] - File readLine  (2) 2010.07.01
[java] - File read  (0) 2010.07.01
[java] - 소수점 자르기 (duble type)  (0) 2010.06.30
[java] - base54 String decode  (0) 2010.06.30
[java] - 타입 변환  (0) 2010.06.30
Posted by 짱가쟁이