public interface ProjectReader
Modifier and Type | Method and Description |
---|---|
void |
addProjectListener(ProjectListener listener)
Add a listener to receive events as a project is being read.
|
ProjectFile |
read(File file)
Read a single schedule from a file where a File instance is supplied.
|
ProjectFile |
read(InputStream inputStream)
Read a single schedule from a file where the contents of the project file
are supplied via an input stream.
|
ProjectFile |
read(String fileName)
Read a single schedule from a file where the file name is supplied.
|
List<ProjectFile> |
readAll(File file)
Read all schedules from a file where a File instance is supplied.
|
List<ProjectFile> |
readAll(InputStream inputStream)
Read all schedules from a file where the contents of the project file
are supplied via an input stream.
|
List<ProjectFile> |
readAll(String fileName)
Read all schedules from a file where the file name is supplied.
|
void |
setCharset(Charset charset)
Some readers will be sensitive to the encoding of the file they are reading.
|
ProjectReader |
setProperties(Properties props)
Deprecated.
use reader class setter methods directly. For UniversalProjectReader, use getProjectReaderProxy to access the reader instance.
|
@Deprecated ProjectReader setProperties(Properties props)
NOTE: currently this only supports Boolean properties.
Properties are passed in this form:
<class name>.<property name>=<property value>
. This method will ignore any properties
which are not intended for the current reader class. Here's an example:
net.sf.mpxj.phoenix.PhoenixReader.UseActivityCodesForTaskHierarchy=true
props
- properties to setvoid addProjectListener(ProjectListener listener)
listener
- ProjectListener instanceProjectFile read(String fileName) throws MPXJException
fileName
- file nameMPXJException
List<ProjectFile> readAll(String fileName) throws MPXJException
fileName
- file nameMPXJException
ProjectFile read(File file) throws MPXJException
file
- File instanceMPXJException
List<ProjectFile> readAll(File file) throws MPXJException
file
- File instanceMPXJException
ProjectFile read(InputStream inputStream) throws MPXJException
inputStream
- InputStream instanceMPXJException
List<ProjectFile> readAll(InputStream inputStream) throws MPXJException
inputStream
- InputStream instanceMPXJException
void setCharset(Charset charset)
charset
- encoding to use when reading a fileCopyright © 2000–2024 Packwood Software. All rights reserved.