|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.properties.config.transfer.templatestream.StreamPropertySink
public final class StreamPropertySink
Writes properties to a folder.
Constructor Summary | |
---|---|
StreamPropertySink(String template, PrintWriter stream, ValueEscaper escaper) Convenience constructor using a default table descriptor with no wrappers. |
|
StreamPropertySink(TableDescriptor descriptor, String template, PrintWriter stream, ValueEscaper escaper) Convenience constructor with no wrappers. |
|
StreamPropertySink(TableDescriptor descriptor, Wrapper documentWrapper, Wrapper lineWrapper, String template, PrintWriter stream, ValueEscaper escaper) Default constructor. |
Method Summary | |
---|---|
void |
clear() |
void |
close() |
void |
write(Iterable<de.smartics.properties.api.config.domain.PropertyProvider> providers) |
void |
write(de.smartics.properties.api.config.domain.PropertyProvider provider) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StreamPropertySink(String template, PrintWriter stream, ValueEscaper escaper) throws NullPointerException, IllegalArgumentException
The stream is closed by calling close()
by the client.
template
- the template to apply on each property.
stream
- the stream to write to.
escaper
- the escaper for config key, property name and value.
NullPointerException
- if
template
or
stream
is
null
.
IllegalArgumentException
- if
template
is blank.
public StreamPropertySink(TableDescriptor descriptor, String template, PrintWriter stream, ValueEscaper escaper) throws NullPointerException, IllegalArgumentException
The stream is closed by calling close()
by the client.
descriptor
- the descriptor for table and column names to store property values.
template
- the template to apply on each property.
stream
- the stream to write to.
escaper
- the escaper for config key, property name and value.
NullPointerException
- if
template
or
stream
is
null
.
IllegalArgumentException
- if
template
is blank.
public StreamPropertySink(TableDescriptor descriptor, Wrapper documentWrapper, Wrapper lineWrapper, String template, PrintWriter stream, ValueEscaper escaper) throws NullPointerException, IllegalArgumentException
The stream is closed by calling close()
by the client.
descriptor
- the descriptor for table and column names to store property values.
documentWrapper
- the introduction to write to the stream at the start.
lineWrapper
- the text to write to the stream at the end before closing the stream.
template
- the template to apply on each property.
stream
- the stream to write to.
escaper
- the escaper for config key, property name and value.
NullPointerException
- if
template
,
stream
, or
escaper
is
null
.
IllegalArgumentException
- if
template
is blank.
Method Detail |
---|
public void clear() throws de.smartics.properties.api.config.transfer.TransferException
This implementation is a no-op since a stream cannot be cleared.
clear
in interface
de.smartics.properties.api.config.transfer.PropertySink
de.smartics.properties.api.config.transfer.TransferException
public void write(de.smartics.properties.api.config.domain.PropertyProvider provider) throws de.smartics.properties.api.config.transfer.TransferException
write
in interface
de.smartics.properties.api.config.transfer.PropertySink
de.smartics.properties.api.config.transfer.TransferException
public void write(Iterable<de.smartics.properties.api.config.domain.PropertyProvider> providers) throws de.smartics.properties.api.config.transfer.TransferException
write
in interface
de.smartics.properties.api.config.transfer.PropertySink
de.smartics.properties.api.config.transfer.TransferException
public void close() throws de.smartics.properties.api.config.transfer.TransferException
This is a no-op.
close
in interface
de.smartics.properties.api.config.transfer.PropertySink
de.smartics.properties.api.config.transfer.TransferException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |