Examples of finish()


Examples of org.apache.fop.svg.PDFDocumentGraphics2D.finish()

        g2d.setFont(new Font("sans-serif", Font.PLAIN, 36));
        g2d.drawString("Welcome to page 2!", 140, 140);

        //Cleanup
        g2d.finish();

        String pdfString = baout.toString("ISO-8859-1");
        Assert.assertEquals("%%EOF not found",
                pdfString.substring(pdfString.length() - 6), "%%EOF\n");
    }
View Full Code Here

Examples of org.apache.hadoop.fs.shell.find.Exec.finish()

   
    assertEquals(Result.PASS, exec.apply(item3));
    verifyNoMoreInteractions(out);
    verifyNoMoreInteractions(err);

    exec.finish();
    verify(out).println("TestCommand.processPath:"+item3.toString());
    verifyNoMoreInteractions(out);
    verifyNoMoreInteractions(err);
  }
 
View Full Code Here

Examples of org.apache.hadoop.io.compress.BlockCompressorStream.finish()

          compressionOverhead);
      deflateOut = new DataOutputStream(new BufferedOutputStream(deflateFilter));

      deflateOut.write(bytes, 0, bytes.length);
      deflateOut.flush();
      deflateFilter.finish();

      DataInputBuffer deCompressedDataBuffer = new DataInputBuffer();
      deCompressedDataBuffer.reset(compressedDataBuffer.getData(), 0,
          compressedDataBuffer.getLength());
View Full Code Here

Examples of org.apache.hadoop.io.compress.CompressionOutputStream.finish()

      codec.createOutputStream(compressedDataBuffer);
    DataOutputStream deflateOut =
      new DataOutputStream(new BufferedOutputStream(deflateFilter));
    deflateOut.write(data.getData(), 0, data.getLength());
    deflateOut.flush();
    deflateFilter.finish();
    LOG.info("Finished compressing data");
   
    // De-compress data
    DataInputBuffer deCompressedDataBuffer = new DataInputBuffer();
    deCompressedDataBuffer.reset(compressedDataBuffer.getData(), 0,
View Full Code Here

Examples of org.apache.hadoop.mapred.IFileOutputStream.finish()

    ByteArrayOutputStream bout = new ByteArrayOutputStream();
    DataOutputStream dos = new DataOutputStream(bout);
    IFileOutputStream ios = new IFileOutputStream(dos);
    header.write(dos);
    ios.write("MAPDATA123".getBytes());
    ios.finish();

    ShuffleHeader header2 = new ShuffleHeader(map2ID.toString(), 14, 10, 1);
    IFileOutputStream ios2 = new IFileOutputStream(dos);
    header2.write(dos);
    ios2.write("MAPDATA456".getBytes());
View Full Code Here

Examples of org.apache.http.impl.io.ChunkedOutputStream.finish()

        ChunkedOutputStream out = new ChunkedOutputStream(buffer, 2);
        out.write('1')
        out.write('2')
        out.write('3')
        out.write('4')
        out.finish();
        out.close();
       
        byte [] rawdata =  buffer.getData();
       
        assertEquals(19, rawdata.length);
View Full Code Here

Examples of org.apache.ivy.osgi.p2.P2Descriptor.finish()

                ExecutionEnvironmentProfileProvider.getInstance());
        p2Descriptor.setLogLevel(logLevel);
        if (!populateP2Descriptor(repoUri, p2Descriptor)) {
            return null;
        }
        p2Descriptor.finish();
        return p2Descriptor;
    }

    private boolean populateP2Descriptor(URI repoUri, P2Descriptor p2Descriptor)
            throws IOException, ParseException, SAXException {
View Full Code Here

Examples of org.apache.jena.atlas.logging.ProgressLogger.finish()

            index2.add(tuple) ;
            monitor.tick() ;
        }
       
        index2.sync() ;
        long time = monitor.finish() ;
        float elapsedSecs = time/1000F ;
       
        float rate = (elapsedSecs!=0) ? counter/elapsedSecs : 0 ;
       
        print("Total: %,d records : %,.2f seconds : %,.2f records/sec [%s]", counter, elapsedSecs, rate, nowAsString()) ;
View Full Code Here

Examples of org.apache.jena.riot.lang.StreamRDFCounting.finish()

            if ( modLangParse.stopOnBadTerm() )
                return ;
        } finally {
            // Not close - we may write again to the underlying output stream in another call to parse a file. 
            sink.finish() ;
            IO.close(in) ;
        }
        long x = modTime.endTimer() ;
        long n = sink.countTriples()+sink.countQuads() ;
View Full Code Here

Examples of org.apache.jena.riot.system.StreamRDF.finish()

    public static void write(OutputStream out, Iterator<Triple> iter)
    {
        StreamRDF s = StreamRDFLib.writer(out) ;
        s.start() ;
        StreamRDFLib.triplesToStream(s, iter) ;
        s.finish();
    }
   
    public static void write(Writer out, Iterator<Triple> iter)
    {
        StreamRDF s = StreamRDFLib.writer(out) ;
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.