Examples of TeeInputStream


Examples of org.apache.commons.io.input.TeeInputStream

    InputStream entityInputStream = response.getEntityInputStream();

    try {
      //Wrap the input stream
      try ( MaxLengthByteArrayOutputStream teedOut = new MaxLengthByteArrayOutputStream(); TeeInputStream teeInputStream = new TeeInputStream( entityInputStream, teedOut ) ) {
        UniqueId uniqueId = deserialize( teeInputStream );

        return new ActionResponse( uniqueId, response.getStatus(), response.getLocation(), teedOut.toByteArray() );
      }
    } catch ( IOException e ) {
View Full Code Here

Examples of org.apache.commons.io.input.TeeInputStream

    generator.close();
  }

  @Nonnull
  public ActionFailedException deserialize( int status, @Nonnull InputStream in ) throws VersionException, IOException {
    try ( MaxLengthByteArrayOutputStream teedOut = new MaxLengthByteArrayOutputStream(); TeeInputStream teeInputStream = new TeeInputStream( in, teedOut ) ) {

      JsonFactory jsonFactory = JacksonSupport.getJsonFactory();

      JsonParser parser = jsonFactory.createJsonParser( teeInputStream );
      AbstractJacksonSerializer.nextToken( parser, JsonToken.START_OBJECT );
View Full Code Here

Examples of org.apache.commons.io.input.TeeInputStream

        } else {
            OutputStream log = LogManager.INSTANCE.createLog("builder");
            // Note: We can't close the log right after the method execution because the
            //       message builder may use streaming. LogManager will take care of closing the
            //       log for us if anything goes wrong.
            tee = new TeeInputStream(in, log, true);
        }
        return proceedingJoinPoint.proceed(new Object[] { tee, contentType, msgContext });
    }
View Full Code Here

Examples of org.apache.commons.io.input.TeeInputStream

    InputStream entityInputStream = response.getEntityInputStream();

    try {
      //Wrap the input stream
      try ( MaxLengthByteArrayOutputStream teedOut = new MaxLengthByteArrayOutputStream(); TeeInputStream teeInputStream = new TeeInputStream( entityInputStream, teedOut ) ) {
        UniqueId uniqueId = deserialize( teeInputStream );

        return new ActionResponse( uniqueId, response.getStatus(), response.getLocation(), teedOut.toByteArray() );
      }
    } catch ( IOException e ) {
View Full Code Here

Examples of org.apache.commons.io.input.TeeInputStream

    generator.close();
  }

  @Nonnull
  public ActionFailedException deserialize( int status, @Nonnull InputStream in ) throws VersionException, IOException {
    try ( MaxLengthByteArrayOutputStream teedOut = new MaxLengthByteArrayOutputStream(); TeeInputStream teeInputStream = new TeeInputStream( in, teedOut ) ) {

      JsonFactory jsonFactory = JacksonSupport.getJsonFactory();

      JsonParser parser = jsonFactory.createJsonParser( teeInputStream );
      JacksonParserWrapper parserWrapper = new JacksonParserWrapper( parser );
View Full Code Here

Examples of org.bouncycastle.util.io.TeeInputStream

            {
                truncStream = new TruncatedStream(encStream);

                integrityCalculator = dataDecryptor.getIntegrityCalculator();

                encStream = new TeeInputStream(truncStream, integrityCalculator.getOutputStream());
            }

            byte[] iv = new byte[dataDecryptor.getBlockSize()];
            for (int i = 0; i != iv.length; i++)
            {
View Full Code Here

Examples of org.bouncycastle.util.io.TeeInputStream

                {
                    truncStream = new TruncatedStream(encStream);

                    integrityCalculator = dataDecryptor.getIntegrityCalculator();

                    encStream = new TeeInputStream(truncStream, integrityCalculator.getOutputStream());
                }

                byte[] iv = new byte[dataDecryptor.getBlockSize()];

                for (int i = 0; i != iv.length; i++)
View Full Code Here

Examples of org.eclipse.jgit.util.io.TeeInputStream

    final ObjectDirectoryInserter odi = db.newInserter();
    final File tmp = odi.newTempFile();
    DeflaterOutputStream dOut = odi.compress(new FileOutputStream(tmp));
    odi.writeHeader(dOut, myType, mySize);

    in = new TeeInputStream(in, dOut);
    return new ObjectStream.Filter(myType, mySize, in) {
      @Override
      public void close() throws IOException {
        super.close();
View Full Code Here

Examples of org.eclipse.jgit.util.io.TeeInputStream

    final ObjectDirectoryInserter odi = db.newInserter();
    final File tmp = odi.newTempFile();
    DeflaterOutputStream dOut = odi.compress(new FileOutputStream(tmp));
    odi.writeHeader(dOut, myType, mySize);

    in = new TeeInputStream(in, dOut);
    return new ObjectStream.Filter(myType, mySize, in) {
      @Override
      public void close() throws IOException {
        super.close();
View Full Code Here

Examples of org.rzo.yajsw.io.TeeInputStream

    }

    try
    {
      CyclicBufferFileInputStream wrapperIn = new CyclicBufferFileInputStream(fIn);
      TeeInputStream newIn = (TeeInputStream) new TeeInputStream();
      newIn.connect(wrapperIn);
      newIn.connect(System.in);
      System.setIn(newIn);
    }
    catch (Throwable e)
    {
      e.printStackTrace();
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.