|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.javasoft.jsmat.ReservedWriter
ch.javasoft.jsmat.ReservedMatrixWriter<A>
public class ReservedMatrixWriter<A>
Writer to write simple reserved variables (matrices).
Extends ReservedWriter mainly by adding the append(Object)
method to write data to the variable.
| Field Summary |
|---|
| Fields inherited from class ch.javasoft.jsmat.ReservedWriter |
|---|
mDataOutput, mReserved, mWriter |
| Constructor Summary | |
|---|---|
ReservedMatrixWriter(MatWriter<? extends DataOutput> writer,
MatReservedMatrix<A> reservedMatrix)
Constructor to write to top-level variables. |
|
ReservedMatrixWriter(ReservedComplexWriter complexWriter,
MatReservedMatrix<A> reservedMatrix)
Constructor to write to complex types, such as structs. |
|
| Method Summary | |
|---|---|
void |
append(A data)
Append data to the reserved variable. |
void |
close()
Closes the writer and completes writing of the corresponding reserved variable. |
| Methods inherited from class ch.javasoft.jsmat.ReservedWriter |
|---|
closeVariableWriter, open |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReservedMatrixWriter(ReservedComplexWriter complexWriter,
MatReservedMatrix<A> reservedMatrix)
complexWriter - the writer for the complex typereservedMatrix - the reserved variable of the nested type, e.g. a
field of a struct
public ReservedMatrixWriter(MatWriter<? extends DataOutput> writer,
MatReservedMatrix<A> reservedMatrix)
writer - the mat writer, e.g. writing a matlab filereservedMatrix - the reserved variable| Method Detail |
|---|
public void append(A data)
throws IOException
data - the data to append
IOException - if the writer has already been closed, or if the
write operation appended more data to the variable
then reserved, or if any other io exception occurrs
public void close()
throws IOException
Before invoking the super.close(), the
written data length is checked and an exception is thrown if the length
differs from the reserved size.
close in class ReservedWriterIOException - if the length of the written data is not as
expected, that is, not as predefined by the reserved
variable, or if any other io exception occurrs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||