Package com.clickhouse.data
Class ClickHousePassThruStream
java.lang.Object
com.clickhouse.data.ClickHousePassThruStream
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ClickHouseFile
Deprecated.
This class encapsulates custom input and output stream to ensure no
compression/decompression will be applied during execution.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.static final StringDeprecated.static final ClickHousePassThruStreamDeprecated.Null stream which has no compression and format.static final StringDeprecated. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedClickHousePassThruStream(InputStream in, OutputStream out, ClickHouseCompression compression, int compressionLevel, ClickHouseFormat format) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Gets compression algorithm, which could be null.intDeprecated.Gets compression level.Deprecated.Gets data format, which could be null.Deprecated.Gets the input stream for reading.Deprecated.Gets the output stream for writing.booleanDeprecated.Checks if the compression algorithm is defined or not.booleanDeprecated.Checks if the data format is defined or not.booleanhasInput()Deprecated.Checks if input stream is available or not.booleanDeprecated.Checks if output stream is available or not.booleanDeprecated.Checks if the data is compressed or not.newInputStream(int bufferSize, Runnable postCloseAction) Deprecated.Creates a wrapped input stream for reading.newOutputStream(int bufferSize, Runnable postCloseAction) Deprecated.Creates a wrapped output stream for writing.static ClickHousePassThruStreamof(ClickHouseWriter writer, ClickHouseCompression compression, int compressionLevel, ClickHouseFormat format) Deprecated.static ClickHousePassThruStreamof(ClickHouseWriter writer, ClickHouseCompression compression, ClickHouseFormat format) Deprecated.static ClickHousePassThruStreamof(InputStream in, ClickHouseCompression compression, int compressionLevel, ClickHouseFormat format) Deprecated.static ClickHousePassThruStreamof(InputStream in, ClickHouseCompression compression, ClickHouseFormat format) Deprecated.static ClickHousePassThruStreamof(InputStream in, OutputStream out, ClickHouseCompression compression, int compressionLevel, ClickHouseFormat format) Deprecated.static ClickHousePassThruStreamof(OutputStream out, ClickHouseCompression compression, int compressionLevel, ClickHouseFormat format) Deprecated.static ClickHousePassThruStreamof(OutputStream out, ClickHouseCompression compression, ClickHouseFormat format) Deprecated.
-
Field Details
-
TYPE_NAME
Deprecated.- See Also:
-
ERROR_NO_INPUT
Deprecated.- See Also:
-
ERROR_NO_OUTPUT
Deprecated.- See Also:
-
NULL
Deprecated.Null stream which has no compression and format.
-
-
Constructor Details
-
ClickHousePassThruStream
protected ClickHousePassThruStream(InputStream in, OutputStream out, ClickHouseCompression compression, int compressionLevel, ClickHouseFormat format) Deprecated.
-
-
Method Details
-
of
public static ClickHousePassThruStream of(InputStream in, ClickHouseCompression compression, ClickHouseFormat format) Deprecated. -
of
public static ClickHousePassThruStream of(InputStream in, ClickHouseCompression compression, int compressionLevel, ClickHouseFormat format) Deprecated. -
of
public static ClickHousePassThruStream of(ClickHouseWriter writer, ClickHouseCompression compression, ClickHouseFormat format) Deprecated. -
of
public static ClickHousePassThruStream of(ClickHouseWriter writer, ClickHouseCompression compression, int compressionLevel, ClickHouseFormat format) Deprecated. -
of
public static ClickHousePassThruStream of(OutputStream out, ClickHouseCompression compression, ClickHouseFormat format) Deprecated. -
of
public static ClickHousePassThruStream of(OutputStream out, ClickHouseCompression compression, int compressionLevel, ClickHouseFormat format) Deprecated. -
of
public static ClickHousePassThruStream of(InputStream in, OutputStream out, ClickHouseCompression compression, int compressionLevel, ClickHouseFormat format) Deprecated. -
getInputStream
Deprecated.Gets the input stream for reading. Please pay attention that the returned input stream has nothing to do with this pass-thru stream, asgetInputStream().getUnderlyingStream()is alwaysNULL.- Returns:
- non-null input stream
-
newInputStream
Deprecated.Creates a wrapped input stream for reading. Calling this method multiple times will generate multipleClickHouseInputStreaminstances pointing to the same input stream, so it does not make sense to call this more than once. UnlikegetInputStream(), the returned input stream is associated with this pass-thru stream, sonewInputStream(...).getUnderlyingStream()simply returns the current pass-thru stream.- Parameters:
bufferSize- buffer size which is always greater than zero(usually 4096 or larger)postCloseAction- custom action will be performed right after closing the input stream- Returns:
- non-null wrapped input stream
-
getOutputStream
Deprecated.Gets the output stream for writing. Please pay attention that the returned output stream has nothing to do with this pass-thru stream, asgetOutputStream().getUnderlyingStream()is alwaysNULL.- Returns:
- non-null output stream
-
newOutputStream
Deprecated.Creates a wrapped output stream for writing. Calling this method multiple times will generate multipleClickHouseOutputStreaminstances, so it does not make sense to call this more than once. UnlikegetOutputStream(), the returned output stream is associated with this pass-thru stream, sonewOutputStream(...).getUnderlyingStream()simply returns the current pass-thru stream.- Parameters:
bufferSize- buffer size which is always greater than zero(usually 4096 or larger)postCloseAction- custom action will be performed right after closing the output stream- Returns:
- non-null wrapped output stream
-
getCompressionAlgorithm
Deprecated.Gets compression algorithm, which could be null. UsehasCompression()to check first.- Returns:
- compression algorithm, could be null
-
getCompressionLevel
public int getCompressionLevel()Deprecated.Gets compression level.- Returns:
- compression level
-
getFormat
Deprecated.Gets data format, which could be null. UsehasFormat()to check first.- Returns:
- data format, could be null
-
hasCompression
public boolean hasCompression()Deprecated.Checks if the compression algorithm is defined or not.- Returns:
- true if the compression algorithm is defined; false otherwise
-
hasFormat
public boolean hasFormat()Deprecated.Checks if the data format is defined or not.- Returns:
- true if the data format is defined; false otherwise
-
hasInput
public boolean hasInput()Deprecated.Checks if input stream is available or not.- Returns:
- true if input stream is available; false otherwise
-
hasOutput
public boolean hasOutput()Deprecated.Checks if output stream is available or not.- Returns:
- true if output stream is available; false otherwise
-
isCompressed
public boolean isCompressed()Deprecated.Checks if the data is compressed or not.- Returns:
- true if the data is compressed; false otherwise
-