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 class
IOFactories.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 Object
loadObject(IOFactory ioFactory, String filename)
static Properties
loadProperties(IOFactory ioFactory, String filename)
static void
storeObject(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:
IOException
ClassNotFoundException
-
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.ConfigurationException
IOException
-
fileLinesCollection
public static Iterable<MutableString> fileLinesCollection(IOFactory ioFactory, String filename, String encoding)
-
-