Code example for NoSuchAlgorithmException

Methods: e, getMessage

0
    private MessageDigest getMessageDigest() {
        MessageDigest md = null;
        try { 
            md = MessageDigest.getInstance("MD5");
        } catch (NoSuchAlgorithmException e) {
            Log.e(TAG, "Could not create MessageDigest : " + e.getMessage(), e);
        } 
        return md;
    } 
 
    public ByteArrayOutputStream copyTableAsJsonByte(Cursor cursor) {
        ByteArrayOutputStream bufStream = null;
        // Do copy Table 
        try { 
            if (cursor.getCount() > 0) {
                // Config 
                MessageDigest md = getMessageDigest();
                List<String> ignoreFields = Arrays.asList(new String[] { PersonColumns.COL_ID });
                // Init Is 
                bufStream = new ByteArrayOutputStream(IS_BUFFER_SIZE);
                GZIPOutputStream gzipOut = new GZIPOutputStream(bufStream, IS_BUFFER_SIZE);