|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SparkWriter
Classes that implement this interface can be used to write Spark values out to some external form. There will be a class implementing this interface for each form of output.
Method Summary | |
---|---|
void |
close()
this will close the stream and flush any output buffers. |
void |
flush()
This will flush the stream's buffers |
TypeFactory |
getTypeFactory()
This will return the TypeFactory currently being used. |
boolean |
isPretty()
This returns true if the output is being pretty printed for human consumption rather than condensed for files and network message uses. |
void |
setOutput(java.io.OutputStream output)
This will set the OutputStream to which the data is to be written. |
void |
setPretty(boolean pretty)
This tells the writer whether the output should be pretty-printed for human consumption or condensed for system communication or storage. |
void |
setTypeFactory(TypeFactory factory)
This is the type factory to be used when converting internal Java classes into an external form. |
java.lang.String |
toString(SV value)
This will write the value to a String. |
void |
write(SV value)
This is the heart of the SparkWriter. |
Method Detail |
---|
void setTypeFactory(TypeFactory factory)
factory
- the type factory to be used.TypeFactory getTypeFactory()
void setOutput(java.io.OutputStream output)
output
- where the output is to be sent.void write(SV value)
value
- the value to be written.java.lang.String toString(SV value)
value
- the value to be written out.
java.lang.RuntimeException
- if a particular SparkWriter class does not
generate string output.boolean isPretty()
void setPretty(boolean pretty)
pretty
- true if the output is for human consumption.void close()
void flush()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |