Package org.jf.util

Class TwoColumnOutput


  • public final class TwoColumnOutput
    extends java.lang.Object
    Class that takes a combined output destination and provides two output writers, one of which ends up writing to the left column and one which goes on the right.
    • Constructor Summary

      Constructors 
      Constructor Description
      TwoColumnOutput​(java.io.OutputStream out, int leftWidth, int rightWidth, java.lang.String spacer)
      Constructs an instance.
      TwoColumnOutput​(java.io.Writer out, int leftWidth, int rightWidth, java.lang.String spacer)
      Constructs an instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void write​(java.lang.String left, java.lang.String right)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TwoColumnOutput

        public TwoColumnOutput​(@Nonnull
                               java.io.Writer out,
                               int leftWidth,
                               int rightWidth,
                               @Nonnull
                               java.lang.String spacer)
        Constructs an instance.
        Parameters:
        out - non-null; writer to send final output to
        leftWidth - > 0; width of the left column, in characters
        rightWidth - > 0; width of the right column, in characters
        spacer - non-null; spacer string to sit between the two columns
      • TwoColumnOutput

        public TwoColumnOutput​(java.io.OutputStream out,
                               int leftWidth,
                               int rightWidth,
                               java.lang.String spacer)
        Constructs an instance.
        Parameters:
        out - non-null; stream to send final output to
        leftWidth - >= 1; width of the left column, in characters
        rightWidth - >= 1; width of the right column, in characters
        spacer - non-null; spacer string to sit between the two columns
    • Method Detail

      • write

        public void write​(java.lang.String left,
                          java.lang.String right)
                   throws java.io.IOException
        Throws:
        java.io.IOException