gov.nist.microanalysis.EPQTools
Class WriteRaw

java.lang.Object
  extended by gov.nist.microanalysis.EPQTools.WriteRaw

Deprecated. Use EPQTools.Ripple file instead

public class WriteRaw
extends java.lang.Object

A simple class to assist writing raw binary files consisting of a matrix of data points of uniform length.

Copyright: Pursuant to title 17 Section 105 of the United States Code this software is not subject to copyright protection and is in the public domain

Company: National Institute of Standards and Technology

Version:
1.0
Author:
Nicholas W. M. Ritchie

Field Summary
static java.lang.String FLOAT
          Deprecated.  
static java.lang.String SIGNED
          Deprecated.  
static java.lang.String UNSIGNED
          Deprecated.  
 
Constructor Summary
WriteRaw(int nRows, int nCols, int datumLength, int itemSize, java.io.FileOutputStream fos)
          Deprecated. Use EPQTools.Ripple file instead
WriteRaw(int nRows, int nCols, int datumLength, int itemSize, java.lang.String filename)
          Deprecated. Use EPQTools.Ripple file instead
 
Method Summary
 void close()
          Deprecated. close - Closes the underlying file.
 java.io.OutputStream getStream(int row, int col)
          Deprecated. getStream - Get an instance of OutputStream configured correctly to write the datum at row, col.
 int nextColumn()
          Deprecated. nextColumn - The next column ready to accept new data.
 int nextRow()
          Deprecated. nextRow - The next row ready to accept new data.
 void writeHeader(java.lang.String filename)
          Deprecated. Use EPQTools.Ripple file instead
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIGNED

public static final java.lang.String SIGNED
Deprecated. 
See Also:
Constant Field Values

UNSIGNED

public static final java.lang.String UNSIGNED
Deprecated. 
See Also:
Constant Field Values

FLOAT

public static final java.lang.String FLOAT
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

WriteRaw

public WriteRaw(int nRows,
                int nCols,
                int datumLength,
                int itemSize,
                java.lang.String filename)
         throws java.io.FileNotFoundException
Deprecated. Use EPQTools.Ripple file instead

WriteRaw - Create a raw data file containing nRows rows and nCol columns of data items of datumSize bytes. The result is placed in a file named filename.

Parameters:
nRows - int
nCols - int
datumLength - int - The number of atomic data items in each of the nRows*nCols data blocks.
itemSize - int - The length of each atomic data item in bytes (usually 1, 2, 4, or 8)
filename - String
Throws:
java.io.FileNotFoundException

WriteRaw

public WriteRaw(int nRows,
                int nCols,
                int datumLength,
                int itemSize,
                java.io.FileOutputStream fos)
         throws java.io.FileNotFoundException
Deprecated. Use EPQTools.Ripple file instead

WriteRaw - Create a raw data file containing nRows rows and nCol columns of data items of datumSize bytes. The result is placed in a file named filename.

Parameters:
nRows - int
nCols - int
datumLength - int - The number of atomic data items in each of the nRows*nCols data blocks.
itemSize - int - The length of each atomic data item in bytes (usually 1, 2, 4, or 8)
fos - - A FileOutputStream into which to write the data
Throws:
java.io.FileNotFoundException
Method Detail

writeHeader

public void writeHeader(java.lang.String filename)
                 throws EPQException
Deprecated. Use EPQTools.Ripple file instead

writeHeader - Writes a separate file containing contextual information describing the raw data file. Usually the file name for these files ends in ".rpl".

Parameters:
filename - String
Throws:
java.io.FileNotFoundException
java.io.UnsupportedEncodingException
EPQException

nextRow

public int nextRow()
Deprecated. 
nextRow - The next row ready to accept new data.

Returns:
int

nextColumn

public int nextColumn()
Deprecated. 
nextColumn - The next column ready to accept new data.

Returns:
int

getStream

public java.io.OutputStream getStream(int row,
                                      int col)
                               throws java.io.IOException
Deprecated. 
getStream - Get an instance of OutputStream configured correctly to write the datum at row, col. It is not necessary to write the data in any particular order although if the data is out of natural order, the contents of the intervening data will contain undefined values.

Parameters:
row - int
col - int
Returns:
OutputStream
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Deprecated. 
close - Closes the underlying file.

Throws:
java.io.IOException