public abstract class StreamBase extends DataValue
Abstract base class for streams.
Constructor and Description |
---|
StreamBase() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this stream.
|
void |
flush()
Flush any buffered writes from this stream.
|
java.lang.String |
getEntityTag()
Return (nullable) Entity tag if known, otherwise
null . |
java.lang.String |
getFileName()
Return (nullable) File name if known, otherwise
null . |
java.lang.String |
getMediaType()
Return (nullable) Media type if known, otherwise
null . |
void |
setEntityTag(java.lang.String value)
Set entity tag if known, otherwise
null . |
void |
setFileName(java.lang.String value)
Set file name if known, otherwise
null . |
void |
setMediaType(java.lang.String value)
Set media type if known, otherwise
null . |
cloneMutable, equals, getDataType, getTypeCode, hashCode, toString
public void close()
Close this stream. Automatically calls StreamBase.flush
before closing.
This function can be safely called if the stream is already closed.
public void flush()
Flush any buffered writes from this stream.
public java.lang.String getEntityTag()
Return (nullable) Entity tag if known, otherwise null
.
public java.lang.String getFileName()
Return (nullable) File name if known, otherwise null
.
null
.public java.lang.String getMediaType()
Return (nullable) Media type if known, otherwise null
.
public void setEntityTag(java.lang.String value)
Set entity tag if known, otherwise null
.
value
- Entity tag if known, otherwise `null`.public void setFileName(java.lang.String value)
Set file name if known, otherwise null
.
value
- File name if known, otherwise null
.public void setMediaType(java.lang.String value)
Set media type if known, otherwise null
.
value
- Media type if known, otherwise `null`.