public static interface WritableResourceHandler.WritableResource extends ResourceHandler.Resource, Closeable
| Modifier and Type | Method and Description |
|---|---|
OutputStream |
write()
Returns the
OutputStream stream of the resource, if exists, it will replace the existing content, or if
not exists, the resource will be created. |
readOutputStream write() throws IOException
OutputStream stream of the resource, if exists, it will replace the existing content, or if
not exists, the resource will be created. The stream should be closed by caller, otherwise resource leaks might
be introduced. How and when content is written is left to implementation, but it is guaranteed that this method
is called only once, and will be followed by Closeable.close() on the resource itself. Implementation does not
have to be "read consistent", in a way to worry what subsequent ResourceHandler.Resource.read() method will return, as mixed
calls will not happen on same instance of resource.IOExceptionCopyright © 2002–2019 The Apache Software Foundation. All rights reserved.