Code example for ObjectInputStream

Methods: readUTF

0
            Log.e(TAG, "thumb is null !"); 
        } 
    } 
 
    private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { 
        label = in.readUTF(); 
        String uriStr = in.readUTF(); 
        uri = uriStr.equals("null") ? null : Uri.parse(uriStr); 
        thumb = BitmapFactory.decodeFile(HistoryItemDao.ctx.getFileStreamPath(getThumbFilename()) 
                .getPath()); 
    } 
 
    private String getThumbFilename() throws UnsupportedEncodingException { 
     
        return URLEncoder.encode("thumb_" + label + ".png", "UTF-8"); 
         
    } 
 
}