An abstract mechanism for reading a data stream in Java

learn more…| top users | synonyms

0
votes
1answer
25 views

How can i edit pdf and put it inside zip during stream then download using IText and java?

My use case is this: when the client clicks download on a pdf, I want to edit/write some text on to the pdf using Itext pdf editor, then zip the pdf then let it download, All during the stream. I am ...
0
votes
0answers
10 views

InputStream.available() generating Null pointer exception [duplicate]

I'm trying to build an HTTP server, I searched the net to solve this problem, but I did not find anything like that.I'm trying to customize an inputstream to fit read requests and HTTP responses ...
0
votes
0answers
12 views

Convert inputstream to list of Objects

I have to make a jar to hit an API to get List Of Person-Details which basically has four fields :- id,name,salary,department.I am using apache httpclient to do a get request which gives me an ...
-1
votes
2answers
27 views

My method readFromFiles can't find the source files [duplicate]

I have a method readFromFile like this:private static ArrayList<ArrayList<Integer>> readFromFile(String name) {ArrayList<ArrayList<Integer>> inputs=new ArrayList<...
1
vote
0answers
41 views

InputStream wrapper with actual read in a dedicated thread

Asynchronous IO in java was introduced too late and still not all streams support it.In my case, on Windows there's no way to read or close asynchronously a pipe returned by java.lang.Process....
2
votes
1answer
49 views

How should I store text files in a Java program to easily read them?

I'm making a program that takes multiple choice questions in the form of several text files, reads them, and then quizzes the user.I put the text files in a package, and used the File type to access ...
0
votes
0answers
13 views

Does enter key trigger System.in.read()? [duplicate]

I know this is silly question but I want to know does read() starts reading after we press enter and why is that so?And is it possible to read a byte when the key is pressed itself through keyboard ...
0
votes
0answers
37 views

Spring Boot + REST endpoint with InputStream=SocketTimeoutException

I have a Spring Boot web application. There's an endpoint of such type there:@PutMappingpublic ResponseEntity put(HttpServletRequest request, InputStream inputStream) {long contentLength=...
-1
votes
2answers
44 views

converting OutputStream into an InputStream

Is there any way to convert an OutputStream into an InputStream?So the following would workInputStream convertOStoIS(OutputStream os) {}I do not want to use any libraries, I read that there ...
2
votes
1answer
55 views

HttpUrlConnection gets response body on connect()

Consider the following code.try {httpURLConnection=(HttpURLConnection) new URL(strings[0]).openConnection();httpURLConnection.setConnectTimeout(Config.HTTP_CONNECTION_TIMEOUT);...
0
votes
0answers
26 views

Progress decompressing rar file(s)

In my project I am extracting rar files.I am trying to archive to show the extraction progress (in percentage) to the user but the progress always ends with 145% and the extraction is still running ...
1
vote
1answer
24 views

How to handle IO streams in Spring MVC

I have a method which returns ResponseEntity(InputStreamResource). In this method, I'm getting InputStream from a file based on the filename input and then sending InputStreamResource as a response....
0
votes
0answers
38 views

Inject CSS from url Android Studio

I'm using an InjectCSS script to use an extra css file on a webview.But the script takes the CSS file from the assets folder, I want the css file externally hosted.private void injectCSS() {...
0
votes
0answers
29 views

How to extract sheet1 data from Inputstream which holds the entire workbook data?

I have uploaded a .xls file into mongodb which contains data in sheet1, sheet2 and sheet3. When i downloading a file, i was storing entire workbook contents as ByteArrayInputstream as per our ...
1
vote
0answers
18 views

Finding Max/Min integers from user generated text file c++

I am using VS 2017. I am attempting to open a text file that the user inputs and read the integers from that text file and then output the largest and smallest numbers from that text file. Issues:I ...

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,