public final class MocIO extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
ASCII |
static int |
FITS |
static int |
JSON |
static int |
JSON0 |
static String |
OLDSIGNATURE |
static String |
SIGNATURE |
| Constructor and Description |
|---|
MocIO(HealpixMoc m) |
| Modifier and Type | Method and Description |
|---|---|
void |
createUniq(int nval,
int nbyte,
byte[] t) |
void |
read(InputStream in)
Read HEALPix MOC from a stream.
|
void |
read(InputStream in,
int mode)
Deprecated.
see read(InputStream)
|
void |
read(String filename)
Read HEALPix MOC from a file.
|
void |
read(String filename,
int mode)
Deprecated.
see read(String)
|
void |
readASCII(InputStream in)
Read MOC from an ASCII stream
Support simultaneously various ASCII formats (OBSOLETE, ASCII & JSON)
ASCII (with a first comment for providing the MOCORDER)
#MOCORDER MAX
ORDER1/nn1,nn2-nnX ORDER2/...
|
void |
readFits(InputStream in)
Read HEALPix MOC from an Binary FITS stream
|
void |
write(OutputStream out)
Write HEALPix MOC to an output stream
|
void |
write(OutputStream out,
int mode)
Write HEALPix MOC to an output stream
At the end, the stream is not closed
|
void |
write(String filename)
Write HEALPix MOC to a file
|
void |
write(String filename,
int mode)
Write HEALPix MOC to a file
|
void |
writeASCII(OutputStream out)
Write HEALPix MOC to an output stream IN ASCII encoded format
|
void |
writeFits(OutputStream out)
Write HEALPix MOC to an output stream in FITS encoded format
|
void |
writeJSON(OutputStream out)
Write HEALPix MOC to an output stream IN JSON encoded format
|
public static final int FITS
public static final int JSON
public static final int ASCII
public static final int JSON0
public static final String OLDSIGNATURE
public static final String SIGNATURE
public MocIO(HealpixMoc m)
public void read(String filename) throws Exception
filename - file nameExceptionpublic void read(String filename, int mode) throws Exception
filename - file namemode - MOC format: FITS, JSON, ASCIIExceptionpublic void read(InputStream in) throws Exception
in - input streamExceptionpublic void read(InputStream in, int mode) throws Exception
in - input streammode - MOC format: FITS, JSON, ASCIIExceptionpublic void readASCII(InputStream in) throws Exception
in - input streamExceptionpublic void readFits(InputStream in) throws Exception
Exceptionpublic void write(String filename) throws Exception
filename - name of fileExceptionpublic void write(String filename, int mode) throws Exception
filename - name of filemode - encoded format (FITS or JSON)Exceptionpublic void write(OutputStream out) throws Exception
out - output streamExceptionpublic void write(OutputStream out, int mode) throws Exception
out - output streammode - encoded format (FITS or JSON or ASCII)Exceptionpublic void writeASCII(OutputStream out) throws Exception
out - output streamExceptionpublic void writeJSON(OutputStream out) throws Exception
out - output streamExceptionpublic void writeFits(OutputStream out) throws Exception
out - output streamException