Package it.unimi.di.big.mg4j.io
Class IOFactories
- java.lang.Object
-
- it.unimi.di.big.mg4j.io.IOFactories
-
public class IOFactories extends Object
Static methods that do useful things with I/O factories.- Since:
- 5.1
- Author:
- Sebastiano Vigna
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIOFactories.FileLinesIterable
-
Method Summary
Modifier and Type Method Description static Iterable<MutableString>fileLinesCollection(IOFactory ioFactory, String filename, String encoding)static byte[]loadBytes(IOFactory ioFactory, String filename)static ObjectloadObject(IOFactory ioFactory, String filename)static PropertiesloadProperties(IOFactory ioFactory, String filename)static voidstoreObject(IOFactory ioFactory, Object object, String filename)
-
-
-
Method Detail
-
loadBytes
public static byte[] loadBytes(IOFactory ioFactory, String filename) throws IOException
- Throws:
IOException
-
loadObject
public static Object loadObject(IOFactory ioFactory, String filename) throws IOException, ClassNotFoundException
- Throws:
IOExceptionClassNotFoundException
-
storeObject
public static void storeObject(IOFactory ioFactory, Object object, String filename) throws IOException
- Throws:
IOException
-
loadProperties
public static Properties loadProperties(IOFactory ioFactory, String filename) throws org.apache.commons.configuration.ConfigurationException, IOException
- Throws:
org.apache.commons.configuration.ConfigurationExceptionIOException
-
fileLinesCollection
public static Iterable<MutableString> fileLinesCollection(IOFactory ioFactory, String filename, String encoding)
-
-