Class ByteArraySource

java.lang.Object
overit.geocall.servlet.gate.ByteArraySource
All Implemented Interfaces:
Serializable, Source

public class ByteArraySource extends Object implements Source
Class that aims to manage a in memory
invalid reference
byte
[] as a Source.
See Also:
  • Constructor Details

    • ByteArraySource

      public ByteArraySource(byte[] content) throws IOException
      Throws:
      IOException
    • ByteArraySource

      public ByteArraySource(byte[] content, overit.geocall.servlet.MimeType mt) throws IOException
      Throws:
      IOException
  • Method Details

    • getCompressible

      public boolean getCompressible()
      Description copied from interface: Source
      Returns true if the Source is compressible, false otherwise
      Specified by:
      getCompressible in interface Source
      Returns:
      true if the Source is compressible, false otherwise
    • getEntityTag

      public String getEntityTag()
      Description copied from interface: Source
      Returns the entity tag
      Specified by:
      getEntityTag in interface Source
      Returns:
      The entity tag
    • getContentType

      public String getContentType()
      Description copied from interface: Source
      Returns the content type
      Specified by:
      getContentType in interface Source
      Returns:
      The content type
    • getLength

      public long getLength()
      Description copied from interface: Source
      Returns the content length
      Specified by:
      getLength in interface Source
      Returns:
      The content length in byte
    • output

      public void output(OutputStream os) throws IOException
      Description copied from interface: Source
      Write in the OutputStream
      Specified by:
      output in interface Source
      Parameters:
      os - The OutputStream
      Throws:
      IOException - if an I/O error occurs