org.apache.olingo.server.api

## Interface ODataContent

-     public interface ODataContent

  Contains the response content for the OData request.

  Because the content is potential streamable an error can occur when the `write` methods are used. If this happens NO exception will be thrown but if registered the org.apache.olingo.server.api.ODataContentWriteErrorCallback is called.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `write(OutputStream stream)` Write the available content into the given `OutputStream`.
    `void` | `write(WritableByteChannel channel)` Write the available content into the given `WritableByteChannel`.

- - ### Method Detail

    - #### write

          void write(WritableByteChannel channel)

      Write the available content into the given `WritableByteChannel`. If during write of the content an exception is thrown this exception will be catched and the org.apache.olingo.server.api.ODataContentWriteErrorCallback is called (if registered).
      Parameters:
        `channel` - channel in which the content is written.

    - #### write

          void write(OutputStream stream)

      Write the available content into the given `OutputStream`. If during write of the content an exception is thrown this exception will be catched and the org.apache.olingo.server.api.ODataContentWriteErrorCallback is called (if registered).
      Parameters:
        `stream` - stream in which the content is written.

Copyright © 2013–2022 The Apache Software Foundation. All rights reserved.