Class dnx.lr.VRMLPrintStream
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class dnx.lr.VRMLPrintStream

java.lang.Object
   |
   +----java.io.OutputStream
           |
           +----java.io.FilterOutputStream
                   |
                   +----java.io.PrintStream
                           |
                           +----dnx.lr.VRMLPrintStream

public class VRMLPrintStream
extends PrintStream
This stream is just a relatively shallow subclass of PrintStream that automatically pretty-prints the output, which is assumed to be a .wrl file. (Specifically, it maintains a current indent level, which is changed when []{} characters are seen.) The various print() methods (called during a PrintAction) are passed a VRMLPrintStream to send their output to.

Constructor Index

 o VRMLPrintStream(OutputStream)

Method Index

 o indent()
 o print(char)
Print out a brace or bracket and adjust the current indentation level appropriately.
 o print(String)
Print the string to the underlying PrintStream, making sure to handle UTF correctly.
 o println(String)
Print an entire line; i.e.
 o printWithWrap(String)
Print a string, wrapping if the resulting line would be over 79 characters (unless nothing has been printed on the line so far).
 o setIndentation(String)

Constructors

 o VRMLPrintStream
  public VRMLPrintStream(OutputStream o)

Methods

 o setIndentation
  public void setIndentation(String s)
 o indent
  public void indent()
 o print
  public void print(char c)
Print out a brace or bracket and adjust the current indentation level appropriately. This always prints out a newline after the character, and for a closing brace or bracket, will indent() (at the newly shrunk indent level) before printing the character.
Overrides:
print in class PrintStream
 o printWithWrap
  public void printWithWrap(String s)
Print a string, wrapping if the resulting line would be over 79 characters (unless nothing has been printed on the line so far). If something has already been printed on the line, print a space before the string.
 o print
  public synchronized void print(String s)
Print the string to the underlying PrintStream, making sure to handle UTF correctly.
Overrides:
print in class PrintStream
 o println
  public void println(String s)
Print an entire line; i.e. indent, then print(), then print a newline. Only call this is you're printing the entire line; if you're printing the last bit of a line, call print() and give the newline yourself (otherwise, you'll get an indent in the middle of a line).
Overrides:
println in class PrintStream

All Packages  Class Hierarchy  This Package  Previous  Next  Index