接口 Location
-
- 所有已知实现类:
ArtifactLocation
,FileLocation
,URLLocation
public interface Location
The location interface.
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 void
close()
Close the location.java.io.File
getFile()
java.io.InputStream
getInputStream()
java.lang.String
getSpecification()
void
open()
open the location.int
read(byte[] buffer)
int
read(java.nio.ByteBuffer buffer)
-
-
-
方法详细资料
-
getFile
java.io.File getFile() throws java.io.IOException
- 返回:
File
.- 抛出:
java.io.IOException
- in case of an error.
-
open
void open() throws java.io.IOException
open the location.- 抛出:
java.io.IOException
- in case of an error.
-
close
void close()
Close the location.
-
read
int read(java.nio.ByteBuffer buffer) throws java.io.IOException
- 参数:
buffer
- The buffer.- 返回:
- number of read bytes.
- 抛出:
java.io.IOException
- in case of an error.
-
read
int read(byte[] buffer) throws java.io.IOException
- 参数:
buffer
- The buffer.- 返回:
- number of read bytes.
- 抛出:
java.io.IOException
- in case of an error.
-
getInputStream
java.io.InputStream getInputStream() throws java.io.IOException
- 返回:
- the resulting input stream.
- 抛出:
java.io.IOException
- in case of an error.
-
getSpecification
java.lang.String getSpecification()
- 返回:
- spec.
-
-