java-io
Java stream misconceptions... some clarification?
I understand that byte streams deal with bytes and character streams deal with characters... if I use a byte stream to read in characters, could this limit me to the sorts of characters I might read?[详细]
2023-03-27 02:26 分类:问答File encryption and decryption
I am using the following code to encrypt video files on the sdcard. apparently when it is encrypted, the file is 0kb. Is this supposed to happen?[详细]
2023-03-22 23:01 分类:问答isDirectory() returns true for a file
In my java program I copy a file and delete the new file. In my method removeFile() I check if it is a directory:[详细]
2023-03-20 00:58 分类:问答Modify Printing attribute for Media Name Java Apache FOP API
Am using Apache FOP API to print a document which was working well for a while but now it is trying to print on a legal size paper on tray 1. Am wondering if i can change that to Letter size so that u[详细]
2023-03-19 16:43 分类:问答Reading two different objects from file
I am trying to read 2 arraylists using the following methods. public static ArrayList<Contestant> readContestantsFromFile() throws IOException, ClassNotFoundException {[详细]
2023-03-17 17:34 分类:问答Is it possible to write to the same file from different methods?
I have the following method: public static void writeContestantsToFile(ArrayList<Contestant> contestants) throws IOException {[详细]
2023-03-17 17:10 分类:问答Unable to write some ascii values above to a file in java
I am writing a java code to write ASCII characters to a file. But when I try to write any character of ASCII value of more than 140 or less than 32 to a text file, I get a blank file. It does not writ[详细]
2023-03-15 21:36 分类:问答How to use javas Process.waitFor()?
I am trying to run command line commands from Java and a quick sanity check made me realize that the reason I am having trouble is that I can\'t get the pr.waitFor() call below to work. This programs[详细]
2023-03-09 13:18 分类:问答What is wrong with FileInputStream.read(byte[])?
In response to my answer to a file-reading question, a commenter stated that FileInputStream.read(byte[]) is \"not guaranteed to fill the buffer.\"[详细]
2023-03-08 02:37 分类:问答Limit method calls per second(s) (refuse when limit reached)
I have a method that does some IO, and I\'d like to limit the calls (per second) to this method to avoid the backend to get bursts of concurrent requests it can\'t handle.[详细]
2023-03-07 03:39 分类:问答