Package org.eclipse.aether.internal.impl
Class DefaultFileProcessor
java.lang.Object
org.eclipse.aether.internal.impl.DefaultFileProcessor
- All Implemented Interfaces:
FileProcessor
@Deprecated
@Singleton
@Named
public class DefaultFileProcessor
extends Object
implements FileProcessor
Deprecated.
A utility class helping with file-based operations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.aether.spi.io.FileProcessor
FileProcessor.ProgressListener -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.Copies the specified source file to the given target file.longcopy(File source, File target, FileProcessor.ProgressListener listener) Deprecated.Copies the specified source file to the given target file.booleanDeprecated.Thread-safe variant ofFile.mkdirs().voidDeprecated.Moves the specified source file to the given target file.readChecksum(File checksumFile) Deprecated.Reads checksum from specified file.voidwrite(File target, InputStream source) Deprecated.Writes the given stream to a file.voidDeprecated.Writes the given data to a file.voidwriteChecksum(File checksumFile, String checksum) Deprecated.Writes checksum to specified file.
-
Constructor Details
-
DefaultFileProcessor
public DefaultFileProcessor()Deprecated.
-
-
Method Details
-
mkdirs
Deprecated.Thread-safe variant ofFile.mkdirs(). Creates the directory named by the given abstract pathname, including any necessary but nonexistent parent directories. Note that if this operation fails it may have succeeded in creating some of the necessary parent directories.- Specified by:
mkdirsin interfaceFileProcessor- Parameters:
directory- The directory to create, may benull.- Returns:
trueif and only if the directory was created, along with all necessary parent directories;falseotherwise
-
write
Deprecated.Description copied from interface:FileProcessorWrites the given data to a file. UTF-8 is assumed as encoding for the data. Creates the necessary directories for the target file. In case of an error, the created directories will be left on the file system.- Specified by:
writein interfaceFileProcessor- Parameters:
target- The file to write to, must not benull. This file will be overwritten.data- The data to write, may benull.- Throws:
IOException- If an I/O error occurs.
-
write
Deprecated.Description copied from interface:FileProcessorWrites the given stream to a file. Creates the necessary directories for the target file. In case of an error, the created directories will be left on the file system.- Specified by:
writein interfaceFileProcessor- Parameters:
target- The file to write to, must not benull. This file will be overwritten.source- The stream to write to the file, must not benull.- Throws:
IOException- If an I/O error occurs.
-
copy
Deprecated.Description copied from interface:FileProcessorCopies the specified source file to the given target file. Creates the necessary directories for the target file. In case of an error, the created directories will be left on the file system.- Specified by:
copyin interfaceFileProcessor- Parameters:
source- The file to copy from, must not benull.target- The file to copy to, must not benull.- Throws:
IOException- If an I/O error occurs.
-
copy
public long copy(File source, File target, FileProcessor.ProgressListener listener) throws IOException Deprecated.Description copied from interface:FileProcessorCopies the specified source file to the given target file. Creates the necessary directories for the target file. In case of an error, the created directories will be left on the file system.- Specified by:
copyin interfaceFileProcessor- Parameters:
source- The file to copy from, must not benull.target- The file to copy to, must not benull.listener- The listener to notify about the copy progress, may benull.- Returns:
- The number of copied bytes.
- Throws:
IOException- If an I/O error occurs.
-
move
Deprecated.Description copied from interface:FileProcessorMoves the specified source file to the given target file. If the target file already exists, it is overwritten. Creates the necessary directories for the target file. In case of an error, the created directories will be left on the file system.- Specified by:
movein interfaceFileProcessor- Parameters:
source- The file to move from, must not benull.target- The file to move to, must not benull.- Throws:
IOException- If an I/O error occurs.
-
readChecksum
Deprecated.Description copied from interface:FileProcessorReads checksum from specified file.- Specified by:
readChecksumin interfaceFileProcessor- Throws:
IOException- in case of any IO error.
-
writeChecksum
Deprecated.Description copied from interface:FileProcessorWrites checksum to specified file.- Specified by:
writeChecksumin interfaceFileProcessor- Throws:
IOException- in case of any IO error.
-