Package org.apache.maven.building
Class FileSource
java.lang.Object
org.apache.maven.building.FileSource
- All Implemented Interfaces:
Source
- Direct Known Subclasses:
ArtifactModelSource
,FileModelSource
,FileSettingsSource
Deprecated.
Wraps an ordinary
File
as a source.-
Constructor Summary
ConstructorsConstructorDescriptionFileSource
(File file) Deprecated.UseFileSource(Path)
instead.FileSource
(Path path) Deprecated.Creates a new source backed by the specified file. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Deprecated.getFile()
Deprecated.UsegetPath()
instead.Deprecated.Gets a byte stream to the source contents.Deprecated.Provides a user-friendly hint about the location of the source.getPath()
Deprecated.Gets the file of this source.int
hashCode()
Deprecated.toString()
Deprecated.
-
Constructor Details
-
FileSource
Deprecated.UseFileSource(Path)
instead.Creates a new source backed by the specified file.- Parameters:
file
- The file, must not benull
.
-
FileSource
Deprecated.Creates a new source backed by the specified file.- Parameters:
path
- The file, must not benull
.- Since:
- 4.0.0
-
-
Method Details
-
getInputStream
Deprecated.Description copied from interface:Source
Gets a byte stream to the source contents. Closing the returned stream is the responsibility of the caller.- Specified by:
getInputStream
in interfaceSource
- Returns:
- A byte stream to the source contents, never
null
. - Throws:
IOException
- in case of IO issue
-
getLocation
Deprecated.Description copied from interface:Source
Provides a user-friendly hint about the location of the source. This could be a local file path, a URI or just an empty string. The intention is to assist users during error reporting.- Specified by:
getLocation
in interfaceSource
- Returns:
- A user-friendly hint about the location of the source, never
null
.
-
getFile
Deprecated.UsegetPath()
instead.Gets the file of this source.- Returns:
- The underlying file, never
null
.
-
getPath
Deprecated.Gets the file of this source.- Returns:
- The underlying file, never
null
. - Since:
- 4.0.0
-
toString
Deprecated. -
hashCode
public int hashCode()Deprecated. -
equals
Deprecated.
-
org.apache.maven.api.services
instead