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 - Filespecification - spec.protected FileLocation(String specification)
specification - spec.public File getFile() throws IOException
getFile in interface LocationFile.IOException - in case of an error.protected void initFile()
throws IOException
IOException - in case error.public String getSpecification()
getSpecification in interface Locationpublic void open()
throws IOException
open in interface LocationIOException - in case of an error.public int read(ByteBuffer buffer) throws IOException
read in interface Locationbuffer - The buffer.IOException - in case of an error.public int read(byte[] buffer)
throws IOException
read in interface Locationbuffer - The buffer.IOException - in case of an error.public InputStream getInputStream() throws IOException
getInputStream in interface LocationIOException - in case of an error.Copyright © 2002–2015 The Apache Software Foundation. All rights reserved.