private byte[] getPhoto(String name) {

    FileInputStream fis = null;

    byte[] b = null;

    try {

        fis = new FileInputStream(name);

        int totalBytes = fis.available();

        b = new byte[totalBytes];

        fis.read(b);

    } catch (IOException ex) {

    }

    try {

        fis.close();

    } catch (Exception ex) {

    }

    return b;

}

全站熱搜
創作者介紹
創作者 fabch2 的頭像
fabch2

小刻家

fabch2 發表在 痞客邦 留言(0) 人氣()