THE Java™ Programming Language, Fourth Edition
public void run() { try { try { for (char c = 'a'; c <= 'z'; c++) out.write(c); } finally { out.close(); } } catch (IOExcepti ...
Creates a ByteArrayInputStream from the specified array of bytes using only the part of buf from buf[offset] to buf[offset+count ...
20.5.6. CharArray Character Streams The CharArray character streams are analogous to the ByteArray byte streamsthey let you use ...
20.5.7. String Character Streams The StringReader reads its characters from a String and will never block. It provides a single ...
for (int i = 0; i < objs.length; i++) out.println(i + ": " + objs[i]); return strOut.toString(); } 20.5.8. Print Streams The ...
publicPrintWriter(OutputStream out) Equivalent to PrintWriter(newOutputStreamWriter(out), false). publicPrintWriter(File file)th ...
20.5.9. LineNumberReader The LineNumberReader stream keeps track of line numbers while reading text. As usual a line is consider ...
20.5.10. SequenceInputStream The SequenceInputStream class creates a single input stream from reading one or more byte input str ...
20.5.11. Pushback Streams A Pushback stream lets you push back, or "unread," characters or bytes when you have read too far. Pus ...
Pushes back the characters in the specified subarray. The first character pushed back is buf[offset] and the last is buf[offset+ ...
TT_WORD: A word was scanned. The String field sval contains the word that was found. TT_NUMBER: A number was scanned. The doubl ...
} } return attrs; } The attribute file uses '#' to mark comments. Ignoring these comments, the stream is searched for a string t ...
is the quote character ch. You can have more than one quote character at a time on a stream, but strings must start and end with ...
public voidslashSlashComments(boolean flag) If flag is true, the tokenizer recognizes // to end-of-line comments. This occurs in ...
readBoolean writeBoolean boolean readChar writeChar char readByte writeByte byte readShort writeShort short readInt writeInt int ...
Reads two input bytes and returns an int value in the range 0 through The first byte read is made the high byte. This method is ...
data[i] = in.readDouble(); in.close(); return data; } The writeData method first opens the file and writes the array length. It ...
the same file using two different FileOutputStream objects at the same time. The flush method of FileOutputStream and FileWriter ...
The "random access" in the name of the class refers to the ability to set the read/write file pointer to any position in the fil ...
A path is separated into directory and file parts by a char stored in the static field separatorChar and available as a String i ...
«
17
18
19
20
21
22
23
24
25
26
»
Free download pdf