|
NIO2 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.classpath.icedtea.java.io.Outputs
public final class Outputs
This class consists exclusively of static methods that operate on output destinations.
The methods to write lines of text output a line terminator following
each line. The line terminator that is output is platform line terminated,
as defined by the line.separator system property.
| Method Summary | |
|---|---|
static void |
write(File file,
byte[] bytes)
Writes a byte array to a file. |
static void |
write(File file,
byte[] bytes,
int off,
int len)
Writes a byte array to a file. |
static void |
write(FileRef file,
byte[] bytes)
Writes a byte array to a file. |
static void |
write(FileRef file,
byte[] bytes,
int off,
int len)
Writes a byte array to a file. |
static void |
writeLines(File file,
List<String> lines)
Writes the given lines of text to the specified file. |
static void |
writeLines(File file,
List<String> lines,
String csn)
Writes the given lines of text to the specified file. |
static void |
writeLines(FileRef file,
List<String> lines)
Writes the given lines of text to the specified file. |
static void |
writeLines(FileRef file,
List<String> lines,
String csn)
Writes the given lines of text to the specified file. |
static void |
writeLines(FileRef file,
String... lines)
Writes the given lines of text to the specified file. |
static void |
writeLines(File file,
String... lines)
Writes the given lines of text to the specified file. |
static void |
writeLines(OutputStream out,
List<String> lines)
Writes the given lines of text to the specified output stream. |
static void |
writeLines(OutputStream out,
List<String> lines,
String csn)
Writes the given lines of text to the specified output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void write(FileRef file,
byte[] bytes)
throws IOException
IOException - If an I/O error occurs
public static void write(FileRef file,
byte[] bytes,
int off,
int len)
throws IOException
IndexOutOfBoundsException - If off or len is negative, or off+len
is greater than the length of the array
IOException - If an I/O error occurs
public static void writeLines(FileRef file,
List<String> lines,
String csn)
throws IOException
file - The filelines - The list of lines to write (in order)csn - The name of the charset to be used
UnsupportedCharsetException - If no support for the named charset is available
in this instance of the Java virtual machine
UnmappableCharacterException - Where a line contains a character that cannot be mapped to an
output byte sequence
IOException - If an I/O error occurs
public static void writeLines(FileRef file,
List<String> lines)
throws IOException
file - The filelines - The list of lines to write (in order)
UnmappableCharacterException - Where a line contains a character that cannot be mapped to an
output byte sequence
IOException - If an I/O error occurs
public static void writeLines(FileRef file,
String... lines)
throws IOException
file - The filelines - The array of lines to write (in order)
UnmappableCharacterException - Where a line contains a character that cannot be mapped to an
output byte sequence
IOException - If an I/O error occurs
public static void write(File file,
byte[] bytes)
throws IOException
file - The filebytes - The byte array to write to the file
IOException - If an I/O error occurs
public static void write(File file,
byte[] bytes,
int off,
int len)
throws IOException
IndexOutOfBoundsException - If off or len is negative, or off+len
is greater than the length of the array
IOException - If an I/O error occurs
public static void writeLines(File file,
List<String> lines,
String csn)
throws IOException
file - The filelines - The list of lines to write (in order)csn - The name of the charset to be used
UnsupportedCharsetException - If no support for the named charset is available
in this instance of the Java virtual machine
UnmappableCharacterException - Where a line contains a character that cannot be mapped to an
output byte sequence
IOException - If an I/O error occurs
public static void writeLines(File file,
List<String> lines)
throws IOException
file - The filelines - The list of lines to write (in order)
UnmappableCharacterException - Where a line contains a character that cannot be mapped to an
output byte sequence
IOException - If an I/O error occurs
public static void writeLines(File file,
String... lines)
throws IOException
file - The filelines - The array of lines to write (in order)
UnmappableCharacterException - Where a line contains a character that cannot be mapped to an
output byte sequence
IOException - If an I/O error occurs
public static void writeLines(OutputStream out,
List<String> lines,
String csn)
throws IOException
out - The output streamlines - The list of lines to write (in order)csn - The name of the charset to be used
UnmappableCharacterException - Where a line contains a character that cannot be mapped to an
output byte sequence
IOException - If an I/O error occurs
public static void writeLines(OutputStream out,
List<String> lines)
throws IOException
out - The output streamlines - The list of lines to write (in order)
UnmappableCharacterException - Where a line contains a character that cannot be mapped to an
output byte sequence
IOException - If an I/O error occurs
|
NIO2 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright © 2007, 2011, Oracle and/or its affiliates. All rights reserved.