Java Utililty Methods Object Deserialize from File

List of utility methods to do Object Deserialize from File

Description

The list of methods to do Object Deserialize from File are organized into topic(s).

Method

ObjectdeserializeObjectFromFile(File f)
deserialize Object From File
FileInputStream fis = new FileInputStream(f);
try {
    BufferedInputStream bis = new BufferedInputStream(fis, 1024 * 128);
    ObjectInputStream ois = new ObjectInputStream(bis);
    return ois.readObject();
} finally {
    fis.close();
StringdeserializeString(File file)
Load a text file contents as a String.
int len;
char[] chr = new char[4096];
final StringBuffer buffer = new StringBuffer();
final FileReader reader = new FileReader(file);
try {
    while ((len = reader.read(chr)) > 0) {
        buffer.append(chr, 0, len);
} finally {
    reader.close();
return buffer.toString();