LocationArtifactLocation, URLLocationpublic class FileLocation extends java.lang.Object implements Location
| Modifier | Constructor | Description |
|---|---|---|
|
FileLocation(java.io.File file,
java.lang.String specification) |
|
protected |
FileLocation(java.lang.String specification) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Close the location.
|
java.io.File |
getFile() |
|
java.io.InputStream |
getInputStream() |
|
java.lang.String |
getSpecification() |
|
protected void |
initFile() |
initialize file.
|
void |
open() |
open the location.
|
int |
read(byte[] buffer) |
|
int |
read(java.nio.ByteBuffer buffer) |
|
protected void |
setFile(java.io.File file) |
|
protected java.io.File |
unsafeGetFile() |
public FileLocation(java.io.File file,
java.lang.String specification)
file - Filespecification - spec.protected FileLocation(java.lang.String specification)
specification - spec.public java.io.File getFile()
throws java.io.IOException
protected java.io.File unsafeGetFile()
Fileprotected void initFile()
throws java.io.IOException
java.io.IOException - in case error.protected void setFile(java.io.File file)
file - Filepublic java.lang.String getSpecification()
getSpecification in interface Locationpublic void open()
throws java.io.IOException
public int read(java.nio.ByteBuffer buffer)
throws java.io.IOException
public int read(byte[] buffer)
throws java.io.IOException
public java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in interface Locationjava.io.IOException - in case of an error.