6493 |
25 Jun 14 |
nicklas |
1 |
/** |
6493 |
25 Jun 14 |
nicklas |
$Id$ |
6493 |
25 Jun 14 |
nicklas |
3 |
|
6493 |
25 Jun 14 |
nicklas |
Copyright (C) 2014 Nicklas Nordborg |
6493 |
25 Jun 14 |
nicklas |
5 |
|
6493 |
25 Jun 14 |
nicklas |
This file is part of BASE - BioArray Software Environment. |
6493 |
25 Jun 14 |
nicklas |
Available at http://base.thep.lu.se/ |
6493 |
25 Jun 14 |
nicklas |
8 |
|
6493 |
25 Jun 14 |
nicklas |
BASE is free software; you can redistribute it and/or |
6493 |
25 Jun 14 |
nicklas |
modify it under the terms of the GNU General Public License |
6493 |
25 Jun 14 |
nicklas |
as published by the Free Software Foundation; either version 3 |
6493 |
25 Jun 14 |
nicklas |
of the License, or (at your option) any later version. |
6493 |
25 Jun 14 |
nicklas |
13 |
|
6493 |
25 Jun 14 |
nicklas |
BASE is distributed in the hope that it will be useful, |
6493 |
25 Jun 14 |
nicklas |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
6493 |
25 Jun 14 |
nicklas |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
6493 |
25 Jun 14 |
nicklas |
GNU General Public License for more details. |
6493 |
25 Jun 14 |
nicklas |
18 |
|
6493 |
25 Jun 14 |
nicklas |
You should have received a copy of the GNU General Public License |
6493 |
25 Jun 14 |
nicklas |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
6493 |
25 Jun 14 |
nicklas |
21 |
*/ |
6493 |
25 Jun 14 |
nicklas |
22 |
package net.sf.basedb.util.uri; |
6493 |
25 Jun 14 |
nicklas |
23 |
|
6493 |
25 Jun 14 |
nicklas |
24 |
import java.io.IOException; |
6493 |
25 Jun 14 |
nicklas |
25 |
import java.io.InputStream; |
6493 |
25 Jun 14 |
nicklas |
26 |
|
6493 |
25 Jun 14 |
nicklas |
27 |
/** |
6493 |
25 Jun 14 |
nicklas |
An extension to the {@link ConnectionManager} interface that |
6493 |
25 Jun 14 |
nicklas |
add support for specifying a start offset when downloading the |
6493 |
25 Jun 14 |
nicklas |
external file. If the external protocol has support for setting |
6493 |
25 Jun 14 |
nicklas |
a start offset it is recommended that connection managers are |
6493 |
25 Jun 14 |
nicklas |
implementing this interface, since otherwise the BASE core may |
6493 |
25 Jun 14 |
nicklas |
simply read to the specified offset which is wasting bandwith. |
6493 |
25 Jun 14 |
nicklas |
34 |
|
6493 |
25 Jun 14 |
nicklas |
@author Nicklas |
6493 |
25 Jun 14 |
nicklas |
@since 3.3 |
6493 |
25 Jun 14 |
nicklas |
37 |
*/ |
6493 |
25 Jun 14 |
nicklas |
38 |
public interface ResumableConnectionManager |
6493 |
25 Jun 14 |
nicklas |
39 |
extends ConnectionManager |
6493 |
25 Jun 14 |
nicklas |
40 |
{ |
6493 |
25 Jun 14 |
nicklas |
41 |
|
6493 |
25 Jun 14 |
nicklas |
42 |
/** |
6493 |
25 Jun 14 |
nicklas |
Get an InputStream for reading the contents of the resource. |
6493 |
25 Jun 14 |
nicklas |
@param offset The offset to start reading from |
6493 |
25 Jun 14 |
nicklas |
@return An InputStream object, or null if the no data is available |
6493 |
25 Jun 14 |
nicklas |
@throws IOException If there is an error creating the stream |
6493 |
25 Jun 14 |
nicklas |
47 |
*/ |
6493 |
25 Jun 14 |
nicklas |
48 |
public InputStream getInputStream(long offset) |
6493 |
25 Jun 14 |
nicklas |
49 |
throws IOException; |
6493 |
25 Jun 14 |
nicklas |
50 |
|
6493 |
25 Jun 14 |
nicklas |
51 |
} |
6493 |
25 Jun 14 |
nicklas |
52 |
|