Interface Location
-
- All Known Implementing Classes:
FileLocation
,URLLocation
interface Location
The location interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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)
-
-
-
Method Detail
-
getFile
java.io.File getFile() throws java.io.IOException
- Returns:
File
- Throws:
java.io.IOException
- in case of an error
-
open
void open() throws java.io.IOException
Open the location.- Throws:
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
- Parameters:
buffer
- The buffer- Returns:
- number of read bytes
- Throws:
java.io.IOException
- in case of an error
-
read
int read(byte[] buffer) throws java.io.IOException
- Parameters:
buffer
- the buffer- Returns:
- number of read bytes
- Throws:
java.io.IOException
- in case of an error
-
getInputStream
java.io.InputStream getInputStream() throws java.io.IOException
- Returns:
- the resulting input stream.
- Throws:
java.io.IOException
- in case of an error
-
getSpecification
java.lang.String getSpecification()
- Returns:
- spec
-
-