com.ibm.broker.rest

Class StaticContent

  • java.lang.Object
    • com.ibm.broker.rest.StaticContent


  • public final class StaticContent
    extends java.lang.Object
    A class that defines static content that can be served as supporting documentation for an API.
    Since:
    IBM Integration Bus v10
    • Constructor Summary

      Constructors 
      Constructor and Description
      StaticContent(java.lang.String path, java.lang.String contentType, byte[] content)
      Create a new static content object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      byte[] getContent()
      Get the content.
      java.lang.String getContentType()
      Get the content type of the content, for example application/json.
      java.lang.String getPath()
      Get the path that the content should be served under, for example /document.json.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StaticContent

        public StaticContent(java.lang.String path,
                             java.lang.String contentType,
                             byte[] content)
        Create a new static content object.
        Parameters:
        path - the path that the content should be served under, for example /document.json.
        contentType - the content type of the content, for example application/json.
        content - the content.
    • Method Detail

      • getPath

        public java.lang.String getPath()
        Get the path that the content should be served under, for example /document.json.
        Returns:
        the path that the content should be served under, for example /document.json.
      • getContentType

        public java.lang.String getContentType()
        Get the content type of the content, for example application/json.
        Returns:
        the content type of the content, for example application/json.
      • getContent

        public byte[] getContent()
        Get the content.
        Returns:
        the content.