Class DecoratedFileContent
- java.lang.Object
-
- org.pentaho.platform.repository.solution.filebased.DecoratedFileContent
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.commons.vfs2.FileContent
public class DecoratedFileContent extends Object implements org.apache.commons.vfs2.FileContent
Useful when you need to override a single method in a FileContent object
-
-
Constructor Summary
Constructors Constructor Description DecoratedFileContent(org.apache.commons.vfs2.FileContent fileContent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Object
getAttribute(String s)
String[]
getAttributeNames()
Map
getAttributes()
Certificate[]
getCertificates()
org.apache.commons.vfs2.FileContentInfo
getContentInfo()
org.apache.commons.vfs2.FileObject
getFile()
InputStream
getInputStream()
long
getLastModifiedTime()
OutputStream
getOutputStream()
OutputStream
getOutputStream(boolean b)
org.apache.commons.vfs2.RandomAccessContent
getRandomAccessContent(org.apache.commons.vfs2.util.RandomAccessMode randomAccessMode)
long
getSize()
boolean
hasAttribute(String s)
boolean
isOpen()
void
removeAttribute(String s)
void
setAttribute(String s, Object o)
void
setLastModifiedTime(long l)
long
write(OutputStream outputStream)
long
write(OutputStream outputStream, int i)
long
write(org.apache.commons.vfs2.FileContent fileContent)
long
write(org.apache.commons.vfs2.FileObject fileObject)
-
-
-
Method Detail
-
getFile
public org.apache.commons.vfs2.FileObject getFile()
- Specified by:
getFile
in interfaceorg.apache.commons.vfs2.FileContent
-
getSize
public long getSize() throws org.apache.commons.vfs2.FileSystemException
- Specified by:
getSize
in interfaceorg.apache.commons.vfs2.FileContent
- Throws:
org.apache.commons.vfs2.FileSystemException
-
getLastModifiedTime
public long getLastModifiedTime() throws org.apache.commons.vfs2.FileSystemException
- Specified by:
getLastModifiedTime
in interfaceorg.apache.commons.vfs2.FileContent
- Throws:
org.apache.commons.vfs2.FileSystemException
-
setLastModifiedTime
public void setLastModifiedTime(long l) throws org.apache.commons.vfs2.FileSystemException
- Specified by:
setLastModifiedTime
in interfaceorg.apache.commons.vfs2.FileContent
- Throws:
org.apache.commons.vfs2.FileSystemException
-
hasAttribute
public boolean hasAttribute(String s) throws org.apache.commons.vfs2.FileSystemException
- Specified by:
hasAttribute
in interfaceorg.apache.commons.vfs2.FileContent
- Throws:
org.apache.commons.vfs2.FileSystemException
-
getAttributes
public Map getAttributes() throws org.apache.commons.vfs2.FileSystemException
- Specified by:
getAttributes
in interfaceorg.apache.commons.vfs2.FileContent
- Throws:
org.apache.commons.vfs2.FileSystemException
-
getAttributeNames
public String[] getAttributeNames() throws org.apache.commons.vfs2.FileSystemException
- Specified by:
getAttributeNames
in interfaceorg.apache.commons.vfs2.FileContent
- Throws:
org.apache.commons.vfs2.FileSystemException
-
getAttribute
public Object getAttribute(String s) throws org.apache.commons.vfs2.FileSystemException
- Specified by:
getAttribute
in interfaceorg.apache.commons.vfs2.FileContent
- Throws:
org.apache.commons.vfs2.FileSystemException
-
setAttribute
public void setAttribute(String s, Object o) throws org.apache.commons.vfs2.FileSystemException
- Specified by:
setAttribute
in interfaceorg.apache.commons.vfs2.FileContent
- Throws:
org.apache.commons.vfs2.FileSystemException
-
removeAttribute
public void removeAttribute(String s) throws org.apache.commons.vfs2.FileSystemException
- Specified by:
removeAttribute
in interfaceorg.apache.commons.vfs2.FileContent
- Throws:
org.apache.commons.vfs2.FileSystemException
-
getCertificates
public Certificate[] getCertificates() throws org.apache.commons.vfs2.FileSystemException
- Specified by:
getCertificates
in interfaceorg.apache.commons.vfs2.FileContent
- Throws:
org.apache.commons.vfs2.FileSystemException
-
getInputStream
public InputStream getInputStream() throws org.apache.commons.vfs2.FileSystemException
- Specified by:
getInputStream
in interfaceorg.apache.commons.vfs2.FileContent
- Throws:
org.apache.commons.vfs2.FileSystemException
-
getOutputStream
public OutputStream getOutputStream() throws org.apache.commons.vfs2.FileSystemException
- Specified by:
getOutputStream
in interfaceorg.apache.commons.vfs2.FileContent
- Throws:
org.apache.commons.vfs2.FileSystemException
-
getRandomAccessContent
public org.apache.commons.vfs2.RandomAccessContent getRandomAccessContent(org.apache.commons.vfs2.util.RandomAccessMode randomAccessMode) throws org.apache.commons.vfs2.FileSystemException
- Specified by:
getRandomAccessContent
in interfaceorg.apache.commons.vfs2.FileContent
- Throws:
org.apache.commons.vfs2.FileSystemException
-
getOutputStream
public OutputStream getOutputStream(boolean b) throws org.apache.commons.vfs2.FileSystemException
- Specified by:
getOutputStream
in interfaceorg.apache.commons.vfs2.FileContent
- Throws:
org.apache.commons.vfs2.FileSystemException
-
close
public void close() throws org.apache.commons.vfs2.FileSystemException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceorg.apache.commons.vfs2.FileContent
- Throws:
org.apache.commons.vfs2.FileSystemException
-
getContentInfo
public org.apache.commons.vfs2.FileContentInfo getContentInfo() throws org.apache.commons.vfs2.FileSystemException
- Specified by:
getContentInfo
in interfaceorg.apache.commons.vfs2.FileContent
- Throws:
org.apache.commons.vfs2.FileSystemException
-
isOpen
public boolean isOpen()
- Specified by:
isOpen
in interfaceorg.apache.commons.vfs2.FileContent
-
write
public long write(org.apache.commons.vfs2.FileContent fileContent) throws IOException
- Specified by:
write
in interfaceorg.apache.commons.vfs2.FileContent
- Throws:
IOException
-
write
public long write(org.apache.commons.vfs2.FileObject fileObject) throws IOException
- Specified by:
write
in interfaceorg.apache.commons.vfs2.FileContent
- Throws:
IOException
-
write
public long write(OutputStream outputStream) throws IOException
- Specified by:
write
in interfaceorg.apache.commons.vfs2.FileContent
- Throws:
IOException
-
write
public long write(OutputStream outputStream, int i) throws IOException
- Specified by:
write
in interfaceorg.apache.commons.vfs2.FileContent
- Throws:
IOException
-
-