Examples of FastBufferedOutputStream


Examples of it.unimi.dsi.fastutil.io.FastBufferedOutputStream

      if ( part.length > 2 ) System.err.println( "Wrong argument(s) to command" );
      else {
        if ( output != System.out )
          output.close();
        try {
          output = part.length == 1 ? System.out : new PrintStream( new FastBufferedOutputStream( new FileOutputStream( part[ 1 ] ) ) );
        }
        catch ( FileNotFoundException e ) {
          System.err.println( "Cannot create file " + part[ 1 ] );
          output = System.out;
        }
View Full Code Here

Examples of it.unimi.dsi.fastutil.io.FastBufferedOutputStream

        pl.start( "Copying URIs..." );
        final LineIterator termIterator = new LineIterator( new FastBufferedReader( new InputStreamReader( new FileInputStream( termFile ) ), bufferSize ), pl );
        File temp = File.createTempFile( URLMPHVirtualDocumentResolver.class.getName(), ".uniqueuris" );
        temp.deleteOnExit();
        termFile = temp.toString();
        final FastBufferedOutputStream outputStream = new FastBufferedOutputStream( new FileOutputStream( termFile ), bufferSize );
        MutableString uri;
        while( termIterator.hasNext() ) {
          uri = termIterator.next();
          makeUnique( filter, uri );
          uri.writeUTF8( outputStream );
          outputStream.write( '\n' );
        }
        pl.done();
        outputStream.close();
      }
      collection = new FileLinesCollection( termFile, "UTF-8" );
    }
    LOGGER.debug( "Building function..." );
    final int width = jsapResult.getInt( "width" );
View Full Code Here

Examples of it.unimi.dsi.fastutil.io.FastBufferedOutputStream

          if (this.chmod)
              chmods(dir, getPath().getFile());
      }
      md5 = stringToMD5(uri);
      File arcFile = new File(dir, md5 + "." + fetchTime);
      return new FastBufferedOutputStream(new FileOutputStream(arcFile));      
  }
View Full Code Here

Examples of it.unimi.dsi.fastutil.io.FastBufferedOutputStream

    }
   
    protected Writer initialize(final File f) throws FileNotFoundException, IOException {
        FileUtils.moveAsideIfExists(f);
        return new OutputStreamWriter(new GZIPOutputStream(
            new FastBufferedOutputStream(new FileOutputStream(f),32*1024)));
    }
View Full Code Here

Examples of xbird.util.io.FastBufferedOutputStream

            raf.close();

            fos = new FileOutputStream(file, true);
        }

        final FastBufferedOutputStream bos = new FastBufferedOutputStream(fos, 4096);
        final DataOutputStream out = new DataOutputStream(bos);

        if(attemptShrink) {
            out.writeInt(totalEntries);
            out.writeInt(0); // duplicateEnrties
View Full Code Here

Examples of xbird.util.io.FastBufferedOutputStream

    private static void makeCache(final String fileName, final Map<MutableString, Long> map)
            throws IOException {
        File cacheFile = new File(fileName);
        FileOutputStream fos = new FileOutputStream(cacheFile, false);
        FastBufferedOutputStream bos = new FastBufferedOutputStream(fos);
        ObjectUtils.toStream(map, bos);
        bos.flush();
        bos.close();
    }
View Full Code Here

Examples of xbird.util.io.FastBufferedOutputStream

            }
        }

        public void flush(boolean close) throws IOException {
            FileOutputStream fos = new FileOutputStream(descFile, false);
            FastBufferedOutputStream bos = new FastBufferedOutputStream(fos, 8192);
            ObjectUtils.toStream(recordMap, bos);
            bos.flush();
            bos.close();

            if(close) {
                close();
            }
        }
View Full Code Here

Examples of xbird.util.io.FastBufferedOutputStream

    private static void makeCache(final String fileName, final Map<MutableString, Long> map)
            throws IOException {
        File cacheFile = new File(fileName);
        FileOutputStream fos = new FileOutputStream(cacheFile, false);
        FastBufferedOutputStream bos = new FastBufferedOutputStream(fos);
        ObjectUtils.toStream(map, bos);
        bos.flush();
        bos.close();
    }
View Full Code Here

Examples of xbird.util.io.FastBufferedOutputStream

            raf.close();

            fos = new FileOutputStream(file, true);
        }

        final FastBufferedOutputStream bos = new FastBufferedOutputStream(fos, 4096);
        final DataOutputStream out = new DataOutputStream(bos);

        if(attemptShrink) {
            out.writeInt(totalEntries);
            out.writeInt(0); // duplicateEnrties
View Full Code Here

Examples of xbird.util.io.FastBufferedOutputStream

            }
        }

        public void flush(boolean close) throws IOException {
            FileOutputStream fos = new FileOutputStream(descFile, false);
            FastBufferedOutputStream bos = new FastBufferedOutputStream(fos, 8192);
            ObjectUtils.toStream(recordMap, bos);
            bos.flush();
            bos.close();

            if(close) {
                close();
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.