class StreamTextArea extends JScrollPane implements Observer {

    /**
     * a serial version id.
     */
    private static final long serialVersionUID = 1302283071087762494L;
    /**
     * The text area with the content stream.
     */
    protected JTextArea text;

    /**
     * Constructs a StreamTextArea.
     */
    public StreamTextArea() {
        super();
        text = new JTextArea();
        setViewportView(text);
    }

    /**
     * @see java.util.Observer#update(java.util.Observable, java.lang.Object)
     */
    public void update(Observable observable, Object obj) {
        text.setText(null);
    }

    /**
     * Renders the content stream of a PdfObject or empties the text area.
     *
     * @param object the object of which the content stream needs to be rendered
     */
    public void render(PdfObject object) {<FILL_FUNCTION_BODY>}

}

        if (object instanceof PRStream) {
            PRStream stream = (PRStream) object;
            try {
                TextAreaOutputStream taos = new TextAreaOutputStream(text);
                taos.write(PdfReader.getStreamBytes(stream));
                //text.addMouseListener(new StreamEditorAction(stream));
            } catch (IOException e) {
                text.setText("The stream could not be read: " + e.getMessage());
            }
        } else {
            update(null, null);
            return;
        }
        text.repaint();
        repaint();
    
<methods>public void <init>() ,public void <init>(java.awt.Component) ,public void <init>(int, int) ,public void <init>(java.awt.Component, int, int) ,public javax.swing.JScrollBar createHorizontalScrollBar() ,public javax.swing.JScrollBar createVerticalScrollBar() ,public javax.accessibility.AccessibleContext getAccessibleContext() ,public javax.swing.JViewport getColumnHeader() ,public java.awt.Component getCorner(java.lang.String) ,public javax.swing.JScrollBar getHorizontalScrollBar() ,public int getHorizontalScrollBarPolicy() ,public javax.swing.JViewport getRowHeader() ,public javax.swing.plaf.ScrollPaneUI getUI() ,public java.lang.String getUIClassID() ,public javax.swing.JScrollBar getVerticalScrollBar() ,public int getVerticalScrollBarPolicy() ,public javax.swing.JViewport getViewport() ,public javax.swing.border.Border getViewportBorder() ,public java.awt.Rectangle getViewportBorderBounds() ,public boolean isValidateRoot() ,public boolean isWheelScrollingEnabled() ,public void setColumnHeader(javax.swing.JViewport) ,public void setColumnHeaderView(java.awt.Component) ,public void setComponentOrientation(java.awt.ComponentOrientation) ,public void setCorner(java.lang.String, java.awt.Component) ,public void setHorizontalScrollBar(javax.swing.JScrollBar) ,public void setHorizontalScrollBarPolicy(int) ,public void setLayout(java.awt.LayoutManager) ,public void setRowHeader(javax.swing.JViewport) ,public void setRowHeaderView(java.awt.Component) ,public void setUI(javax.swing.plaf.ScrollPaneUI) ,public void setVerticalScrollBar(javax.swing.JScrollBar) ,public void setVerticalScrollBarPolicy(int) ,public void setViewport(javax.swing.JViewport) ,public void setViewportBorder(javax.swing.border.Border) ,public void setViewportView(java.awt.Component) ,public void setWheelScrollingEnabled(boolean) ,public void updateUI() <variables>protected javax.swing.JViewport columnHeader,protected javax.swing.JScrollBar horizontalScrollBar,protected int horizontalScrollBarPolicy,protected java.awt.Component lowerLeft,protected java.awt.Component lowerRight,protected javax.swing.JViewport rowHeader,private static final java.lang.String uiClassID,protected java.awt.Component upperLeft,protected java.awt.Component upperRight,protected javax.swing.JScrollBar verticalScrollBar,protected int verticalScrollBarPolicy,protected javax.swing.JViewport viewport,private javax.swing.border.Border viewportBorder,private boolean wheelScrollState