Package java.io
Class PrintWriter
void write(char[] charArray)
Overrides:
void write(char[] charArray, int offset, int count)
Overrides:
void write(int ch)
Overrides:
void write(String str)
Overrides:
void write(String str, int offset, int count)
Overrides:
_INSERT_METHOD_SIGNATURE_HERE_
Description:
write(char[] charArray) method:
This method writes the specified character array to this stream. If the byte is a newline and automatic flushing is enabled then the flush method will be invoked.
write(char[] charArray, int offset, int count) method:
This method writes count characters from the specified character array starting at offest off to this stream. If automatic flushing is enabled then the flush method will be invoked.
write(int chr) method:
This method writes the specified character to this stream. If the byte is a newline and automatic flushing is enabled then the flush method will be invoked.
write(String str) method:
This method writes the specified string to this stream. If the byte is a newline and automatic flushing is enabled then the flush method will be invoked.
write(String str, int offset, int count) method:
This method writes count characters from the specified string starting at offest off to this stream. If automatic flushing is enabled then the flush method will be invoked.
Example
File file = new File("testFile");
int fileInt = 100;
OutputStream fos = new FileOutputStream(file);
PrintWriter pw = new PrintWriter(fos);
...
pw.write(fileInt);
The example above prints the specified character to the file.