Class V2ContentProducer

java.lang.Object
jp.cssj.driver.ctip.v2.V2ContentProducer
Direct Known Subclasses:
TLSV2ContentProducer

public class V2ContentProducer extends Object
  • Field Details

    • charset

      protected final String charset
    • serverURI

      protected final URI serverURI
    • io

      protected volatile ChannelIO io
    • connectTimeout

      protected long connectTimeout
  • Constructor Details

  • Method Details

    • connect

      public V2RequestConsumer connect(String user, String password) throws IOException
      Connects to the server and starts a request.
      Parameters:
      user -
      password -
      Throws:
      IOException
    • createChannel

      protected ByteChannel createChannel(InetSocketAddress address) throws IOException
      Throws:
      IOException
    • close

      protected void close() throws IOException
      Throws:
      IOException
    • next

      public void next() throws IOException
      Throws:
      IOException
    • getBlockId

      public int getBlockId() throws IOException
      Returns the fragment ID.
      Returns:
      The fragment ID.
      Throws:
      IOException
    • getAnchorId

      public int getAnchorId() throws IOException
      Returns the ID of the anchor fragment.
      Returns:
      The fragment ID.
      Throws:
      IOException
    • getType

      public byte getType() throws IOException
      Returns the data type of the current packet.
      Returns:
      The packet type.
      Throws:
      IOException
    • getLength

      public long getLength() throws IOException
      Returns the progress.
      Returns:
      The number of bytes.
      Throws:
      IOException
    • getMessage

      public String getMessage() throws IOException
      Returns the message.
      Returns:
      The message string.
      Throws:
      IOException
    • getArgs

      public String[] getArgs() throws IOException
      Returns the message arguments.
      Returns:
      The message arguments.
      Throws:
      IOException
    • getURI

      public URI getURI() throws IOException
      Returns the URI of the data.
      Returns:
      The URI of the data.
      Throws:
      IOException
    • getMimeType

      public String getMimeType() throws IOException
      Returns the MIME type of the data.
      Returns:
      The MIME type of the data.
      Throws:
      IOException
    • getEncoding

      public String getEncoding() throws IOException
      Returns the encoding of the data.
      Returns:
      The encoding of the data.
      Throws:
      IOException
    • getCode

      public short getCode() throws IOException
      Returns the message code.
      Returns:
      The message code.
      Throws:
      IOException
    • getMode

      public byte getMode() throws IOException
      Returns the abort mode.
      Returns:
      The abort mode.
      Throws:
      IOException
    • read

      public int read(byte[] b, int off, int len) throws IOException
      Reads data.
      Parameters:
      b - The buffer that receives the data.
      off - The starting offset in the buffer.
      len - The number of bytes that can be stored in the buffer.
      Returns:
      The length of the data read, or -1 if no data is available.
      Throws:
      IOException