Package dev.enola.common.io.resource
Class FileDescriptorResource
java.lang.Object
dev.enola.common.io.resource.BaseResource
dev.enola.common.io.resource.FileDescriptorResource
- All Implemented Interfaces:
AbstractResource,ReadableResource,Resource,WritableResource
Resource for "fd:0" (STDIN), "fd:1" (STDOUT), "fd:2" (STDERR) URIs.
The BaseResource.mediaType() will be MediaType.OCTET_STREAM (NOT
MediaType.APPLICATION_BINARY!), unless there is a ?mediaType= query
parameter in the URI argument.
The Charset of that Media Type will be the Charset.defaultCharset(), unless there is
either (check first) a ?charset= query parameter in the URI argument (e.g. "fd:0?charset=ASCII",
or "fd:1?charset=UTF-8", or "fd:2?charset=UTF-16BE") or the ?mediaType= query parameter includes
a charset (e.g. "fd:1?mediaType=application/yaml;charset=utf-16be").
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class dev.enola.common.io.resource.BaseResource
mediaType, uriFields inherited from interface dev.enola.common.io.resource.ReadableResource
LOGGER -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class dev.enola.common.io.resource.BaseResource
mediaType, toString, uriMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.enola.common.io.resource.AbstractResource
mediaType, uriMethods inherited from interface dev.enola.common.io.resource.ReadableResource
changeToken, charSource, isDifferent, isDifferentMethods inherited from interface dev.enola.common.io.resource.WritableResource
charSink
-
Field Details
-
STDOUT
- See Also:
-
STDOUT_URI
-
-
Constructor Details
-
FileDescriptorResource
-
-
Method Details
-
byteSink
- Specified by:
byteSinkin interfaceWritableResource
-
byteSource
- Specified by:
byteSourcein interfaceReadableResource
-