Top "Inputstream" questions

An abstract mechanism for reading a data stream in Java

When does a stream close if its not closed manually?

I would like to know when does a stream close if its not closed manually. By this I mean, will …

java stream inputstream outputstream
Closing inputstreams in Java

I have the following piece of code in a try/catch block InputStream inputstream = conn.getInputStream(); InputStreamReader inputstreamreader = new InputStreamReader(…

java inputstream
How to detect illegal UTF-8 byte sequences to replace them in java inputstream?

The file in question is not under my control. Most byte sequences are valid UTF-8, it is not ISO-8859-1 (…

java encoding utf-8 inputstream illegal-characters
JAVA: passing an input or output stream to ITextRenderer (xhtml to pdf converter)

I want to convert my XHTML text to a PDF. I converted it to FileOutputStream but I ca'nt find a …

java itext inputstream outputstream pdf-conversion
FileNotFoundException on Android version > 2.3

I try to download a file to sdcard on my phone. On Android 2.1, 2.2 and 2.3 everything works like intended, but on …

java android inputstream filenotfoundexception
When I close a BufferedInputStream, is the underlying InputStream also closed?

InputStream in = SomeClass.getInputStream(...); BufferedInputStream bis = new BufferedInputStream(in); try { // read data from bis } finally { bis.close(); in.close(); } The …

java inputstream bufferedinputstream
How to convert the response from Okhttp into inputstream

CODE: public static String getRequestNoPayload(String urlString, String loginApi, String mUsername) throws Exception { Response response; try{ client.setConnectTimeout(20, TimeUnit.SECONDS); // …

android inputstream okhttp
How do an InputStream, InputStreamReader and BufferedReader work together in Java?

I am studying Android development (I'm a beginner in programming in general) and learning about HTTP networking and saw this …

java android inputstream bufferedreader inputstreamreader
Copy file to assets folder

After searching 1 hour i do not found any solution to my problem. I want to move a file from sdcard …

java android file inputstream android-assets
ObjectInputStream happy with FileInputStream, not happy with getResourceAsStream

I have some pretty standard code which takes in a serialized object from a stream, which bascially looks like this: …

java inputstream fileinputstream objectinputstream