|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.nc2.iosp.IospHelper
public class IospHelper
Helper methods for IOSP's
| Constructor Summary | |
|---|---|
IospHelper()
|
|
| Method Summary | |
|---|---|
static char[] |
convertByteToChar(byte[] byteArray)
|
static byte[] |
convertCharToByte(char[] from)
|
static void |
copyFromByteBuffer(java.nio.ByteBuffer bb,
StructureMembers.Member m,
IndexIterator result)
|
static java.lang.Object |
makePrimitiveArray(int size,
DataType dataType)
Create 1D primitive array of the given size and type |
static java.lang.Object |
makePrimitiveArray(int size,
DataType dataType,
java.lang.Object fillValue)
Create 1D primitive array of the given size and type, fill it with the given value |
static java.lang.Object |
readData(LayoutBB layout,
DataType dataType,
java.lang.Object arr)
Read data subset from ByteBuffer, place in given primitive array. |
static java.lang.Object |
readData(PositioningDataInputStream raf,
Layout index,
DataType dataType,
java.lang.Object arr)
Read data subset from PositioningDataInputStream, place in given primitive array. |
static java.lang.Object |
readData(RandomAccessFile raf,
Layout layout,
DataType dataType,
java.lang.Object arr,
int byteOrder,
boolean convertChar)
Read data subset from RandomAccessFile, place in given primitive array. |
static java.lang.Object |
readDataFill(LayoutBB layout,
DataType dataType,
java.lang.Object fillValue)
Read data subset from PositioningDataInputStream, create primitive array of size Layout.getTotalNelems. |
static java.lang.Object |
readDataFill(PositioningDataInputStream is,
Layout index,
DataType dataType,
java.lang.Object fillValue)
Read data subset from PositioningDataInputStream, create primitive array of size Layout.getTotalNelems. |
static java.lang.Object |
readDataFill(RandomAccessFile raf,
Layout index,
DataType dataType,
java.lang.Object fillValue,
int byteOrder)
Read data subset from RandomAccessFile, create primitive array of size Layout.getTotalNelems. |
static java.lang.Object |
readDataFill(RandomAccessFile raf,
Layout index,
DataType dataType,
java.lang.Object fillValue,
int byteOrder,
boolean convertChar)
|
static Array |
readSection(ParsedSectionSpec cer)
|
static long |
transferData(Array result,
java.nio.channels.WritableByteChannel channel)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IospHelper()
| Method Detail |
|---|
public static java.lang.Object readDataFill(RandomAccessFile raf,
Layout index,
DataType dataType,
java.lang.Object fillValue,
int byteOrder)
throws java.io.IOException
raf - read from here.index - handles skipping around in the file.dataType - dataType of the variablefillValue - must Byte, Short, Integer, Long, Float, Double, or String, matching dataType, or null for nonebyteOrder - if equal to RandomAccessFile.ORDER_XXXX, set the byte order just before reading
java.io.IOException - on read error
public static java.lang.Object readDataFill(RandomAccessFile raf,
Layout index,
DataType dataType,
java.lang.Object fillValue,
int byteOrder,
boolean convertChar)
throws java.io.IOException
java.io.IOException
public static java.lang.Object readData(RandomAccessFile raf,
Layout layout,
DataType dataType,
java.lang.Object arr,
int byteOrder,
boolean convertChar)
throws java.io.IOException
raf - read from here.layout - handles skipping around in the file.dataType - dataType of the variablearr - primitive array to read data intobyteOrder - if equal to RandomAccessFile.ORDER_XXXX, set the byte order just before reading
java.io.IOException - on read error
public static java.lang.Object readDataFill(PositioningDataInputStream is,
Layout index,
DataType dataType,
java.lang.Object fillValue)
throws java.io.IOException
is - read from here.index - handles skipping around in the file.dataType - dataType of the variablefillValue - must Byte, Short, Integer, Long, Float, Double, or String, matching dataType, or null for none
java.io.IOException - on read error
public static java.lang.Object readData(PositioningDataInputStream raf,
Layout index,
DataType dataType,
java.lang.Object arr)
throws java.io.IOException
raf - read from here.index - handles skipping around in the file.dataType - dataType of the variablearr - primitive array to read data into
java.io.IOException - on read error
public static java.lang.Object readDataFill(LayoutBB layout,
DataType dataType,
java.lang.Object fillValue)
throws java.io.IOException
layout - handles skipping around in the file, privide ByteBuffer to read fromdataType - dataType of the variablefillValue - must Byte, Short, Integer, Long, Float, Double, or String, matching dataType, or null for none
java.io.IOException - on read error
public static java.lang.Object readData(LayoutBB layout,
DataType dataType,
java.lang.Object arr)
throws java.io.IOException
layout - handles skipping around in the file, privide ByteBuffer to read fromdataType - dataType of the variablearr - primitive array to read data into
java.io.IOException - on read error
public static void copyFromByteBuffer(java.nio.ByteBuffer bb,
StructureMembers.Member m,
IndexIterator result)
public static java.lang.Object makePrimitiveArray(int size,
DataType dataType)
size - the size of the array to createdataType - dataType of the variable
public static java.lang.Object makePrimitiveArray(int size,
DataType dataType,
java.lang.Object fillValue)
size - the size of the array to createdataType - dataType of the variablefillValue - must be Byte, Short, Integer, Long, Float, Double, or String, matching dataType
public static char[] convertByteToChar(byte[] byteArray)
public static byte[] convertCharToByte(char[] from)
public static long transferData(Array result,
java.nio.channels.WritableByteChannel channel)
throws java.io.IOException,
InvalidRangeException
java.io.IOException
InvalidRangeException
public static Array readSection(ParsedSectionSpec cer)
throws java.io.IOException,
InvalidRangeException
java.io.IOException
InvalidRangeException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||