|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnom.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 long |
addPadding(long size)
|
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 java.io.InputStream |
getURLStream(java.net.URL url,
int level)
Get a stream to a URL accommodating possible redirections. |
static boolean |
isCompressed(java.io.File test)
Is a file compressed? |
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 void |
pad(ArrayDataOutput stream,
long size)
Add padding to an output stream. |
static void |
pad(ArrayDataOutput stream,
long size,
byte fill)
Add padding to an output stream. |
static int |
padding(int size)
How many bytes are needed to fill the last 2880 block? |
static int |
padding(long size)
|
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 padding(long size)
public static int addPadding(int size)
public static long addPadding(long size)
public static boolean isCompressed(java.io.File test)
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)
public static java.io.InputStream getURLStream(java.net.URL url, int level) throws java.io.IOException
java.io.IOException
public static void pad(ArrayDataOutput stream, long size) throws FitsException
FitsException
public static void pad(ArrayDataOutput stream, long size, byte fill) throws FitsException
FitsException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |