public class ArrayObject extends DataObject
channel, dataObjectLocation, fileObject, name, offset, parentDir, size| Constructor and Description |
|---|
ArrayObject(java.io.File parentDir,
File fileObject,
Array array,
long offset)
Deprecated.
|
ArrayObject(java.io.File parentDir,
File fileObject,
Array array,
long offset,
DataObjectLocation location)
Creats a new array instance.
|
ArrayObject(java.net.URL parent,
File fileObject,
Array array,
long offset)
Deprecated.
|
ArrayObject(java.net.URL parent,
File fileObject,
Array array,
long offset,
DataObjectLocation location)
Creates a new array instance.
|
| Modifier and Type | Method and Description |
|---|---|
java.awt.image.BufferedImage |
as2DImage()
Returns a BufferedImage object with the type set to TYPE_BYTE_GRAY.
|
void |
close() |
Array |
getArray() |
int |
getAxes()
Gets the number of dimensions.
|
int[] |
getDimensions()
Gets the dimensions of the array.
|
double |
getDouble(int[] position)
Gets an array element, as a double.
|
double |
getDouble(int row,
int column)
Gets an element of a 2-D array, as a double.
|
double |
getDouble(int i1,
int i2,
int i3)
Gets an element of a 3-D array, as a double.
|
double[] |
getElements1D()
Gets the entire 1-D array, as doubles.
|
double[][] |
getElements2D()
Gets the entire 2-D array, as doubles.
|
double[][][] |
getElements3D()
Gets the entire 3-D array, as doubles.
|
int |
getElementSize()
Gets the size of an array element.
|
ElementType |
getElementType() |
int |
getInt(int[] position)
Gets an array element, as an int.
|
int |
getInt(int row,
int column)
Gets an element of a 2-D array, as an int.
|
int |
getInt(int i1,
int i2,
int i3)
Gets an element of a 3-D array, as an int.
|
long |
getLong(int[] position)
Gets an array element, as a long.
|
long |
getLong(int row,
int column)
Gets an element of a 2-D array, as a long.
|
long |
getLong(int i1,
int i2,
int i3)
Gets an element of a 3-D array, as a long.
|
java.lang.String |
getName()
return the name of this array.
|
boolean |
isImage()
Checks to see whether the array is an image.
|
void |
open() |
void |
setArray(Array array) |
closeChannel, getChannel, getDataFile, getDataObjectLocation, getInputStream, getOffset, getSize, setDataObjectLocation, setName, setSizepublic ArrayObject(java.io.File parentDir,
File fileObject,
Array array,
long offset,
DataObjectLocation location)
throws java.io.FileNotFoundException,
java.io.IOException,
java.net.URISyntaxException
parentDir - the parent directory for the data filefileObject - the file object metadataarray - the array objectoffset - the offset within the data filejava.io.IOException - if there is an error opening the data filejava.io.FileNotFoundException - if the data file is not foundjava.net.URISyntaxExceptionpublic ArrayObject(java.net.URL parent,
File fileObject,
Array array,
long offset,
DataObjectLocation location)
throws java.io.FileNotFoundException,
java.io.IOException,
java.net.URISyntaxException
parent - the parent directory for the data filefileObject - the file object metadataarray - the array objectoffset - the offset within the data filejava.io.IOException - if there is an error opening the data filejava.io.FileNotFoundException - if the data file is not foundjava.net.URISyntaxException@Deprecated
public ArrayObject(java.net.URL parent,
File fileObject,
Array array,
long offset)
throws java.io.FileNotFoundException,
java.io.IOException,
java.net.URISyntaxException
java.io.FileNotFoundExceptionjava.io.IOExceptionjava.net.URISyntaxException@Deprecated
public ArrayObject(java.io.File parentDir,
File fileObject,
Array array,
long offset)
throws java.io.FileNotFoundException,
java.io.IOException,
java.net.URISyntaxException
java.io.FileNotFoundExceptionjava.io.IOExceptionjava.net.URISyntaxExceptionpublic int[] getDimensions()
public java.lang.String getName()
getName in class DataObjectpublic int getAxes()
public int getElementSize()
public int getInt(int row,
int column)
throws java.io.IOException
row - the rowcolumn - the columnjava.io.IOExceptionpublic long getLong(int row,
int column)
throws java.io.IOException
row - the rowcolumn - the columnjava.io.IOExceptionpublic double getDouble(int row,
int column)
throws java.io.IOException
row - the rowcolumn - the columnjava.io.IOExceptionpublic int getInt(int i1,
int i2,
int i3)
throws java.io.IOException
i1 - the first indexi2 - the second indexi3 - the third indexjava.io.IOExceptionpublic long getLong(int i1,
int i2,
int i3)
throws java.io.IOException
i1 - the first indexi2 - the second indexi3 - the third indexjava.io.IOExceptionpublic double getDouble(int i1,
int i2,
int i3)
throws java.io.IOException
i1 - the first indexi2 - the second indexi3 - the third indexjava.io.IOExceptionpublic int getInt(int[] position)
throws java.io.IOException
position - the indices of the elementjava.io.IOExceptionpublic long getLong(int[] position)
throws java.io.IOException
position - the indices of the elementjava.io.IOExceptionpublic double getDouble(int[] position)
throws java.io.IOException
position - the indices of the elementjava.io.IOExceptionpublic double[] getElements1D()
throws java.io.IOException
java.io.IOExceptionpublic double[][] getElements2D()
throws java.io.IOException
java.io.IOExceptionpublic double[][][] getElements3D()
throws java.io.IOException
java.io.IOExceptionpublic boolean isImage()
public java.awt.image.BufferedImage as2DImage()
public ElementType getElementType()
public Array getArray()
public void setArray(Array array)
public void open()
throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
java.io.IOExceptionCopyright © 2022 Planetary Data System. All rights reserved.