DynamicJava Javadoc: Class JTextComponentOutputStream

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## koala.dynamicjava.gui
Class JTextComponentOutputStream

    java.lang.Object
      |
      +--java.io.OutputStream
            |
            +--koala.dynamicjava.gui.JTextComponentOutputStream

public class JTextComponentOutputStream
extends java.io.OutputStream

An output stream that writes to a swing JTextComponent

Field Summary
`protected javax.swing.text.JTextComponent` | `textComponent` The text component to write to

Constructor Summary
`JTextComponentOutputStream(javax.swing.text.JTextComponent tc)` Creates a new output stream

Method Summary
`void` | `write(byte[] b, int off, int len)` Writes `len` bytes from the specified byte array starting at offset `off` to this output stream.
`void` | `write(int b)` Writes the specified byte to this output stream.

Methods inherited from class java.io.OutputStream
`close, flush, write`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### textComponent

    protected javax.swing.text.JTextComponent textComponent

  The text component to write to

Constructor Detail

### JTextComponentOutputStream

    public JTextComponentOutputStream(javax.swing.text.JTextComponent tc)

  Creates a new output stream
  Parameters:
    `tc` - the text component that will receive the output

Method Detail

### write

    public void write(int b)
               throws java.io.IOException

  Writes the specified byte to this output stream.

  Subclasses of `OutputStream` must provide an implementation for this method.

  Overrides:
    `write` in class `java.io.OutputStream`
  Parameters:
    `b` - the `byte`.
  Throws:
    `java.io.IOException` - if an I/O error occurs.
  Since:
    JDK1.0

### write

    public void write(byte[] b,
                      int off,
                      int len)
               throws java.io.IOException

  Writes `len` bytes from the specified byte array starting at offset `off` to this output stream.

  The `write` method of `OutputStream` calls the write method of one argument on each of the bytes to be written out. Subclasses are encouraged to override this method and provide a more efficient implementation.

  Overrides:
    `write` in class `java.io.OutputStream`
  Parameters:
    `b` - the data.
    `off` - the start offset in the data.
    `len` - the number of bytes to write.
  Throws:
    `java.io.IOException` - if an I/O error occurs.
  Since:
    JDK1.0

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001 Stephane Hillion. All Rights Reserved.