Class Streamer

java.lang.Object
overit.geocall.util.services.Streamer

public class Streamer extends Object
Utility class used to serialize and write an object in an output channel.
  • Field Details

    • _encoding

      protected String _encoding
    • _indent

      protected int _indent
    • _xmlProceduralInstruction

      protected String _xmlProceduralInstruction
    • _bytesFull

      protected boolean _bytesFull
    • _bytesContentType

      protected String _bytesContentType
  • Constructor Details

    • Streamer

      public Streamer()
  • Method Details

    • setEncoding

      public void setEncoding(String encoding)
      Sets the encoding
      Parameters:
      encoding - String representing the encoding
    • getEncoding

      public Charset getEncoding()
      Returns the encoding
      Returns:
      A string representing the encoding
    • setIndent

      public void setIndent(int indent)
      Sets the indendt Default value is 4
      Parameters:
      indent - The indent to set
    • setXmlMode

      public void setXmlMode(String proceduralInstruction)
      Sets the XML mode
      Parameters:
      proceduralInstruction - String representing the procedural instruction
    • setBytesMode

      public void setBytesMode(boolean fullBytes, String contentType)
      Sets bytes mode
      Parameters:
      fullBytes - Boolean indicating if full bytes is enabled or not
      contentType - The bytes content type
    • out

      public void out(Object obj, OutputStream os) throws IOException
      Write the object in the output stream
      Parameters:
      obj - The object to write
      os - The OutputStream
      Throws:
      IOException - if an i/o error occurs
    • out

      public void out(XMLTree x, OutputStream os) throws IOException
      Write the Tree in the output stream
      Parameters:
      x - The XMLTree to write
      os - The OutputStream
      Throws:
      IOException - if an i/o error occurs
    • out

      public void out(SOAPMessage sm, OutputStream os) throws IOException
      Write the SOAPMessage in the output stream
      Parameters:
      sm - The SOAPMessage to write
      os - The OutputStream
      Throws:
      IOException - if an i/o error occurs
    • out

      public void out(com.google.gson.JsonElement je, OutputStream os) throws IOException
      Write the JsonElement in the output stream
      Parameters:
      je - The JsonElement to write
      os - The OutputStream
      Throws:
      IOException - if an i/o error occurs
    • out

      public void out(JsonNode jn, OutputStream os) throws IOException
      Write the JsonNode in the output stream
      Parameters:
      jn - The JsonNode to write
      os - The OutputStream
      Throws:
      IOException - if an i/o error occurs
    • out

      public void out(String s, OutputStream os) throws IOException
      Write the String in the output stream
      Parameters:
      s - The String to write
      os - The OutputStream
      Throws:
      IOException - if an i/o error occurs
    • out

      public void out(ByteCache bc, OutputStream os) throws IOException
      Write the ByteCache in the output stream
      Parameters:
      bc - The ByteCache to write
      os - The OutputStream
      Throws:
      IOException - if an i/o error occurs
    • out

      public void out(InputStream is, OutputStream os) throws IOException
      Write the InputStream in the output stream
      Parameters:
      is - The InputStream to write
      os - The OutputStream
      Throws:
      IOException - if an i/o error occurs
    • out

      public void out(byte[] bb, OutputStream os) throws IOException
      Write the array of bytes in the output stream
      Parameters:
      bb - The array of bytes to write
      os - The OutputStream
      Throws:
      IOException - if an i/o error occurs
    • out

      protected void out(Element el, OutputStream os) throws IOException
      Write the Element in the output stream
      Parameters:
      el - The Element to write
      os - The OutputStream
      Throws:
      IOException - if an i/o error occurs
    • out

      public void out(Throwable e, OutputStream os) throws IOException
      Write the Throwable in the output stream
      Parameters:
      e - The Throwable to write
      os - The OutputStream
      Throws:
      IOException - if an i/o error occurs