Class RepositoryFileOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.ByteArrayOutputStream
-
- org.pentaho.platform.repository2.unified.fileio.RepositoryFileOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
,org.pentaho.platform.api.repository2.unified.ISourcesStreamEvents
public class RepositoryFileOutputStream extends ByteArrayOutputStream implements org.pentaho.platform.api.repository2.unified.ISourcesStreamEvents
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
autoCreateDirStructure
protected boolean
autoCreateUniqueFileName
protected String
charsetName
protected boolean
closed
protected boolean
flushed
protected boolean
forceFlush
protected boolean
hidden
protected ArrayList<org.pentaho.platform.api.repository2.unified.IStreamListener>
listeners
protected String
path
protected org.pentaho.platform.api.repository2.unified.IUnifiedRepository
repository
-
Fields inherited from class java.io.ByteArrayOutputStream
buf, count
-
-
Constructor Summary
Constructors Modifier Constructor Description RepositoryFileOutputStream(Serializable id)
RepositoryFileOutputStream(Serializable id, boolean autoCreateUniqueFileName, boolean autoCreateDirStructure)
RepositoryFileOutputStream(Serializable id, boolean autoCreateUniqueFileName, boolean autoCreateDirStructure, org.pentaho.platform.api.repository2.unified.IUnifiedRepository repository, boolean hidden)
protected
RepositoryFileOutputStream(Serializable id, String charsetName)
RepositoryFileOutputStream(String path)
RepositoryFileOutputStream(String path, boolean hidden)
RepositoryFileOutputStream(String path, boolean autoCreateUniqueFileName, boolean autoCreateDirStructure)
RepositoryFileOutputStream(String path, boolean autoCreateUniqueFileName, boolean autoCreateDirStructure, org.pentaho.platform.api.repository2.unified.IUnifiedRepository repository, boolean hidden)
protected
RepositoryFileOutputStream(String path, String charsetName)
RepositoryFileOutputStream(org.pentaho.platform.api.repository2.unified.RepositoryFile file)
RepositoryFileOutputStream(org.pentaho.platform.api.repository2.unified.RepositoryFile file, boolean autoCreateUniqueFileName, boolean autoCreateDirStructure)
RepositoryFileOutputStream(org.pentaho.platform.api.repository2.unified.RepositoryFile file, boolean autoCreateUniqueFileName, boolean autoCreateDirStructure, org.pentaho.platform.api.repository2.unified.IUnifiedRepository repository)
protected
RepositoryFileOutputStream(org.pentaho.platform.api.repository2.unified.RepositoryFile file, String charsetName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(org.pentaho.platform.api.repository2.unified.IStreamListener listener)
void
close()
void
flush()
void
forceFlush(boolean forceFlush)
boolean
getAutoCreateDirStructure()
boolean
getAutoCreateUniqueFileName()
String
getCharsetName()
String
getFilePath()
protected org.pentaho.platform.api.repository2.unified.RepositoryFile
getParent(String path)
org.pentaho.platform.api.repository2.unified.IUnifiedRepository
getRepository()
boolean
isFlushed()
void
setAutoCreateDirStructure(boolean autoCreateDirStructure)
void
setCharsetName(String charsetName)
void
setFilePath(String path)
void
setRepository(org.pentaho.platform.api.repository2.unified.IUnifiedRepository repository)
-
Methods inherited from class java.io.ByteArrayOutputStream
reset, size, toByteArray, toString, toString, toString, toString, write, write, writeBytes, writeTo
-
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
-
-
-
Field Detail
-
hidden
protected boolean hidden
-
path
protected String path
-
repository
protected org.pentaho.platform.api.repository2.unified.IUnifiedRepository repository
-
charsetName
protected String charsetName
-
autoCreateUniqueFileName
protected boolean autoCreateUniqueFileName
-
autoCreateDirStructure
protected boolean autoCreateDirStructure
-
closed
protected boolean closed
-
flushed
protected boolean flushed
-
forceFlush
protected boolean forceFlush
-
listeners
protected ArrayList<org.pentaho.platform.api.repository2.unified.IStreamListener> listeners
-
-
Constructor Detail
-
RepositoryFileOutputStream
public RepositoryFileOutputStream(String path, boolean autoCreateUniqueFileName, boolean autoCreateDirStructure, org.pentaho.platform.api.repository2.unified.IUnifiedRepository repository, boolean hidden)
-
RepositoryFileOutputStream
public RepositoryFileOutputStream(Serializable id, boolean autoCreateUniqueFileName, boolean autoCreateDirStructure, org.pentaho.platform.api.repository2.unified.IUnifiedRepository repository, boolean hidden) throws FileNotFoundException
- Throws:
FileNotFoundException
-
RepositoryFileOutputStream
public RepositoryFileOutputStream(org.pentaho.platform.api.repository2.unified.RepositoryFile file, boolean autoCreateUniqueFileName, boolean autoCreateDirStructure, org.pentaho.platform.api.repository2.unified.IUnifiedRepository repository)
-
RepositoryFileOutputStream
public RepositoryFileOutputStream(String path, boolean autoCreateUniqueFileName, boolean autoCreateDirStructure)
-
RepositoryFileOutputStream
public RepositoryFileOutputStream(Serializable id, boolean autoCreateUniqueFileName, boolean autoCreateDirStructure) throws FileNotFoundException
- Throws:
FileNotFoundException
-
RepositoryFileOutputStream
public RepositoryFileOutputStream(org.pentaho.platform.api.repository2.unified.RepositoryFile file, boolean autoCreateUniqueFileName, boolean autoCreateDirStructure)
-
RepositoryFileOutputStream
public RepositoryFileOutputStream(String path)
-
RepositoryFileOutputStream
public RepositoryFileOutputStream(String path, boolean hidden)
-
RepositoryFileOutputStream
public RepositoryFileOutputStream(org.pentaho.platform.api.repository2.unified.RepositoryFile file)
-
RepositoryFileOutputStream
public RepositoryFileOutputStream(Serializable id) throws FileNotFoundException
- Throws:
FileNotFoundException
-
RepositoryFileOutputStream
protected RepositoryFileOutputStream(String path, String charsetName) throws FileNotFoundException
- Throws:
FileNotFoundException
-
RepositoryFileOutputStream
protected RepositoryFileOutputStream(org.pentaho.platform.api.repository2.unified.RepositoryFile file, String charsetName) throws FileNotFoundException
- Throws:
FileNotFoundException
-
RepositoryFileOutputStream
protected RepositoryFileOutputStream(Serializable id, String charsetName) throws FileNotFoundException
- Throws:
FileNotFoundException
-
-
Method Detail
-
getParent
protected org.pentaho.platform.api.repository2.unified.RepositoryFile getParent(String path)
-
forceFlush
public void forceFlush(boolean forceFlush)
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classByteArrayOutputStream
- Throws:
IOException
-
getFilePath
public String getFilePath()
-
setFilePath
public void setFilePath(String path)
-
getAutoCreateUniqueFileName
public boolean getAutoCreateUniqueFileName()
-
getAutoCreateDirStructure
public boolean getAutoCreateDirStructure()
-
setAutoCreateDirStructure
public void setAutoCreateDirStructure(boolean autoCreateDirStructure)
-
addListener
public void addListener(org.pentaho.platform.api.repository2.unified.IStreamListener listener)
- Specified by:
addListener
in interfaceorg.pentaho.platform.api.repository2.unified.ISourcesStreamEvents
-
setRepository
public void setRepository(org.pentaho.platform.api.repository2.unified.IUnifiedRepository repository)
-
getRepository
public org.pentaho.platform.api.repository2.unified.IUnifiedRepository getRepository()
-
getCharsetName
public String getCharsetName()
-
setCharsetName
public void setCharsetName(String charsetName)
-
isFlushed
public boolean isFlushed()
-
-