protected Writer initialize(final File f) throws FileNotFoundException, IOException { FileUtils.moveAsideIfExists(f); return new OutputStreamWriter(new GZIPOutputStream( new FastBufferedOutputStream(new FileOutputStream(f),32*1024))); }
return new FastBufferedOutputStream(new FileOutputStream(arcFile));
/** Stores an array to a file given by a {@link File} object. * * @param array an array whose elements will be written to {@code filename}. * @param file a file. */ public static void storeChars(final char array[], final File file) throws IOException { final int length = array.length; final DataOutputStream dos = new DataOutputStream(new FastBufferedOutputStream(new FileOutputStream(file))); for(int i = 0; i < length; i++) dos.writeChar(array[i]); dos.close(); } /** Stores an array to a file given by a pathname.
/** Stores an array to a file given by a {@link File} object. * * @param array an array whose elements will be written to {@code filename}. * @param file a file. */ public static void storeLongs(final long array[], final File file) throws IOException { final int length = array.length; final DataOutputStream dos = new DataOutputStream(new FastBufferedOutputStream(new FileOutputStream(file))); for(int i = 0; i < length; i++) dos.writeLong(array[i]); dos.close(); } /** Stores an array to a file given by a pathname.
/** Stores an array to a file given by a {@link File} object. * * @param array an array whose elements will be written to {@code filename}. * @param file a file. */ public static void storeDoubles(final double array[], final File file) throws IOException { final int length = array.length; final DataOutputStream dos = new DataOutputStream(new FastBufferedOutputStream(new FileOutputStream(file))); for(int i = 0; i < length; i++) dos.writeDouble(array[i]); dos.close(); } /** Stores an array to a file given by a pathname.
/** Stores an array to a file given by a {@link File} object. * * @param array an array whose elements will be written to {@code filename}. * @param file a file. */ public static void storeBooleans(final boolean array[], final File file) throws IOException { final int length = array.length; final DataOutputStream dos = new DataOutputStream(new FastBufferedOutputStream(new FileOutputStream(file))); for(int i = 0; i < length; i++) dos.writeBoolean(array[i]); dos.close(); } /** Stores an array to a file given by a pathname.
/** Stores an object in a file given by a {@link File} object. * * @param o an object. * @param file a file. * @see #loadObject(File) */ public static void storeObject(final Object o, final File file) throws IOException { final ObjectOutputStream oos = new ObjectOutputStream(new FastBufferedOutputStream(new FileOutputStream(file))); oos.writeObject(o); oos.close(); } /** Stores an object in a file given by a pathname.
/** Stores an array to a file given by a {@link File} object. * * @param array an array whose elements will be written to {@code filename}. * @param file a file. */ public static void storeShorts(final short array[], final File file) throws IOException { final int length = array.length; final DataOutputStream dos = new DataOutputStream(new FastBufferedOutputStream(new FileOutputStream(file))); for(int i = 0; i < length; i++) dos.writeShort(array[i]); dos.close(); } /** Stores an array to a file given by a pathname.
/** Stores an array to a file given by a {@link File} object. * * @param array an array whose elements will be written to {@code filename}. * @param file a file. */ public static void storeFloats(final float array[], final File file) throws IOException { final int length = array.length; final DataOutputStream dos = new DataOutputStream(new FastBufferedOutputStream(new FileOutputStream(file))); for(int i = 0; i < length; i++) dos.writeFloat(array[i]); dos.close(); } /** Stores an array to a file given by a pathname.
/** Stores the element returned by an iterator to a file given by a {@link File} object. * * @param i an iterator whose output will be written to {@code filename}. * @param file a file. */ public static void storeInts(final IntIterator i, final File file) throws IOException { final PrintStream stream = new PrintStream(new FastBufferedOutputStream(new FileOutputStream(file))); storeInts(i, stream); stream.close(); } /** Stores the element returned by an iterator to a file given by a pathname.
/** Stores the element returned by an iterator to a file given by a {@link File} object. * * @param i an iterator whose output will be written to {@code filename}. * @param file a file. */ public static void storeDoubles(final DoubleIterator i, final File file) throws IOException { final PrintStream stream = new PrintStream(new FastBufferedOutputStream(new FileOutputStream(file))); storeDoubles(i, stream); stream.close(); } /** Stores the element returned by an iterator to a file given by a pathname.
/** Stores the element returned by an iterator to a file given by a {@link File} object. * * @param i an iterator whose output will be written to {@code filename}. * @param file a file. */ public static void storeFloats(final FloatIterator i, final File file) throws IOException { final PrintStream stream = new PrintStream(new FastBufferedOutputStream(new FileOutputStream(file))); storeFloats(i, stream); stream.close(); } /** Stores the element returned by an iterator to a file given by a pathname.
/** Stores the element returned by an iterator to a file given by a {@link File} object. * * @param i an iterator whose output will be written to {@code filename}. * @param file a file. */ public static void storeLongs(final LongIterator i, final File file) throws IOException { final DataOutputStream dos = new DataOutputStream(new FastBufferedOutputStream(new FileOutputStream(file))); while(i.hasNext()) dos.writeLong(i.nextLong()); dos.close(); } /** Stores the element returned by an iterator to a file given by a pathname.
/** Stores the element returned by an iterator to a file given by a {@link File} object. * * @param i an iterator whose output will be written to {@code filename}. * @param file a file. */ public static void storeFloats(final FloatIterator i, final File file) throws IOException { final DataOutputStream dos = new DataOutputStream(new FastBufferedOutputStream(new FileOutputStream(file))); while(i.hasNext()) dos.writeFloat(i.nextFloat()); dos.close(); } /** Stores the element returned by an iterator to a file given by a pathname.
/** Stores the element returned by an iterator to a file given by a {@link File} object. * * @param i an iterator whose output will be written to {@code filename}. * @param file a file. */ public static void storeBytes(final ByteIterator i, final File file) throws IOException { final DataOutputStream dos = new DataOutputStream(new FastBufferedOutputStream(new FileOutputStream(file))); while(i.hasNext()) dos.writeByte(i.nextByte()); dos.close(); } /** Stores the element returned by an iterator to a file given by a pathname.
/** Stores the element returned by an iterator to a file given by a {@link File} object. * * @param i an iterator whose output will be written to {@code filename}. * @param file a file. */ public static void storeBooleans(final BooleanIterator i, final File file) throws IOException { final DataOutputStream dos = new DataOutputStream(new FastBufferedOutputStream(new FileOutputStream(file))); while(i.hasNext()) dos.writeBoolean(i.nextBoolean()); dos.close(); } /** Stores the element returned by an iterator to a file given by a pathname.
/** Stores the element returned by an iterator to a file given by a {@link File} object. * * @param i an iterator whose output will be written to {@code filename}. * @param file a file. */ public static void storeChars(final CharIterator i, final File file) throws IOException { final DataOutputStream dos = new DataOutputStream(new FastBufferedOutputStream(new FileOutputStream(file))); while(i.hasNext()) dos.writeChar(i.nextChar()); dos.close(); } /** Stores the element returned by an iterator to a file given by a pathname.
/** Stores the element returned by an iterator to a file given by a {@link File} object. * * @param i an iterator whose output will be written to {@code filename}. * @param file a file. */ public static void storeInts(final IntIterator i, final File file) throws IOException { final DataOutputStream dos = new DataOutputStream(new FastBufferedOutputStream(new FileOutputStream(file))); while(i.hasNext()) dos.writeInt(i.nextInt()); dos.close(); } /** Stores the element returned by an iterator to a file given by a pathname.
/** Stores the element returned by an iterator to a file given by a {@link File} object. * * @param i an iterator whose output will be written to {@code filename}. * @param file a file. */ public static void storeDoubles(final DoubleIterator i, final File file) throws IOException { final DataOutputStream dos = new DataOutputStream(new FastBufferedOutputStream(new FileOutputStream(file))); while(i.hasNext()) dos.writeDouble(i.nextDouble()); dos.close(); } /** Stores the element returned by an iterator to a file given by a pathname.
/** Stores an array to a file given by a {@link File} object. * * @param array an array whose elements will be written to {@code filename}. * @param file a file. */ public static void storeBytes(final byte array[][], final File file) throws IOException { final OutputStream os = new FastBufferedOutputStream(new FileOutputStream(file)); write(os, array, 0, ByteBigArrays.length(array)); os.close(); } /** Stores a big array to a file given by a pathname.