Class V1RequestConsumer

java.lang.Object
jp.cssj.driver.ctip.v1.V1RequestConsumer

public class V1RequestConsumer extends Object
  • Field Details

    • PROPERTY

      public static final byte PROPERTY
      A property packet. Use getName and getValue to obtain the name and value.
      See Also:
    • RESOURCE

      public static final byte RESOURCE
      A resource start packet. Use getURI, getMimeType, and getEncoding to obtain the URI, MIME type, and encoding.
      See Also:
    • MAIN

      public static final byte MAIN
      A content start packet. Use getURI, getMimeType, and getEncoding to obtain the URI, MIME type, and encoding.
      See Also:
    • DATA

      public static final byte DATA
      A data packet. Use read to obtain the data.
      See Also:
    • END

      public static final byte END
      An end packet.
      See Also:
  • Method Details

    • property

      public void property(String name, String value) throws IOException
      Sends a property.
      Parameters:
      name - The property name.
      value - The value.
      Throws:
      IOException
    • resource

      public void resource(URI uri, String mimeType, String encoding) throws IOException
      Signals the start of a resource.
      Parameters:
      uri - The virtual URI.
      mimeType - The MIME type.
      encoding - The character encoding.
      Throws:
      IOException
    • main

      public void main(URI uri, String mimeType, String encoding) throws IOException
      Signals the start of the body.
      Parameters:
      uri - The virtual URI.
      mimeType - The MIME type.
      encoding - The character encoding.
      Throws:
      IOException
    • setCTIPSession

      protected void setCTIPSession(V1Session session)
    • write

      public void write(byte[] b, int off, int len) throws IOException
      Sends a data packet.
      Parameters:
      b - The byte buffer.
      off - The starting position of the data.
      len - The data length.
      Throws:
      IOException
    • end

      public void end() throws IOException
      Sends an end packet.
      Throws:
      IOException