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 FileChannelprivate Fileprivate final Stringprivate FileInputStream -
Constructor Summary
ConstructorsModifierConstructorDescriptionFileLocation(File file, String specification) protectedFileLocation(String specification) -
Method Summary
-
Field Details
-
file
-
channel
-
specification
-
stream
-
-
Constructor Details
-
FileLocation
- Parameters:
file-Filespecification- spec.
-
FileLocation
- Parameters:
specification- spec.
-
-
Method Details
-
close
public void close()Close the location. -
getFile
- Specified by:
getFilein 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:
getSpecificationin interfaceLocation- Returns:
- spec.
-
open
open the location.- Specified by:
openin interfaceLocation- Throws:
IOException- in case of an error.
-
read
- Specified by:
readin interfaceLocation- Parameters:
buffer- The buffer.- Returns:
- number of read bytes.
- Throws:
IOException- in case of an error.
-
read
- Specified by:
readin interfaceLocation- Parameters:
buffer- The buffer.- Returns:
- number of read bytes.
- Throws:
IOException- in case of an error.
-
getInputStream
- Specified by:
getInputStreamin interfaceLocation- Returns:
- the resulting input stream.
- Throws:
IOException- in case of an error.
-