Interface WritableResourceHandler.WritableResource

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.io.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.
      • Methods inherited from interface java.io.Closeable

        close
    • Method Detail

      • write

        java.io.OutputStream write()
                            throws java.io.IOException
        Returns the 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.
        Throws:
        java.io.IOException