flattree.tree
Class FixedLengthNode

java.lang.Object
  extended by flattree.tree.AbstractNode
      extended by flattree.tree.FixedLengthNode
All Implemented Interfaces:
Node

public class FixedLengthNode
extends AbstractNode

A Node which writes and reads characters limited by a fixed length.

See Also:
setLength(int)

Constructor Summary
FixedLengthNode()
           
FixedLengthNode(String name)
           
FixedLengthNode(String name, int length)
           
 
Method Summary
protected  ReadLine beforeRead(ReadLine line)
          Limits the given line to with the configured length.
protected  WriteLine beforeWrite(WriteLine line)
          Limits the given line to with the configured length.
 int getLength()
           
 void setLength(int length)
           
 
Methods inherited from class flattree.tree.AbstractNode
add, add, getLeaves, getName, getNodes, read, setLeaves, setName, setNodes, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixedLengthNode

public FixedLengthNode()

FixedLengthNode

public FixedLengthNode(String name)

FixedLengthNode

public FixedLengthNode(String name,
                       int length)
Method Detail

setLength

public void setLength(int length)

getLength

public int getLength()

beforeRead

protected ReadLine beforeRead(ReadLine line)
Limits the given line to with the configured length.

Overrides:
beforeRead in class AbstractNode
Parameters:
line - line to wrap before read
Returns:
line to read from
See Also:
getLength()

beforeWrite

protected WriteLine beforeWrite(WriteLine line)
Limits the given line to with the configured length.

Overrides:
beforeWrite in class AbstractNode
Parameters:
line - line to wrap before write
Returns:
line to write to
See Also:
getLength()


Copyright © 2011. All Rights Reserved.