Uses of Class
java.io.Writer
Packages that useWriter Package Description java.io Provides for system input and output through data streams, serialization and the file system.java.nio.channels Defines channels, which represent connections to entities that are capable of performing I/O operations, such as files and sockets; defines selectors, for multiplexed, non-blocking I/O operations.java.sql Provides the API for accessing and processing data stored in adata source (usually a relational database) using theJava™ programming language.java.util Contains the collections framework, some internationalization support classes, a service loader, properties, random number generation, string parsing and scanning classes, base64 encoding and decoding, a bit array, and several miscellaneous utility classes.javax.lang.model.util Utilities to assist in the processing ofprogram elements andtypes.javax.script The scripting API consists of interfaces and classes that defineJava™ Scripting Engines and providesa framework for their use in Java applications.javax.sql.rowset Standard interfaces and base classes for JDBCRowSetimplementations.javax.sql.rowset.serial Provides utility classes to allow serializable mappings between SQL typesand data types in the Java programming language.javax.sql.rowset.spi The standard classes and interfaces that a third party vendor has to use in its implementation of a synchronization provider.javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.javax.swing.text.html Provides the classHTMLEditorKitand supporting classes for creating HTML text editors.javax.swing.text.rtf Provides a class (RTFEditorKit) for creating Rich-Text-Format text editors.javax.tools Provides interfaces for tools which can be invoked from a program, for example, compilers.javax.xml.stream Defines interfaces and classes for the Streaming API for XML (StAX).javax.xml.stream.events Defines event interfaces for the Streaming API for XML (StAX).javax.xml.transform.stream Provides stream and URI specific transformation classes.org.w3c.dom.ls Provides interfaces for DOM Level 3 Load and Save.Uses ofWriter injava.io
Subclasses ofWriter injava.io Modifier and Type Class Description classBufferedWriterWrites text to a character-output stream, buffering characters so as to provide for the efficient writing of single characters, arrays, and strings.classCharArrayWriterThis class implements a character buffer that can be used as an Writer.classFileWriterWrites text to character files using a default buffer size.classFilterWriterAbstract class for writing filtered character streams.classOutputStreamWriterAn OutputStreamWriter is a bridge from character streams to byte streams: Characters written to it are encoded into bytes using a specifiedcharset.classPipedWriterPiped character-output streams.classPrintWriterPrints formatted representations of objects to a text-output stream.classStringWriterA character stream that collects its output in a string buffer, which can then be used to construct a string.Fields injava.io declared asWriter Modifier and Type Field Description protectedWriterFilterWriter. outThe underlying character-output stream.protectedWriterPrintWriter. outThe underlying character-output stream of thisPrintWriter.Methods injava.io that returnWriter Modifier and Type Method Description WriterWriter. append(char c)Appends the specified character to this writer.WriterWriter. append(CharSequence csq)Appends the specified character sequence to this writer.WriterWriter. append(CharSequence csq, int start, int end)Appends a subsequence of the specified character sequence to this writer.staticWriterWriter. nullWriter()Returns a newWriterwhich discards all characters.Methods injava.io with parameters of typeWriter Modifier and Type Method Description longReader. transferTo(Writer out)Reads all characters from this reader and writes the characters to the given writer in the order that they are read.voidCharArrayWriter. writeTo(Writer out)Writes the contents of the buffer to another character stream.Constructors injava.io with parameters of typeWriter Constructor Description BufferedWriter(Writer out)Creates a buffered character-output stream that uses a default-sized output buffer.BufferedWriter(Writer out, int sz)Creates a new buffered character-output stream that uses an output buffer of the given size.FilterWriter(Writer out)Create a new filtered writer.PrintWriter(Writer out)Creates a new PrintWriter, without automatic line flushing.PrintWriter(Writer out, boolean autoFlush)Creates a new PrintWriter.Uses ofWriter injava.nio.channels
Methods injava.nio.channels that returnWriter Modifier and Type Method Description staticWriterChannels. newWriter(WritableByteChannel ch,String csName)Constructs a writer that encodes characters according to the named charset and writes the resulting bytes to the given channel.staticWriterChannels. newWriter(WritableByteChannel ch,Charset charset)Constructs a writer that encodes characters according to the given charset and writes the resulting bytes to the given channel.staticWriterChannels. newWriter(WritableByteChannel ch,CharsetEncoder enc, int minBufferCap)Constructs a writer that encodes characters using the given encoder and writes the resulting bytes to the given channel.Uses ofWriter injava.sql
Methods injava.sql that returnWriter Modifier and Type Method Description WriterClob. setCharacterStream(long pos)Retrieves a stream to be used to write a stream of Unicode characters to theCLOBvalue that thisClobobject represents, at positionpos.WriterSQLXML. setCharacterStream()Retrieves a stream to be used to write the XML value that this SQLXML instance represents.Uses ofWriter injava.util
Methods injava.util with parameters of typeWriter Modifier and Type Method Description voidProperties. store(Writer writer,String comments)Writes this property list (key and element pairs) in thisPropertiestable to the output character stream in a format suitable for using theload(Reader)method.Uses ofWriter injavax.lang.model.util
Methods injavax.lang.model.util with parameters of typeWriter Modifier and Type Method Description voidElements. printElements(Writer w,Element... elements)Prints a representation of the elements to the given writer in the specified order.Uses ofWriter injavax.script
Fields injavax.script declared asWriter Modifier and Type Field Description protectedWriterSimpleScriptContext. errorWriterThis is the writer to be used to output errors from scripts.protectedWriterSimpleScriptContext. writerThis is the writer to be used to output from scripts.Methods injavax.script that returnWriter Modifier and Type Method Description WriterScriptContext. getErrorWriter()Returns theWriterused to display error output.WriterScriptContext. getWriter()Returns theWriterfor scripts to use when displaying output.Methods injavax.script with parameters of typeWriter Modifier and Type Method Description voidScriptContext. setErrorWriter(Writer writer)Sets theWriterused to display error output.voidScriptContext. setWriter(Writer writer)Sets theWriterfor scripts to use when displaying output.Uses ofWriter injavax.sql.rowset
Methods injavax.sql.rowset with parameters of typeWriter Modifier and Type Method Description voidWebRowSet. writeXml(Writer writer)Writes the data, properties, and metadata for thisWebRowSetobject to the givenWriterobject in XML format.voidWebRowSet. writeXml(ResultSet rs,Writer writer)Populates thisWebRowSetobject with the contents of the givenResultSetobject and writes its data, properties, and metadata to the givenWriterobject in XML format.Uses ofWriter injavax.sql.rowset.serial
Methods injavax.sql.rowset.serial that returnWriter Modifier and Type Method Description WriterSerialClob. setCharacterStream(long pos)Retrieves a stream to be used to write a stream of Unicode characters to theCLOBvalue that thisSerialClobobject represents, at positionpos.Uses ofWriter injavax.sql.rowset.spi
Methods injavax.sql.rowset.spi with parameters of typeWriter Modifier and Type Method Description voidXmlWriter. writeXML(WebRowSet caller,Writer writer)Writes the givenWebRowSetobject to the specifiedjava.io.Writeroutput stream as an XML document.Uses ofWriter injavax.swing.text
Methods injavax.swing.text that returnWriter Modifier and Type Method Description protectedWriterAbstractWriter. getWriter()Returns the Writer that is used to output the content.Methods injavax.swing.text with parameters of typeWriter Modifier and Type Method Description voidDefaultEditorKit. write(Writer out,Document doc, int pos, int len)Writes content from a document to the given stream as plain text.abstract voidEditorKit. write(Writer out,Document doc, int pos, int len)Writes content from a document to the given stream in a format appropriate for this kind of content handler.voidJTextComponent. write(Writer out)Stores the contents of the model into the given stream.Constructors injavax.swing.text with parameters of typeWriter Constructor Description AbstractWriter(Writer w,Document doc)Creates a new AbstractWriter.AbstractWriter(Writer w,Document doc, int pos, int len)Creates a new AbstractWriter.AbstractWriter(Writer w,Element root)Creates a new AbstractWriter.AbstractWriter(Writer w,Element root, int pos, int len)Creates a new AbstractWriter.Uses ofWriter injavax.swing.text.html
Methods injavax.swing.text.html with parameters of typeWriter Modifier and Type Method Description voidHTMLEditorKit. write(Writer out,Document doc, int pos, int len)Write content from a document to the given stream in a format appropriate for this kind of content handler.Constructors injavax.swing.text.html with parameters of typeWriter Constructor Description HTMLWriter(Writer w,HTMLDocument doc)Creates a new HTMLWriter.HTMLWriter(Writer w,HTMLDocument doc, int pos, int len)Creates a new HTMLWriter.MinimalHTMLWriter(Writer w,StyledDocument doc)Creates a new MinimalHTMLWriter.MinimalHTMLWriter(Writer w,StyledDocument doc, int pos, int len)Creates a new MinimalHTMLWriter.Uses ofWriter injavax.swing.text.rtf
Methods injavax.swing.text.rtf with parameters of typeWriter Modifier and Type Method Description voidRTFEditorKit. write(Writer out,Document doc, int pos, int len)Write content from a document to the given stream as plain text.Uses ofWriter injavax.tools
Methods injavax.tools that returnWriter Modifier and Type Method Description WriterFileObject. openWriter()Returns a Writer for this file object.WriterForwardingFileObject. openWriter()WriterSimpleJavaFileObject. openWriter()Wraps the result of openOutputStream in a Writer.Methods injavax.tools with parameters of typeWriter Modifier and Type Method Description DocumentationTool.DocumentationTaskDocumentationTool. getTask(Writer out,JavaFileManager fileManager,DiagnosticListener<? superJavaFileObject> diagnosticListener,Class<?> docletClass,Iterable<String> options,Iterable<? extendsJavaFileObject> compilationUnits)Creates a future for a documentation task with the given components and arguments.JavaCompiler.CompilationTaskJavaCompiler. getTask(Writer out,JavaFileManager fileManager,DiagnosticListener<? superJavaFileObject> diagnosticListener,Iterable<String> options,Iterable<String> classes,Iterable<? extendsJavaFileObject> compilationUnits)Creates a future for a compilation task with the given components and arguments.Uses ofWriter injavax.xml.stream
Methods injavax.xml.stream with parameters of typeWriter Modifier and Type Method Description abstractXMLEventWriterXMLOutputFactory. createXMLEventWriter(Writer stream)Create a new XMLEventWriter that writes to a writerabstractXMLStreamWriterXMLOutputFactory. createXMLStreamWriter(Writer stream)Create a new XMLStreamWriter that writes to a writerUses ofWriter injavax.xml.stream.events
Methods injavax.xml.stream.events with parameters of typeWriter Modifier and Type Method Description voidXMLEvent. writeAsEncodedUnicode(Writer writer)This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters.Uses ofWriter injavax.xml.transform.stream
Methods injavax.xml.transform.stream that returnWriter Modifier and Type Method Description WriterStreamResult. getWriter()Get the character stream that was set with setWriter.Methods injavax.xml.transform.stream with parameters of typeWriter Modifier and Type Method Description voidStreamResult. setWriter(Writer writer)Set the writer that is to receive the result.Constructors injavax.xml.transform.stream with parameters of typeWriter Constructor Description StreamResult(Writer writer)Construct a StreamResult from a character stream.Uses ofWriter inorg.w3c.dom.ls
Methods inorg.w3c.dom.ls that returnWriter Modifier and Type Method Description WriterLSOutput. getCharacterStream()An attribute of a language and binding dependent type that represents a writable stream to which 16-bit units can be output.Methods inorg.w3c.dom.ls with parameters of typeWriter Modifier and Type Method Description voidLSOutput. setCharacterStream(Writer characterStream)An attribute of a language and binding dependent type that represents a writable stream to which 16-bit units can be output.