org.apache.maven.shared.io.location
Class FileLocation
java.lang.Object
org.apache.maven.shared.io.location.FileLocation
- All Implemented Interfaces:
- Location
- Direct Known Subclasses:
- ArtifactLocation, URLLocation
public class FileLocation
- extends java.lang.Object
- implements Location
Field Summary |
private java.nio.channels.FileChannel |
channel
|
private java.io.File |
file
|
private java.lang.String |
specification
|
private java.io.FileInputStream |
stream
|
Constructor Summary |
|
FileLocation(java.io.File file,
java.lang.String specification)
|
protected |
FileLocation(java.lang.String specification)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
file
private java.io.File file
channel
private java.nio.channels.FileChannel channel
specification
private final java.lang.String specification
stream
private java.io.FileInputStream stream
FileLocation
public FileLocation(java.io.File file,
java.lang.String specification)
FileLocation
protected FileLocation(java.lang.String specification)
close
public void close()
- Specified by:
close
in interface Location
getFile
public java.io.File getFile()
throws java.io.IOException
- Specified by:
getFile
in interface Location
- Throws:
java.io.IOException
unsafeGetFile
protected java.io.File unsafeGetFile()
initFile
protected void initFile()
throws java.io.IOException
- Throws:
java.io.IOException
setFile
protected void setFile(java.io.File file)
getSpecification
public java.lang.String getSpecification()
- Specified by:
getSpecification
in interface Location
open
public void open()
throws java.io.IOException
- Specified by:
open
in interface Location
- Throws:
java.io.IOException
read
public int read(java.nio.ByteBuffer buffer)
throws java.io.IOException
- Specified by:
read
in interface Location
- Throws:
java.io.IOException
read
public int read(byte[] buffer)
throws java.io.IOException
- Specified by:
read
in interface Location
- Throws:
java.io.IOException
getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException
- Specified by:
getInputStream
in interface Location
- Throws:
java.io.IOException