Package jp.cssj.driver.ctip.v2
Class V2ContentProducer
java.lang.Object
jp.cssj.driver.ctip.v2.V2ContentProducer
- Direct Known Subclasses:
TLSV2ContentProducer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidclose()Connects to the server and starts a request.protected ByteChannelcreateChannel(InetSocketAddress address) intReturns the ID of the anchor fragment.String[]getArgs()Returns the message arguments.intReturns the fragment ID.shortgetCode()Returns the message code.Returns the encoding of the data.longReturns the progress.Returns the message.Returns the MIME type of the data.bytegetMode()Returns the abort mode.bytegetType()Returns the data type of the current packet.getURI()Returns the URI of the data.voidnext()intread(byte[] b, int off, int len) Reads data.
-
Field Details
-
charset
-
serverURI
-
io
-
connectTimeout
protected long connectTimeout
-
-
Constructor Details
-
V2ContentProducer
- Throws:
IOException
-
-
Method Details
-
connect
Connects to the server and starts a request.- Parameters:
user-password-- Throws:
IOException
-
createChannel
- Throws:
IOException
-
close
- Throws:
IOException
-
next
- Throws:
IOException
-
getBlockId
Returns the fragment ID.- Returns:
- The fragment ID.
- Throws:
IOException
-
getAnchorId
Returns the ID of the anchor fragment.- Returns:
- The fragment ID.
- Throws:
IOException
-
getType
Returns the data type of the current packet.- Returns:
- The packet type.
- Throws:
IOException
-
getLength
Returns the progress.- Returns:
- The number of bytes.
- Throws:
IOException
-
getMessage
Returns the message.- Returns:
- The message string.
- Throws:
IOException
-
getArgs
Returns the message arguments.- Returns:
- The message arguments.
- Throws:
IOException
-
getURI
Returns the URI of the data.- Returns:
- The URI of the data.
- Throws:
IOException
-
getMimeType
Returns the MIME type of the data.- Returns:
- The MIME type of the data.
- Throws:
IOException
-
getEncoding
Returns the encoding of the data.- Returns:
- The encoding of the data.
- Throws:
IOException
-
getCode
Returns the message code.- Returns:
- The message code.
- Throws:
IOException
-
getMode
Returns the abort mode.- Returns:
- The abort mode.
- Throws:
IOException
-
read
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
-