Top "Inputstream" questions

An abstract mechanism for reading a data stream in Java

How can I access a txt file in a jar with FileInputStream?

I am aware of the getResourceAsStream() method but there is an issue with the parser that reads the file, the …

java inputstream fileinputstream
getResourceAsStream filepath while running .jar

My code: BufferedInputStream bis = new BufferedInputStream(getClass().getResourceAsStream("playerhit.mp3")); This code works fine when the playerhit.mp3 file is …

java jar inputstream filepath
Properly closing Java Process InputStream from getInputStream

I could not find clarification of this in the documentation. But when we have a Process object and call getInputStream(), …

java process inputstream
What is the proper way to code a read-while loop in Scala?

What is the "proper" of writing the standard read-while loop in Scala? By proper I mean written in a Scala-like …

scala inputstream io
Java OutputStream Skip (offset)

I am trying to write a function that takes File object, offset and byte array parameters and writes that byte …

java io inputstream outputstream
cin.clear() doesn't reset cin object

I have the following loop. It should read numbers until EndOfFile, or the user input -999 int arr[100]; int index; …

c++ inputstream invalid-characters
IOUtils.copy and IOUtils.copyLarge are very slow

I've implemented a REST service for downloading a moderately large (250 Mb) zip file using IOUtils.copy(), similar to Most effective …

java http inputstream apache-commons-io
Access a resource outside a jar from the jar

I'm trying to access a resource from a jar file. The resource is located in the same directory where is …

java inputstream getresource
Unknown buffer size to be read from a DataInputStream in java

I have the following statement: DataInputStream is = new DataInputStream(process.getInputStream()); I would like to print the contents of this …

java io inputstream datainputstream
How to upload a Java OutputStream to AWS S3

I create PDF docs in memory as OutputStreams. These should be uploaded to S3. My problem is that it's not …

java amazon-web-services amazon-s3 inputstream outputstream