Class FileLocation
java.lang.Object
org.apache.maven.shared.io.location.FileLocation
- All Implemented Interfaces:
Location
- Direct Known Subclasses:
ArtifactLocation
,URLLocation
file location implementation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate FileChannel
private File
private final String
private FileInputStream
-
Constructor Summary
ConstructorsModifierConstructorDescriptionFileLocation
(File file, String specification) protected
FileLocation
(String specification) -
Method Summary
-
Field Details
-
file
-
channel
-
specification
-
stream
-
-
Constructor Details
-
FileLocation
- Parameters:
file
-File
specification
- spec.
-
FileLocation
- Parameters:
specification
- spec.
-
-
Method Details
-
close
public void close()Close the location. -
getFile
- Specified by:
getFile
in interfaceLocation
- Returns:
File
.- Throws:
IOException
- in case of an error.
-
unsafeGetFile
- Returns:
File
-
initFile
initialize file.- Throws:
IOException
- in case error.
-
setFile
- Parameters:
file
-File
-
getSpecification
- Specified by:
getSpecification
in interfaceLocation
- Returns:
- spec.
-
open
open the location.- Specified by:
open
in interfaceLocation
- Throws:
IOException
- in case of an error.
-
read
- Specified by:
read
in interfaceLocation
- Parameters:
buffer
- The buffer.- Returns:
- number of read bytes.
- Throws:
IOException
- in case of an error.
-
read
- Specified by:
read
in interfaceLocation
- Parameters:
buffer
- The buffer.- Returns:
- number of read bytes.
- Throws:
IOException
- in case of an error.
-
getInputStream
- Specified by:
getInputStream
in interfaceLocation
- Returns:
- the resulting input stream.
- Throws:
IOException
- in case of an error.
-