Class FileLocation
java.lang.Object
org.apache.maven.plugins.assembly.io.FileLocation
- All Implemented Interfaces:
Location
- Direct Known Subclasses:
URLLocation
file location implementation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate FileChannel
private File
private final String
private FileInputStream
-
Constructor Summary
ConstructorsConstructorDescriptionFileLocation
(File file, String specification) FileLocation
(String specification) -
Method Summary
-
Field Details
-
file
-
channel
-
specification
-
stream
-
-
Constructor Details
-
Method Details
-
close
public void close()Description copied from interface:Location
Close the location. -
getFile
- Specified by:
getFile
in interfaceLocation
- Returns:
File
- Throws:
IOException
- in case of an error
-
unsafeGetFile
File unsafeGetFile()- Returns:
File
-
initFile
initialize file.- Throws:
IOException
- in case of error
-
setFile
- Parameters:
file
-File
-
getSpecification
- Specified by:
getSpecification
in interfaceLocation
- Returns:
- spec
-
open
Description copied from interface:Location
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
-