outputstream Questions

6

Solved

I'm looking for magical Java class that will allow me to do something like this: ByteArrayOutputStream byteStream = new ByteArrayOutputStream(); FileOutputStream fileStream = new FileOutputStream(...
Alpheus asked 2/11, 2011 at 21:13

8

Solved

I see that both are "streams" of data. In that case, why consider them different ? What is the difference really ? Comment - Please don't close this question. It is the basic kind of stuff that ca...
Nuri asked 17/12, 2012 at 7:50

9

Solved

I want to write a function that outputs something to a ostream that's passed in, and return the stream, like this: std::ostream& MyPrint(int val, std::ostream* out) { *out << val; retu...
Leishaleishmania asked 6/7, 2009 at 16:28

8

Solved

I have a blob column in my database table, for which I have to use byte[] in my Java program as a mapping and to use this data I have to convert it to InputStream or OutputStream. But I don't know ...
Phony asked 19/1, 2010 at 6:3

14

Solved

I am on the stage of development where I have two modules and from one I got output as a OutputStream, and a second one which accepts only InputStream. Do you know how to convert OutputStream to In...
Dangerfield asked 25/4, 2011 at 13:11

6

Solved

I've been trying to get the "new" ZipArchive included in .NET 4.5 (System.IO.Compression.ZipArchive) to work in a ASP.NET site. But it seems like it doesn't like writing to the stream of HttpContex...
Georgeanngeorgeanna asked 16/5, 2013 at 10:51

3

Solved

I have a java echo httpserver up. It works with test sites, but the client code I'm working with fails to get the data. The server works perfectly with https://www.hurl.it/ The client works per...
Deach asked 31/7, 2016 at 0:19

5

Solved

I have a software that allow to write add-on in javascript files (.js) that allow to use Java function (I don't know if this is common, I never saw java call in javascript file before) I need to d...
Noblenobleman asked 25/9, 2009 at 13:24

2

Solved

I have an InputStream and OutputStream (there is no socket). I have a stream-based code that does some mapping/filtering/grouping/processing. My main goal to terminate the stream if the maxDuration...
Godred asked 5/6, 2022 at 18:58

4

I am looking for an example that differentiates between cerr and cout in C++? When do I need to use cerr?
Drosophila asked 4/10, 2014 at 9:28

2

Solved

I have to send a dynamic buffer size to the socket stream. It works correctly, but when I try to send multiple buffers with a size bigger than int my_buffer_size =18 * 1024; (this is an indicativ...
Ablative asked 5/1, 2015 at 21:52

7

Solved

I have a method which runs asynchronously after start, using OutputStream or Writer as parameter. It acts as a recording adapter for an OutputStream or Writer (it's a third party API I can't chang...
Oculist asked 9/8, 2011 at 12:8

7

Solved

In Java I need to put content from an OutputStream (I fill data to that stream myself) into a ByteBuffer. How to do it in a simple way?
Tenpins asked 26/4, 2010 at 20:23

2

Solved

I have the following code: Process proc; try { ProcessBuilder procBuilder = new ProcessBuilder(/* some args */); proc = procBuilder.start(); if (proc.waitFor(30000, TimeUnit.MILLISECONDS)) { /...
Sukkah asked 29/6, 2020 at 21:47

3

Solved

I create PDF docs in memory as OutputStreams. These should be uploaded to S3. My problem is that it's not possible to create a PutObjectRequest from an OutputStream directly (according to this thre...
Daphnedaphnis asked 4/8, 2015 at 9:27

2

Solved

I have the following problem: I have an HttpServlet that create a file and return it to the user that have to receive it as a download byte[] byteArray = allegato.getFile(); InputStream is = new...

4

Solved

In this situation, I have created a zip file containing search result files, and am trying to send it to the user. Here is the chunk of code I am currently trying to use. File[] zippable = new Fil...
Borecole asked 11/1, 2012 at 16:45

9

Solved

Someone explain to me what InputStream and OutputStream are? I am confused about the use cases for both InputStream and OutputStream. If you could also include a snippet of code to go along with ...
Scutari asked 2/12, 2009 at 4:44

6

Solved

#include <iostream> using namespace std; int main() { char c1 = 0xab; signed char c2 = 0xcd; unsigned char c3 = 0xef; cout << hex; cout << c1 << endl; cout <&lt...
Cnut asked 1/2, 2013 at 10:53

8

Solved

I'm working on a Java web application in which files will be stored in a database. Originally, we retrieved files already in the DB by simply calling getBytes on our result set: byte[] bytes = resu...
Obliteration asked 13/5, 2010 at 21:49

4

I start and have running a Scala process. val dir = "/path/to/working/dir/" val stockfish = Process(Seq("wine", dir + "stockfish_8_x32.exe")) val logger = ProcessLogger(printf("Stdout: %s%n", ...
Sohn asked 8/1, 2017 at 14:53

6

Solved

I've seen this question and it's somewhat similar. I would like to know if it really is a big factor that would affect the performance of my application. Here's my scenario. I have this Java webap...
Unending asked 3/9, 2013 at 5:36

0

I'm trying to catch an exception thrown in my implementation of StreamingResponseBody, I can see the exception being thrown inside the class however the thrown exception my handling seems to work, ...
Condensable asked 4/1, 2021 at 3:59

2

How can I write output to file? I tried instead of process.stdout use fs.createWriteStream(temp + '/export2.json'), but it's not working. var rl = readline.createInterface({ input: fs.createReadS...
Cassaundra asked 2/4, 2015 at 10:14

6

Solved

In Java Servlets, one can access the response body via response.getOutputStream() or response.getWriter(). Should one call .close() on this OutputStream after it has been written to? On the one ha...
Volga asked 21/7, 2009 at 13:27

© 2022 - 2024 — McMap. All rights reserved.