|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nom.tam.fits.FitsUtil
public class FitsUtil
This class comprises static utility functions used throughout the FITS classes.
Constructor Summary | |
---|---|
FitsUtil()
|
Method Summary | |
---|---|
static int |
addPadding(int size)
Total size of blocked FITS element |
static java.lang.String[] |
byteArrayToStrings(byte[] o,
int maxLen)
Convert bytes to Strings |
static long |
findOffset(java.lang.Object o)
Find out where we are in a random access file |
static boolean |
isCompressed(java.lang.String filename)
Check if a file seems to be compressed. |
static int |
maxLength(java.lang.String[] o)
Get the maximum length of a String in a String array. |
static int |
padding(int size)
How many bytes are needed to fill the last 2880 block? |
static void |
reposition(java.lang.Object o,
long offset)
Reposition a random access stream to a requested offset |
static byte[] |
stringsToByteArray(java.lang.String[] o,
int maxLen)
Copy an array of Strings to bytes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FitsUtil()
Method Detail |
---|
public static void reposition(java.lang.Object o, long offset) throws FitsException
FitsException
public static long findOffset(java.lang.Object o)
public static int padding(int size)
public static int addPadding(int size)
public static boolean isCompressed(java.lang.String filename)
public static int maxLength(java.lang.String[] o) throws FitsException
FitsException
public static byte[] stringsToByteArray(java.lang.String[] o, int maxLen)
public static java.lang.String[] byteArrayToStrings(byte[] o, int maxLen)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |