Package org.apache.maven.doxia.sink.impl
Class RandomAccessSink
- java.lang.Object
-
- org.apache.maven.doxia.sink.impl.AbstractSink
-
- org.apache.maven.doxia.sink.impl.SinkWrapper
-
- org.apache.maven.doxia.sink.impl.RandomAccessSink
-
@Deprecated public class RandomAccessSink extends SinkWrapper
Deprecated.UseBufferingSinkProxyFactoryinstead which buffers on the (higher) Sink API level which usually is less memory intense than buffering the output stream which is done by this class. Also it doesn't require dynamically creating new sinks leveraging aSinkFactory.The RandomAccessSink provides the ability to create aSinkwith hooks. A page can be prepared by first creating its structure and specifying the positions of these hooks. After specifying the structure, the page can be filled with content from one or more models. These hooks can prevent you to have to loop over the model multiple times to build the page as desired.- Since:
- 1.3
- See Also:
BufferingSinkProxyFactory
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.OutputStreamcoreOutputStreamDeprecated.private SinkcoreSinkDeprecated.private SinkcurrentSinkDeprecated.private java.lang.StringencodingDeprecated.private java.util.List<java.io.ByteArrayOutputStream>outputStreamsDeprecated.private SinkFactorysinkFactoryDeprecated.private java.util.List<Sink>sinksDeprecated.-
Fields inherited from interface org.apache.maven.doxia.markup.Markup
COLON, EOL, EQUAL, GREATER_THAN, LEFT_CURLY_BRACKET, LEFT_SQUARE_BRACKET, LESS_THAN, MINUS, PLUS, QUOTE, RIGHT_CURLY_BRACKET, RIGHT_SQUARE_BRACKET, SEMICOLON, SLASH, SPACE, STAR
-
Fields inherited from interface org.apache.maven.doxia.sink.Sink
JUSTIFY_CENTER, JUSTIFY_LEFT, JUSTIFY_RIGHT, NUMBERING_DECIMAL, NUMBERING_LOWER_ALPHA, NUMBERING_LOWER_ROMAN, NUMBERING_UPPER_ALPHA, NUMBERING_UPPER_ROMAN, SECTION_LEVEL_1, SECTION_LEVEL_2, SECTION_LEVEL_3, SECTION_LEVEL_4, SECTION_LEVEL_5, SECTION_LEVEL_6
-
-
Constructor Summary
Constructors Constructor Description RandomAccessSink(SinkFactory sinkFactory, java.io.File outputDirectory, java.lang.String outputName)Deprecated.Constructor for RandomAccessSink.RandomAccessSink(SinkFactory sinkFactory, java.io.File outputDirectory, java.lang.String outputName, java.lang.String encoding)Deprecated.Constructor for RandomAccessSink.RandomAccessSink(SinkFactory sinkFactory, java.io.OutputStream stream)Deprecated.Constructor for RandomAccessSink.RandomAccessSink(SinkFactory sinkFactory, java.io.OutputStream stream, java.lang.String encoding)Deprecated.Constructor for RandomAccessSink.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description SinkaddSinkHook()Deprecated.By calling this method a sink reference is added at the current position.voidclose()Deprecated.Close all sinksvoidflush()Deprecated.Flush all sinks-
Methods inherited from class org.apache.maven.doxia.sink.impl.SinkWrapper
address, address_, anchor, anchor_, article, article_, author, author_, blockquote, blockquote_, body, body_, bold, bold_, comment, content, content_, data, data_, date, date_, definedTerm, definedTerm_, definition, definition_, definitionList, definitionList_, definitionListItem, definitionListItem_, division, division_, figure, figure_, figureCaption, figureCaption_, figureGraphics, footer, footer_, getDocumentLocator, getWrappedSink, head, head_, header, header_, horizontalRule, inline, inline_, italic, italic_, lineBreak, lineBreakOpportunity, link, link_, list, list_, listItem, listItem_, monospaced, monospaced_, navigation, navigation_, nonBreakingSpace, numberedList, numberedList_, numberedListItem, numberedListItem_, pageBreak, paragraph, paragraph_, rawText, section, section_, sectionTitle, sectionTitle_, setDocumentLocator, setWrappedSink, sidebar, sidebar_, table, table_, tableCaption, tableCaption_, tableCell, tableCell_, tableHeaderCell, tableHeaderCell_, tableRow, tableRow_, tableRows, tableRows_, text, time, time_, title, title_, unknown, verbatim, verbatim_
-
Methods inherited from class org.apache.maven.doxia.sink.impl.AbstractSink
address, anchor, article, author, blockquote, body, content, data, date, definedTerm, definition, definitionList, definitionListItem, division, figure, figureCaption, figureGraphics, footer, formatLocation, getLocationLogPrefix, head, header, horizontalRule, init, inline, lineBreak, lineBreakOpportunity, link, list, listItem, navigation, numberedList, numberedListItem, paragraph, section1, section1_, section2, section2_, section3, section3_, section4, section4_, section5, section5_, section6, section6_, sectionTitle, sectionTitle_, sectionTitle1, sectionTitle1_, sectionTitle2, sectionTitle2_, sectionTitle3, sectionTitle3_, sectionTitle4, sectionTitle4_, sectionTitle5, sectionTitle5_, sectionTitle6, sectionTitle6_, sidebar, table, tableCaption, tableCell, tableHeaderCell, tableRow, tableRows, text, time, title, unifyEOLs, verbatim
-
-
-
-
Field Detail
-
sinkFactory
private SinkFactory sinkFactory
Deprecated.
-
encoding
private java.lang.String encoding
Deprecated.
-
coreOutputStream
private java.io.OutputStream coreOutputStream
Deprecated.
-
coreSink
private Sink coreSink
Deprecated.
-
sinks
private java.util.List<Sink> sinks
Deprecated.
-
outputStreams
private java.util.List<java.io.ByteArrayOutputStream> outputStreams
Deprecated.
-
currentSink
private Sink currentSink
Deprecated.
-
-
Constructor Detail
-
RandomAccessSink
public RandomAccessSink(SinkFactory sinkFactory, java.io.OutputStream stream) throws java.io.IOException
Deprecated.Constructor for RandomAccessSink.
- Parameters:
sinkFactory- aSinkFactoryobject.stream- aOutputStreamobject.- Throws:
java.io.IOException- if any.
-
RandomAccessSink
public RandomAccessSink(SinkFactory sinkFactory, java.io.OutputStream stream, java.lang.String encoding) throws java.io.IOException
Deprecated.Constructor for RandomAccessSink.
- Parameters:
sinkFactory- aSinkFactoryobject.stream- aOutputStreamobject.encoding- aStringobject.- Throws:
java.io.IOException- if any.
-
RandomAccessSink
public RandomAccessSink(SinkFactory sinkFactory, java.io.File outputDirectory, java.lang.String outputName) throws java.io.IOException
Deprecated.Constructor for RandomAccessSink.
- Parameters:
sinkFactory- aSinkFactoryobject.outputDirectory- aFileobject.outputName- aStringobject.- Throws:
java.io.IOException- if any.
-
RandomAccessSink
public RandomAccessSink(SinkFactory sinkFactory, java.io.File outputDirectory, java.lang.String outputName, java.lang.String encoding) throws java.io.IOException
Deprecated.Constructor for RandomAccessSink.
- Parameters:
sinkFactory- aSinkFactoryobject.outputDirectory- aFileobject.outputName- aStringobject.encoding- aStringobject.- Throws:
java.io.IOException- if any.
-
-
Method Detail
-
addSinkHook
public Sink addSinkHook()
Deprecated.By calling this method a sink reference is added at the current position. You can write to both the new sink reference and the original sink. After flushing all sinks will be flushed in the right order.- Returns:
- a subsink reference you can write to
-
close
public void close()
Deprecated.Close all sinks- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceSink- Overrides:
closein classSinkWrapper
-
flush
public void flush()
Deprecated.Flush all sinks- Specified by:
flushin interfaceSink- Overrides:
flushin classSinkWrapper
-
-