Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7512319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:49:45+00:00 2026-05-29T23:49:45+00:00

I know how to copy chunkwise from an InputStream to an OutputStream . I

  • 0

I know how to copy chunkwise from an InputStream to an OutputStream.

I know how to get an byte[] from an InputStream.

But how to combine them in one step? Is there an OutputStream that can be piped and buffers all written bytes so it can return a byte[] at the end?

I need something like an ByteArrayOutputStream but one that can be piped. (e.g. to a FileOutputStream)

Or I need something like a MultiOutputStream which can forward to multiple OutputStreams.
Solutions using Guava and/or Apache Commons are prefered. 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T23:49:46+00:00Added an answer on May 29, 2026 at 11:49 pm

    You should probably have a look at the TeeOutputStream of Apache: https://commons.apache.org/proper/commons-io/javadocs/api-2.5/org/apache/commons/io/output/TeeOutputStream.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know of an easy way to copy a database from one computer
Now I know how to copy files from one directory to another, this is
First off, I know I can copy "this" on instantiation, but that doesn't work
I know there are two ways of making a copy of a database. One
I know how to copy a file from one directory to another, what I
Does anyone know how to copy the XValues from one TChartSeries to another in
I don't know why but currently emacs opens only one copy of w3m. If
may i know how to copy xml files from rc/ to class/ when compile
Anybody know of a way to copy a file from path A to path
I know when you set to true ,it will shadow copy the files.But what

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.