About 1,430,000 results
Open links in new tab
  1. Reading a file in java using fileinputstream - Stack Overflow

    May 26, 2015 · FileInputStream(File file) Creates a FileInputStream by opening a connection to an actual file, the file named by the File object file in the file system.

  2. How to read a file in Java with specific character encoding?

    However, after looking at thee Java 6 docs for FileInputStream, I see no constructors that accept an InputStreamReader as an arg. Can you update with a code example of what you mean? Thanks again!

  3. java - Get total size of file in bytes - Stack Overflow

    Jan 23, 2013 · FileInputStream fileinputstream = new FileInputStream(filename); What I want to do is to calculate the size of this file in bytes. How can I have this done?

  4. exception - Closing a Java FileInputStream - Stack Overflow

    Oct 1, 2008 · Closing a Java FileInputStream Asked 17 years, 2 months ago Modified 10 years, 8 months ago Viewed 58k times

  5. Convert InputStream to byte array in Java - Stack Overflow

    Aug 12, 2009 · Java documentation "Note that this method is intended for simple cases where it is convenient to read all bytes into a byte array. It is not intended for reading input streams with large …

  6. java - FileInputStream and ObjectInputStream - Stack Overflow

    Sep 12, 2014 · At the most primitive level, you are reading bits in from a file which the FileInputStream is able to do. This is then filtered through the ObjectInputStream which translates these bits into Java …

  7. java - How to convert InputStream to FileInputStream - Stack Overflow

    Aug 11, 2015 · FileInputStream input = new FileInputStream(temp.toFile()); // ... That said, I really don't see any benefit of doing so, or it must be required by a poor helper class/method which requires …

  8. java.io.FileNotFoundException: the system cannot find the file ...

    Nov 9, 2013 · Exception in thread "main" java.io.FileNotFoundException: word.txt (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at …

  9. java - FileInputStream vs FileReader - Stack Overflow

    Java programs use byte streams to perform input and output of 8-bit bytes. It is suitable for any kind of file, however not quite appropriate for text files. For example, if the file is using a unicode encoding …

  10. java - Reading InputStream as UTF-8 - Stack Overflow

    Since Java 7 it is possible to write the provide the Charset as a Constant not as a String StandardCharsets.UTF_8