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 nameException
public void read(String filename, int mode) throws Exception
filename
- file namemode
- MOC format: FITS, JSON, ASCIIException
public void read(InputStream in) throws Exception
in
- input streamException
public void read(InputStream in, int mode) throws Exception
in
- input streammode
- MOC format: FITS, JSON, ASCIIException
public void readASCII(InputStream in) throws Exception
in
- input streamException
public void readFits(InputStream in) throws Exception
Exception
public void write(String filename) throws Exception
filename
- name of fileException
public void write(String filename, int mode) throws Exception
filename
- name of filemode
- encoded format (FITS or JSON)Exception
public void write(OutputStream out) throws Exception
out
- output streamException
public void write(OutputStream out, int mode) throws Exception
out
- output streammode
- encoded format (FITS or JSON or ASCII)Exception
public void writeASCII(OutputStream out) throws Exception
out
- output streamException
public void writeJSON(OutputStream out) throws Exception
out
- output streamException
public void writeFits(OutputStream out) throws Exception
out
- output streamException