public class FileLocation extends Object implements Location
Modifier | Constructor and Description |
---|---|
|
FileLocation(File file,
String specification) |
protected |
FileLocation(String specification) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the location.
|
File |
getFile() |
InputStream |
getInputStream() |
String |
getSpecification() |
protected void |
initFile()
initialize file.
|
void |
open()
open the location.
|
int |
read(byte[] buffer) |
int |
read(ByteBuffer buffer) |
protected void |
setFile(File file) |
protected File |
unsafeGetFile() |
public FileLocation(File file, String specification)
file
- File
specification
- spec.protected FileLocation(String specification)
specification
- spec.public File getFile() throws IOException
getFile
in interface Location
File
.IOException
- in case of an error.protected void initFile() throws IOException
IOException
- in case error.public String getSpecification()
getSpecification
in interface Location
public void open() throws IOException
open
in interface Location
IOException
- in case of an error.public int read(ByteBuffer buffer) throws IOException
read
in interface Location
buffer
- The buffer.IOException
- in case of an error.public int read(byte[] buffer) throws IOException
read
in interface Location
buffer
- The buffer.IOException
- in case of an error.public InputStream getInputStream() throws IOException
getInputStream
in interface Location
IOException
- in case of an error.Copyright © 2002–2015 The Apache Software Foundation. All rights reserved.