mirror of
https://github.com/Rogiel/httpchannel
synced 2025-12-06 07:32:50 +00:00
Adds SeekableDownloadChannel documentation page
This commit is contained in:
36
httpchannel-api/src/site/xdoc/seekable-download-channel.xml
Normal file
36
httpchannel-api/src/site/xdoc/seekable-download-channel.xml
Normal file
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
|
||||
<properties>
|
||||
<title>Home</title>
|
||||
<author email="rogiel@rogiel.com">Rogiel Sulzbach</author>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
<!-- The body of the document contains a number of sections -->
|
||||
<section name="SeekableDownloadChannel">
|
||||
<p>
|
||||
The
|
||||
<b>SeekableDownloadChannel</b>
|
||||
allows you to emulate the download stream as if it was a local file:
|
||||
you can go back and forth. All of that comes at a cost, you need to
|
||||
restart the download everytime you set the channel position.
|
||||
</p>
|
||||
|
||||
<source><![CDATA[final DownloadChannel downloadChannel = ...; // open a download channel here
|
||||
final SeekableDownloadChannel channel = new SeekableDownloadChannel(downloadChannel);
|
||||
channel.position(12 * 1024);]]></source>
|
||||
<small>
|
||||
Creates a new
|
||||
<b>SeekableDownloadChannel</b>
|
||||
channel and set its position to the 12288 byte offset.
|
||||
</small>
|
||||
|
||||
<p>
|
||||
If the channel does not support seeking, an
|
||||
<b>IOException</b>
|
||||
is thrown at construction time.
|
||||
</p>
|
||||
</section>
|
||||
</body>
|
||||
</document>
|
||||
3
pom.xml
3
pom.xml
@@ -172,6 +172,7 @@
|
||||
<artifactId>site-maven-plugin</artifactId>
|
||||
<version>0.4</version>
|
||||
<configuration>
|
||||
<message>Creating ${project.artifactId} site for ${project.version}</message>
|
||||
<repositoryOwner>seedbox</repositoryOwner>
|
||||
<repositoryOwner>httpchannel.github.com</repositoryOwner>
|
||||
</configuration>
|
||||
@@ -207,7 +208,7 @@
|
||||
<version>2.2.2</version>
|
||||
<configuration>
|
||||
<autoVersionSubmodules>true</autoVersionSubmodules>
|
||||
<goals>deploy site-deploy</goals><!-- we have to force site-deploy -->
|
||||
<goals>deploy</goals><!-- we have to force site-deploy -->
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
<menu ref="parent" inherit="top" />
|
||||
|
||||
<menu name="API" inherit="top">
|
||||
<item name="Channel seeking" href="/httpchannel-api/seekable-download-channel.html"
|
||||
target="_blank" />
|
||||
<item name="API Javadoc" href="/httpchannel-api/apidocs/"
|
||||
target="_blank" />
|
||||
<item name="API Sources" href="/httpchannel-api/xref/" />
|
||||
|
||||
36
src/site/xdoc/seekable-download-channel.xml
Normal file
36
src/site/xdoc/seekable-download-channel.xml
Normal file
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
|
||||
<properties>
|
||||
<title>Home</title>
|
||||
<author email="rogiel@rogiel.com">Rogiel Sulzbach</author>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
<!-- The body of the document contains a number of sections -->
|
||||
<section name="SeekableDownloadChannel">
|
||||
<p>
|
||||
The
|
||||
<b>SeekableDownloadChannel</b>
|
||||
allows you to emulate the download stream as if it was a local file:
|
||||
you can go back and forth. All of that comes at a cost, you need to
|
||||
restart the download everytime you set the channel position.
|
||||
</p>
|
||||
|
||||
<source><![CDATA[final DownloadChannel downloadChannel = ...; // open a download channel here
|
||||
final SeekableDownloadChannel channel = new SeekableDownloadChannel(downloadChannel);
|
||||
channel.position(12 * 1024);]]></source>
|
||||
<small>
|
||||
Creates a new
|
||||
<b>SeekableDownloadChannel</b>
|
||||
channel and set its position to the 12288 byte offset.
|
||||
</small>
|
||||
|
||||
<p>
|
||||
If the channel does not support seeking, an
|
||||
<b>IOException</b>
|
||||
is thrown at construction time.
|
||||
</p>
|
||||
</section>
|
||||
</body>
|
||||
</document>
|
||||
Reference in New Issue
Block a user