Package org.eclipse.aether.internal.impl
Class DefaultFileProcessor
- java.lang.Object
-
- org.eclipse.aether.internal.impl.DefaultFileProcessor
-
- All Implemented Interfaces:
org.eclipse.aether.spi.io.FileProcessor
@Singleton @Named public class DefaultFileProcessor extends java.lang.Object implements org.eclipse.aether.spi.io.FileProcessor
A utility class helping with file-based operations.
-
-
Constructor Summary
Constructors Constructor Description DefaultFileProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopy(java.io.File source, java.io.File target)longcopy(java.io.File source, java.io.File target, org.eclipse.aether.spi.io.FileProcessor.ProgressListener listener)booleanmkdirs(java.io.File directory)Thread-safe variant ofFile.mkdirs().voidmove(java.io.File source, java.io.File target)java.lang.StringreadChecksum(java.io.File checksumFile)voidwrite(java.io.File target, java.io.InputStream source)voidwrite(java.io.File target, java.lang.String data)voidwriteChecksum(java.io.File checksumFile, java.lang.String checksum)
-
-
-
Constructor Detail
-
DefaultFileProcessor
public DefaultFileProcessor()
-
-
Method Detail
-
mkdirs
public boolean mkdirs(java.io.File directory)
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 interfaceorg.eclipse.aether.spi.io.FileProcessor- 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
public void write(java.io.File target, java.lang.String data) throws java.io.IOException
- Specified by:
writein interfaceorg.eclipse.aether.spi.io.FileProcessor- Throws:
java.io.IOException
-
write
public void write(java.io.File target, java.io.InputStream source) throws java.io.IOException
- Specified by:
writein interfaceorg.eclipse.aether.spi.io.FileProcessor- Throws:
java.io.IOException
-
copy
public void copy(java.io.File source, java.io.File target) throws java.io.IOException
- Specified by:
copyin interfaceorg.eclipse.aether.spi.io.FileProcessor- Throws:
java.io.IOException
-
copy
public long copy(java.io.File source, java.io.File target, org.eclipse.aether.spi.io.FileProcessor.ProgressListener listener) throws java.io.IOException
- Specified by:
copyin interfaceorg.eclipse.aether.spi.io.FileProcessor- Throws:
java.io.IOException
-
move
public void move(java.io.File source, java.io.File target) throws java.io.IOException
- Specified by:
movein interfaceorg.eclipse.aether.spi.io.FileProcessor- Throws:
java.io.IOException
-
readChecksum
public java.lang.String readChecksum(java.io.File checksumFile) throws java.io.IOException
- Specified by:
readChecksumin interfaceorg.eclipse.aether.spi.io.FileProcessor- Throws:
java.io.IOException
-
writeChecksum
public void writeChecksum(java.io.File checksumFile, java.lang.String checksum) throws java.io.IOException
- Specified by:
writeChecksumin interfaceorg.eclipse.aether.spi.io.FileProcessor- Throws:
java.io.IOException
-
-