Package net.dona.doip

Interface InDoipSegment

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.io.InputStream getInputStream()
      Returns an input stream, for either a JSON segment or a bytes segment.
      com.google.gson.JsonElement getJson()
      Returns the JSON of a JSON segment
      boolean isJson()
      Returns true if this is a JSON segment, false if this is a bytes segment.
    • Method Detail

      • isJson

        boolean isJson()
        Returns true if this is a JSON segment, false if this is a bytes segment.
        Returns:
        true if this is a JSON segment, otherwise false
      • getInputStream

        java.io.InputStream getInputStream()
        Returns an input stream, for either a JSON segment or a bytes segment.
        Returns:
        an input stream containing the bytes from the segment (including a serialization of a JSON segment)
      • getJson

        com.google.gson.JsonElement getJson()
                                     throws java.io.IOException
        Returns the JSON of a JSON segment
        Returns:
        the JSON of a JSON segment
        Throws:
        java.io.IOException - if there is a JSON parsing error
        java.lang.IllegalStateException - if this is not a JSON segment