public class NodeNumberWriter
extends java.lang.Object
NodeNumberReader
.Modifier and Type | Field and Description |
---|---|
static int |
ADD_HEADER_COMMENT
Flag that causes the output to start with a comment identifying the FEM
model to which the nodes belong.
|
static int |
USE_BRACKETS
Flag that causes the written numbers to be enclosed in square brackets
[ ] . |
Constructor and Description |
---|
NodeNumberWriter(java.io.File file) |
NodeNumberWriter(java.io.PrintWriter writer) |
NodeNumberWriter(java.lang.String fileName) |
NodeNumberWriter(java.io.Writer writer) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
finalize() |
int |
getFlags() |
int |
getMaxColumns() |
void |
setFlags(int flags) |
void |
setMaxColumns(int max) |
void |
write(java.util.Collection<FemNode3d> nodes)
Writes the numbers of a set of nodes, using the format settings specified
in the class.
|
static void |
write(java.io.File file,
java.util.Collection<FemNode3d> nodes)
Writes the numbers of a set of nodes to a file.
|
static void |
write(java.io.File file,
java.util.Collection<FemNode3d> nodes,
int maxCols,
int flags)
Writes the numbers of a set of nodes to a file.
|
static void |
write(java.lang.String filePath,
java.util.Collection<FemNode3d> nodes)
Writes the numbers of a set of nodes to a file.
|
public static int USE_BRACKETS
[ ]
.public static int ADD_HEADER_COMMENT
public NodeNumberWriter(java.io.PrintWriter writer)
public NodeNumberWriter(java.io.Writer writer)
public NodeNumberWriter(java.io.File file) throws java.io.IOException
java.io.IOException
public NodeNumberWriter(java.lang.String fileName) throws java.io.IOException
java.io.IOException
public int getMaxColumns()
public void setMaxColumns(int max)
public int getFlags()
public void setFlags(int flags)
public void write(java.util.Collection<FemNode3d> nodes) throws java.io.IOException
nodes
- nodes whose numbers should be writtenjava.io.IOException
- if an I/O error occurred or if the nodes do not
belong to the same FEM model.public void close()
public void finalize()
finalize
in class java.lang.Object
public static void write(java.lang.String filePath, java.util.Collection<FemNode3d> nodes) throws java.io.IOException
filePath
- path to the file to be writtennodes
- nodes whose numbers should be writtenjava.io.IOException
- if an I/O error occurred or if the nodes do
not belong to the same FEM modelpublic static void write(java.io.File file, java.util.Collection<FemNode3d> nodes) throws java.io.IOException
file
- the file to be writtennodes
- nodes whose numbers should be writtenjava.io.IOException
- if an I/O error occurred or if the nodes do
not belong to the same FEM modelpublic static void write(java.io.File file, java.util.Collection<FemNode3d> nodes, int maxCols, int flags) throws java.io.IOException
maxCols
numbers per line. The flags
argument
may contain the flags USE_BRACKETS
and #ADD_HEADER_COMMENT
.file
- the file to be writtennodes
- nodes whose numbers should be writtenmaxCols
- maximum number of node numbers per lineflags
- flags to control the output.
combination of USE_BRACKETS
and ADD_HEADER_COMMENT
.java.io.IOException
- if an I/O error occurred or if the nodes do
not belong to the same FEM model