public class MountableFile extends java.lang.Object implements Transferable
DEFAULT_DIR_MODE, DEFAULT_FILE_MODE
Constructor and Description |
---|
MountableFile() |
Modifier and Type | Method and Description |
---|---|
static MountableFile |
forClasspathResource(@NotNull java.lang.String resourceName)
Obtains a
MountableFile corresponding to a resource on the classpath (including resources in JAR files) |
static MountableFile |
forClasspathResource(@NotNull java.lang.String resourceName,
java.lang.Integer mode)
Obtains a
MountableFile corresponding to a resource on the classpath (including resources in JAR files) |
static MountableFile |
forHostPath(java.nio.file.Path path)
Obtains a
MountableFile corresponding to a file on the docker host filesystem. |
static MountableFile |
forHostPath(java.nio.file.Path path,
java.lang.Integer mode)
Obtains a
MountableFile corresponding to a file on the docker host filesystem. |
static MountableFile |
forHostPath(@NotNull java.lang.String path)
Obtains a
MountableFile corresponding to a file on the docker host filesystem. |
static MountableFile |
forHostPath(@NotNull java.lang.String path,
java.lang.Integer mode)
Obtains a
MountableFile corresponding to a file on the docker host filesystem. |
java.lang.String |
getDescription() |
int |
getFileMode()
Get file mode.
|
long |
getSize()
Size of an object.
|
void |
transferTo(org.apache.commons.compress.archivers.tar.TarArchiveOutputStream outputStream,
java.lang.String destinationPathInTar)
transfer content of this Transferable to the output stream.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBytes, of, of
public static MountableFile forClasspathResource(@NotNull @NotNull java.lang.String resourceName)
MountableFile
corresponding to a resource on the classpath (including resources in JAR files)resourceName
- the classpath path to the resourceMountableFile
that may be used to obtain a mountable pathpublic static MountableFile forHostPath(@NotNull @NotNull java.lang.String path)
MountableFile
corresponding to a file on the docker host filesystem.path
- the path to the resourceMountableFile
that may be used to obtain a mountable pathpublic static MountableFile forHostPath(java.nio.file.Path path)
MountableFile
corresponding to a file on the docker host filesystem.path
- the path to the resourceMountableFile
that may be used to obtain a mountable pathpublic static MountableFile forClasspathResource(@NotNull @NotNull java.lang.String resourceName, java.lang.Integer mode)
MountableFile
corresponding to a resource on the classpath (including resources in JAR files)resourceName
- the classpath path to the resourcemode
- octal value of posix file mode (000..777)MountableFile
that may be used to obtain a mountable pathpublic static MountableFile forHostPath(@NotNull @NotNull java.lang.String path, java.lang.Integer mode)
MountableFile
corresponding to a file on the docker host filesystem.path
- the path to the resourcemode
- octal value of posix file mode (000..777)MountableFile
that may be used to obtain a mountable pathpublic static MountableFile forHostPath(java.nio.file.Path path, java.lang.Integer mode)
MountableFile
corresponding to a file on the docker host filesystem.path
- the path to the resourcemode
- octal value of posix file mode (000..777)MountableFile
that may be used to obtain a mountable pathpublic void transferTo(org.apache.commons.compress.archivers.tar.TarArchiveOutputStream outputStream, java.lang.String destinationPathInTar)
transferTo
in interface Transferable
outputStream
- stream to outputpublic long getSize()
Transferable
getSize
in interface Transferable
public java.lang.String getDescription()
getDescription
in interface Transferable
public int getFileMode()
Transferable
getFileMode
in interface Transferable
Transferable.DEFAULT_FILE_MODE