it.unimi.di.mg4j.io
Class IOFactories

java.lang.Object
  extended by it.unimi.di.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
static class IOFactories.FileLinesIterable
           
 
Method Summary
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 ConfigurationException,
                                        IOException
Throws:
ConfigurationException
IOException

fileLinesCollection

public static Iterable<MutableString> fileLinesCollection(IOFactory ioFactory,
                                                          String filename,
                                                          String encoding)