|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--picture.filetype.PictureType | +--picture.filetype.PGMPictureType
PictureType-Unterklasse für PGM-Dateien.
Field Summary | |
static int |
ASCII
|
static int |
RAW
|
protected static int |
VALUES_PER_LINE
|
Constructor Summary | |
PGMPictureType()
|
Method Summary | |
java.lang.String |
getDescription()
Beschreibung des Bildtyps. |
java.lang.String |
getExtension()
Liefert die Dateiendung zurück. |
DialogPane |
getSaveOptionsPane(javax.swing.JFrame f,
Picture p)
Liefert einen Speichern-Optionendialog zurück (null, falls es keinen gibt). |
static void |
init()
Dummy zum Aufrufen des Static-Initializers ... |
Picture |
load(java.io.InputStream origin)
Lädt ein Bild im entsprechenden Format. |
protected static int |
readASCIINumber(char c,
java.io.InputStream in)
Reads inputStream up to next whitespace or comment (= "#" |
protected double |
readRawValue(java.io.InputStream in,
int pw,
double scale,
double offset)
|
void |
save(Picture p,
PictureProperty pp,
java.io.OutputStream origout)
Speichert das übergebene Bild im entsprechenden Format mit Optionen ab. |
protected void |
saveRawPixel(java.io.OutputStream out,
long p,
int pw)
|
protected static char |
skipWhitespacesGetComments(java.io.InputStream in,
java.util.Vector comments)
Skips whitespaces and comments (= "#" |
protected static java.lang.String[] |
vectorToStringArray(java.util.Vector v)
Converts a vector of strings to String[]. |
protected void |
writeASCII(java.io.OutputStream out,
Picture p,
int valuesPerLine,
double min,
double max,
long mg)
|
protected static void |
writeNumber(java.io.OutputStream out,
long i)
Writes a number as ASCII characters to specified OutputStream. |
protected void |
writeRaw(java.io.OutputStream out,
Picture p,
double min,
double max,
long mg)
|
protected static void |
writeString(java.io.OutputStream out,
java.lang.String s)
Writes a string to specified OutputStream. |
Methods inherited from class picture.filetype.PictureType |
save |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int ASCII
public static final int RAW
protected static final int VALUES_PER_LINE
Constructor Detail |
public PGMPictureType()
Method Detail |
public static final void init()
public java.lang.String getExtension()
PictureType
getExtension
in class PictureType
picture.filetype.PictureType
public java.lang.String getDescription()
PictureType
getDescription
in class PictureType
picture.filetype.PictureType
public DialogPane getSaveOptionsPane(javax.swing.JFrame f, Picture p) throws PictureException
PictureType
getSaveOptionsPane
in class PictureType
picture.filetype.PictureType
owner
- Parentframepic
- zu berbeitendes Bildpublic Picture load(java.io.InputStream origin) throws PictureException, java.io.IOException
PictureType
load
in class PictureType
picture.filetype.PictureType
in
- Eingabestreampublic void save(Picture p, PictureProperty pp, java.io.OutputStream origout) throws PictureException, java.io.IOException
PictureType
save
in class PictureType
picture.filetype.PictureType
p
- Zu speicherndes Bildp
- Optionenout
- Ausgabestreamprotected static char skipWhitespacesGetComments(java.io.InputStream in, java.util.Vector comments) throws java.io.IOException
java.io.IOException
- on reading exception (e.g. EOFException).protected static int readASCIINumber(char c, java.io.InputStream in) throws java.io.IOException, PictureException
c
- Character from input stream which was already read.dataInputStream
- Stream to read on further.java.io.IOException
- on reading exception (e.g. EOFException).PictureException
- if number contains non digit characters.protected double readRawValue(java.io.InputStream in, int pw, double scale, double offset) throws java.io.IOException, PictureException
protected static void writeString(java.io.OutputStream out, java.lang.String s) throws java.io.IOException
out
- OutputStream to write to.s
- String to be written.java.io.IOException
- Problems on writing to outputStreamprotected void saveRawPixel(java.io.OutputStream out, long p, int pw) throws java.io.IOException
protected void writeRaw(java.io.OutputStream out, Picture p, double min, double max, long mg) throws java.io.IOException, PictureException
protected void writeASCII(java.io.OutputStream out, Picture p, int valuesPerLine, double min, double max, long mg) throws java.io.IOException, PictureException
protected static void writeNumber(java.io.OutputStream out, long i) throws java.io.IOException
out
- OutputStream to write to.i
- int value to be written.java.io.IOException
- Problems on writing to outputStreamprotected static java.lang.String[] vectorToStringArray(java.util.Vector v)
v
- Vector to convert.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |