Examples of finished()


Examples of explore.java.concurrency.producer_consumer.FileWriter.finished()

        ListenableFuture<List<Map<String, Object>>> listListenableFuture = Futures.successfulAsList(futures);
        Futures.addCallback(listListenableFuture, new FutureCallback<List<Map<String, Object>>>() {
            @Override
            public void onSuccess(List<Map<String, Object>> result) {
                task.finished();
                executorService.shutdown();
                fileWritingService.shutdown();
            }

            @Override
View Full Code Here

Examples of io.crate.operation.merge.MergeOperation.finished()

                        logger.error("Failed to add rows", ex);
                        return;
                    }

                    if (countdown.decrementAndGet() == 0 || !shouldContinue) {
                        mergeOperation.finished();
                    }
                }

                @Override
                public void onFailure(@Nonnull Throwable t) {
View Full Code Here

Examples of io.netty.channel.sctp.SctpSendBufferPool.SendBuffer.finished()

                        localWrittenBytes = buf.transferTo(ch);
                        if (localWrittenBytes != 0) {
                            writtenBytes += localWrittenBytes;
                            break;
                        }
                        if (buf.finished()) {
                            break;
                        }
                    }

                    if (buf.finished()) {
View Full Code Here

Examples of io.netty.channel.socket.nio.SocketSendBufferPool.SendBuffer.finished()

                        localWrittenBytes = buf.transferTo(ch);
                        if (localWrittenBytes != 0) {
                            writtenBytes += localWrittenBytes;
                            break;
                        }
                        if (buf.finished()) {
                            break;
                        }
                    }

                    if (buf.finished()) {
View Full Code Here

Examples of java.util.zip.Deflater.finished()

    int length = in.remaining();
    deflater.setInput(in.array(), in.arrayOffset() + in.position(), length);
    deflater.finish();
    int outSize = 0;
    int offset = out.arrayOffset() + out.position();
    while (!deflater.finished() && (length > outSize)) {
      int size = deflater.deflate(out.array(), offset, out.remaining());
      out.position(size + out.position());
      outSize += size;
      offset += size;
      // if we run out of space in the out buffer, use the overflow
View Full Code Here

Examples of java.util.zip.Deflater.finished()

        compressor.setInput(input);
        compressor.finish();

        // Write the compressed data to the stream
        byte[] buf = new byte[1024];
        while (!compressor.finished())
        {
            int count = compressor.deflate(buf);
            bos.write(buf, 0, count);
        }
    }
View Full Code Here

Examples of java.util.zip.Deflater.finished()

    deflate.setInput(byteArray);
    while (!(deflate.needsInput())) {
      x += deflate.deflate(outPutBuf, x, outPutBuf.length - x);
    }
    deflate.finish();
    while (!(deflate.finished())) {
      x = x + deflate.deflate(outPutBuf, x, outPutBuf.length - x);
    }

    Inflater inflate = new Inflater();
    try {
View Full Code Here

Examples of java.util.zip.Deflater.finished()

    deflate.setInput(byteArray);
    while (!(deflate.needsInput())) {
      x += deflate.deflate(outPutBuf, x, outPutBuf.length - x);
    }
    deflate.finish();
    while (!(deflate.finished())) {
      x = x + deflate.deflate(outPutBuf, x, outPutBuf.length - x);
    }

    Inflater inflate = new Inflater();
    byte outPutInf[] = new byte[500];
View Full Code Here

Examples of java.util.zip.Deflater.finished()

    defEmpty.setInput(emptyArray);
    while (!(defEmpty.needsInput())) {
      x += defEmpty.deflate(outPutBuf, x, outPutBuf.length - x);
    }
    defEmpty.finish();
    while (!(defEmpty.finished())) {
      x += defEmpty.deflate(outPutBuf, x, outPutBuf.length - x);
    }
    assertTrue(
        "the total number of byte from deflate did not equal getTotalOut - inflate(byte)",
        x == defEmpty.getTotalOut());
View Full Code Here

Examples of java.util.zip.Deflater.finished()

        deflater.setLevel(Deflater.DEFAULT_COMPRESSION);
        deflater.setStrategy(Deflater.FILTERED);
        deflater.setInput(input);
        deflater.finish();
        byte[] buf = new byte[1024];
        while (!deflater.finished()) {
            int count = deflater.deflate(buf);
            out.write(buf, 0, count);
        }
        deflater.end();
    }
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.