- }\r
- \r
- /**\r
- * Deserialize from an input stream into an object.\r
- * Note, if multiple objects are deserialized from the same stream, it is \r
- * more efficient to instantiate InputStreamReadable and identities only once,\r
- * and use {@link #deserialize(DataInput, List)}.\r
- * \r
- * @param in\r
- * @param obj a valid object\r
- * @throws IOException\r
- */\r
- public void deserialize(InputStream in, Object obj) throws IOException\r
- {\r
- // InputStreamReadable adapts InputStream to BinaryReadable&DataInput\r
- InputStreamReadable read = new InputStreamReadable(in, Long.MAX_VALUE);\r
- deserializeTo(read, obj);\r
- } \r
- \r
- /**\r
- * Deserialize object from a file. \r
- * \r
- * @param file source file\r
- * @return the object\r
- * @throws IOException\r
- */\r
- public Object deserialize(File file) throws IOException\r
- {\r
- BinaryFile f = new BinaryFile(file);\r
- try {\r
- return deserialize(f);\r
- } finally {\r
- f.close();\r
- } \r
- }\r
- \r
- /**\r
- * Deserialize a file into a valid object. This method writes over previous values.\r
- * \r
- * @param file source file\r
- * @param obj a dst valid object\r
- * @throws IOException\r
- */\r
- public void deserialize(File file, Object obj) throws IOException\r
- {\r
- BinaryFile f = new BinaryFile(file);\r
- try {\r
- deserializeTo(f, obj);\r
- } finally {\r
- f.close();\r
- } \r
+ }
+
+ /**
+ * Deserialize from an input stream into an object.
+ * Note, if multiple objects are deserialized from the same stream, it is
+ * more efficient to instantiate InputStreamReadable and identities only once,
+ * and use {@link #deserialize(DataInput, List)}.
+ *
+ * @param in
+ * @param obj a valid object
+ * @throws IOException
+ */
+ public void deserialize(InputStream in, Object obj) throws IOException
+ {
+ // InputStreamReadable adapts InputStream to BinaryReadable&DataInput
+ InputStreamReadable read = new InputStreamReadable(in, Long.MAX_VALUE);
+ deserializeTo(read, obj);
+ }
+
+ /**
+ * Deserialize object from a file.
+ *
+ * @param file source file
+ * @return the object
+ * @throws IOException
+ */
+ public Object deserialize(File file) throws IOException
+ {
+ BinaryFile f = new BinaryFile(file);
+ try {
+ return deserialize(f);
+ } finally {
+ f.close();
+ }
+ }
+
+ /**
+ * Deserialize a file into a valid object. This method writes over previous values.
+ *
+ * @param file source file
+ * @param obj a dst valid object
+ * @throws IOException
+ */
+ public void deserialize(File file, Object obj) throws IOException
+ {
+ BinaryFile f = new BinaryFile(file);
+ try {
+ deserializeTo(f, obj);
+ } finally {
+ f.close();
+ }