|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--SDDS.java.SDDS.SDDSArray
Title: SDDSArray Description: Provide support for storing array data. Copyright: Copyright (c) 2001 Company: Collider Accelerator Department, Brookhaven National Laboratory
| Constructor Summary | |
SDDSArray()
Create a new SDDS array that can be used to store array information for SDDS files |
|
| Method Summary | |
boolean |
deletePage(int page)
Delete a page at the specified index |
java.lang.String |
getDescription()
Returns the description of the array |
int[] |
getDim()
Returns the number of elements in each dimension of the array |
int |
getDimensions()
Returns the number of dimensions in the array |
int |
getField_Length()
Returns the field length of the array |
java.lang.String |
getFormat_String()
Returns the format string of the array |
java.lang.String |
getGroup_Name()
Returns the group name of the array |
java.lang.String |
getName()
Returns the name of the array |
int |
getPageCount()
Returns the number of pages that the array contains |
int |
getRowCount(int page)
Returns the number of rows a page contains |
java.lang.String |
getSymbol()
Returns the symbol of the array |
int |
getType()
Returns the type of the array |
java.lang.String |
getUnits()
Returns the units of the array |
java.lang.Object[] |
getValues(int page,
boolean string_quotes)
Get the values of the array for a chosen page |
boolean |
insertPage(int page)
Inserts a blank page at the specified index |
void |
makeBlankPages(int lastpage)
Create blank pages up to the last page specified |
void |
setDescription(java.lang.String description)
Set the description of the array |
void |
setDim(int[] dim)
Set the number of elements in each dimension of the array |
void |
setField_Length(int field_length)
Set the field length of the array |
void |
setFormat_String(java.lang.String format_string)
Set the format string of the array |
void |
setGroup_Name(java.lang.String group_name)
Set the group name of the array |
void |
setName(java.lang.String name)
Set the name of the array |
void |
setSymbol(java.lang.String symbol)
Set the symbol of the array |
void |
setUnits(java.lang.String units)
Set the units of the array |
void |
setupArray(java.lang.String name,
java.lang.String symbol,
java.lang.String units,
java.lang.String description,
java.lang.String format_string,
java.lang.String group_name,
int type,
int field_length,
int dimensions)
Set up the array information |
void |
setValues(double[] v,
int page)
Set the values of the array at a chosen page |
void |
setValues(long[] v,
int page)
Set the values of the array at a chosen page |
void |
setValues(java.lang.String[] v,
int page)
Set the values of the array at a chosen page |
boolean |
writeElement(SDDS.java.SDDS.LEDataOutputStream ledos,
int page)
Write the little endian binary value of the array for a chosen page |
boolean |
writeHeader(java.io.DataOutputStream dos)
Write the header to a file. |
boolean |
writeValues(java.io.DataOutputStream dos,
int page,
boolean ascii)
Write the values of the array for a chosen page |
boolean |
writeValues(SDDS.java.SDDS.LEDataOutputStream ledos,
int page)
Write the values of the array for a chosen page |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SDDSArray()
| Method Detail |
public void setupArray(java.lang.String name,
java.lang.String symbol,
java.lang.String units,
java.lang.String description,
java.lang.String format_string,
java.lang.String group_name,
int type,
int field_length,
int dimensions)
field_length - has no effect currentlydimensions - integerpublic java.lang.String getName()
String value of the array name.public void setName(java.lang.String name)
public java.lang.String getSymbol()
String value of the array symbol.public void setSymbol(java.lang.String symbol)
public java.lang.String getUnits()
String value of the array units.public void setUnits(java.lang.String units)
units - units of the arraypublic java.lang.String getDescription()
String value of the array description.public void setDescription(java.lang.String description)
description - description of the arraypublic java.lang.String getFormat_String()
String value of the array format string.public void setFormat_String(java.lang.String format_string)
format_string - format string of the arraypublic java.lang.String getGroup_Name()
String value of the array group name.public void setGroup_Name(java.lang.String group_name)
group_name - format string of the arraypublic int getType()
int value of the array type.public int getField_Length()
int value of the array field length.public void setField_Length(int field_length)
field_length - field length of the arraypublic int getDimensions()
int value of the dimensions.public int[] getDim()
int array values.public void setDim(int[] dim)
dim - format string of the arraypublic int getPageCount()
int value of the number of pages the array contains.public int getRowCount(int page)
int value of the number of pages the array contains.-1 if the page value is invalid.public boolean insertPage(int page)
page - index of page to create inserttrue on successfalse on error.public boolean deletePage(int page)
page - index of page to deletetrue on successfalse on error.public void makeBlankPages(int lastpage)
lastpage - last page to create blank pagepublic boolean writeHeader(java.io.DataOutputStream dos)
dos - a valid DataOutputStreamtrue if the header was successfully writtenfalse if an error occured
public void setValues(long[] v,
int page)
value - a long precision number arraypage - the page of the array, must be greater then 0
public void setValues(double[] v,
int page)
value - a long precision number arraypage - the page of the array, must be greater then 0
public void setValues(java.lang.String[] v,
int page)
value - a string precision number arraypage - the page of the array, must be greater then 0
public boolean writeValues(java.io.DataOutputStream dos,
int page,
boolean ascii)
dos - a valid DataOutputStreampage - the page of the array, must be greater then 0ascii - set true to write ascii column data,
false to write big endian binary array datatrue if the values were successfully writtenfalse if an invalid page was encountered or if
the array type is undefined.
public boolean writeValues(SDDS.java.SDDS.LEDataOutputStream ledos,
int page)
dos - a valid DataOutputStreampage - the page of the array, must be greater then 0ascii - set true to write ascii column data,
false to write big endian binary array datatrue if the values were successfully writtenfalse if an invalid page was encountered or if
the array type is undefined.
public boolean writeElement(SDDS.java.SDDS.LEDataOutputStream ledos,
int page)
ledos - a valid LEDataOutputStreampage - the page of the array, must be greater then 0true if the value was successfully writtenfalse if an invalid page was encountered or if
the array type is undefined.
public java.lang.Object[] getValues(int page,
boolean string_quotes)
page - the page of the array, must be greater then 0string_quotes - true if quotes are to be added around stringsfalse if raw strings are to be outputed.
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||