biz.c24.io.api.presentation
Class TagValuePairSink

java.lang.Object
  extended by biz.c24.io.api.presentation.Sink
      extended by biz.c24.io.api.presentation.TagValuePairSink
All Implemented Interfaces:
Serializable, Cloneable

public class TagValuePairSink
extends Sink

A sink for generating simple tag value pair output from a data object.

Note that this implementation is not synchronized. If multiple threads use an instance concurrently, it must be synchronized externally.

See Also:
Sink, Serialized Form

Constructor Summary
TagValuePairSink()
          Constructs a new instance.
TagValuePairSink(OutputStream stream)
          Constructs a new instance which will write to stream.
TagValuePairSink(TagValuePairSink clone)
          Constructs a new instance cloned from clone.
TagValuePairSink(Writer writer)
          Constructs a new instance which will write to writer.
 
Method Summary
 Object clone()
           
 boolean isHumanReadable()
          Deprecated. Use isIndenting() instead.
 boolean isIndenting()
          Returns whether human readable output will be produced, i.e. with newlines and indentations.
 void setHumanReadable(boolean humanReadable)
          Deprecated. Use setIndenting(boolean) instead.
 void setIndenting(boolean indenting)
          Sets whether human readable output will be produced.
 void writeObject(ComplexDataObject obj)
          Writes an object to the writer or output stream that has been set.
 
Methods inherited from class biz.c24.io.api.presentation.Sink
checkInit, clearBatchIterators, getEncoding, getOutputStream, getWriter, registerBatchIterator, setEncoding, setOutputStream, setWriter, stream, unregisterBatchIterator, writer
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TagValuePairSink

public TagValuePairSink()
Constructs a new instance.


TagValuePairSink

public TagValuePairSink(TagValuePairSink clone)
Constructs a new instance cloned from clone.

Parameters:
clone - The instance to clone.

TagValuePairSink

public TagValuePairSink(OutputStream stream)
Constructs a new instance which will write to stream.

Parameters:
stream - The stream to write the tag value pair data to.

TagValuePairSink

public TagValuePairSink(Writer writer)
Constructs a new instance which will write to writer.

Parameters:
writer - The writer to write the tag value pair data to.
Method Detail

isIndenting

public boolean isIndenting()
Returns whether human readable output will be produced, i.e. with newlines and indentations. The default value is true.

Returns:
whether human readable output will be created.

setIndenting

public void setIndenting(boolean indenting)
Sets whether human readable output will be produced.

Parameters:
indenting - The new value.

isHumanReadable

public boolean isHumanReadable()
Deprecated. Use isIndenting() instead.

Returns whether human readable output will be produced, i.e. with newlines and indentations. The default value is true.

Returns:
whether human readable output will be created.

setHumanReadable

public void setHumanReadable(boolean humanReadable)
Deprecated. Use setIndenting(boolean) instead.

Sets whether human readable output will be produced.

Parameters:
humanReadable - The new value.

writeObject

public void writeObject(ComplexDataObject obj)
                 throws IOException
Description copied from class: Sink
Writes an object to the writer or output stream that has been set.

Specified by:
writeObject in class Sink
Parameters:
obj - The object to be written.
Throws:
IOException - If the complete object could not be written for any reason.

clone

public Object clone()
Specified by:
clone in class Sink


C24 Technologies © 2002-2012: All Rights Reserved.