Modifier and Type | Class and Description |
---|---|
static class |
MFileS3.Provider |
Constructor and Description |
---|
MFileS3(CdmS3Uri s3Uri) |
MFileS3(CdmS3Uri s3Uri,
long len,
long lm) |
MFileS3(java.lang.String s3Uri) |
MFileS3(java.lang.String s3Uri,
long len,
long lm) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(MFile o) |
boolean |
equals(java.lang.Object o) |
boolean |
exists()
Check if the MFile exists
|
java.lang.Object |
getAuxInfo() |
MFileS3 |
getChild(java.lang.String newFilename)
Get child MFile of this MFile
|
software.amazon.awssdk.core.ResponseInputStream<software.amazon.awssdk.services.s3.model.GetObjectResponse> |
getInputStream()
Get the MFile InputStream
|
long |
getLastModified()
Get time of last modification at the time the MFile object was created
|
long |
getLength()
Size of file in bytes
|
java.lang.String |
getName()
The name is the farthest element from the root in the directory hierarchy.
|
MFile |
getParent()
Get the parent of this
|
java.lang.String |
getPath()
Get full path name, replace \\ with /
|
int |
hashCode() |
boolean |
isDirectory() |
java.lang.String |
relativize(MFile other)
Construct a relative key path (as if it were a file path) between this MFile and a given MFile.
|
void |
setAuxInfo(java.lang.Object auxInfo) |
long |
updateLastModified()
Update last modified by fetching from a head request
|
long |
updateLength()
Update file length by fetching from a head request
|
void |
writeToStream(java.io.OutputStream outputStream)
Write the MFile to an OutputStream
|
void |
writeToStream(java.io.OutputStream outputStream,
long offset,
long maxBytes)
Write the MFile to an OutputStream
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
isReadable, isZipFile
public MFileS3(java.lang.String s3Uri) throws java.io.IOException
java.io.IOException
public MFileS3(CdmS3Uri s3Uri)
public MFileS3(java.lang.String s3Uri, long len, long lm) throws java.io.IOException
java.io.IOException
public MFileS3(CdmS3Uri s3Uri, long len, long lm)
public long getLastModified()
MFile
getLastModified
in interface MFile
public long updateLastModified()
public long getLength()
MFile
public long updateLength()
public boolean isDirectory()
isDirectory
in interface MFile
public java.lang.String getPath()
MFile
public java.lang.String getName()
MFile
@Nullable public MFile getParent() throws java.io.IOException
MFile
public int compareTo(MFile o)
@Nullable public java.lang.Object getAuxInfo()
getAuxInfo
in interface MFile
public void setAuxInfo(java.lang.Object auxInfo)
setAuxInfo
in interface MFile
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean exists()
MFile
public software.amazon.awssdk.core.ResponseInputStream<software.amazon.awssdk.services.s3.model.GetObjectResponse> getInputStream()
MFile
getInputStream
in interface MFile
public void writeToStream(java.io.OutputStream outputStream) throws java.io.IOException
MFile
writeToStream
in interface MFile
outputStream
- the OutputStream the MFile contents should be written tojava.io.IOException
public void writeToStream(java.io.OutputStream outputStream, long offset, long maxBytes) throws java.io.IOException
MFile
writeToStream
in interface MFile
outputStream
- the OutputStream the MFile contents should be written tooffset
- the index of the first byte to write outmaxBytes
- the maximum number of bytes to copyjava.io.IOException
@Nullable public MFileS3 getChild(java.lang.String newFilename)
MFile
public java.lang.String relativize(MFile other)
relativize
in interface MFile
other
- the MFile to relativize against this MFile's path