Class JPanelMousePlotter

  • All Implemented Interfaces:
    com.sun.j3d.utils.behaviors.mouse.MouseBehaviorCallback, java.awt.event.ActionListener, java.awt.event.FocusListener, java.awt.event.ItemListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.ChangeListener

    public class JPanelMousePlotter
    extends JPanelRendererJ3D
    implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener, javax.swing.event.ChangeListener, com.sun.j3d.utils.behaviors.mouse.MouseBehaviorCallback
    Mouse recorded dialog. Has the ability to load and save "mouse action files", which contain the information necessary to reconstruct a series of mouse actions that took place on the canvas of the Triplanar/Surface render viewer. The user can also record mouse actions, pause, stop, and play back. Play back can be done one step at a time, for the whole list, or continuously until the stop button is hit. The mouse events show up in a list. The user can also add or remove different views to this list, by pressing the "Add current" button when at a view he/she wants to save. When the "Save file" menu option is chosen, everything in the list is saved, including the different views.
    Author:
    Neva Cherniavsky
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      (package private) class  JPanelMousePlotter.ChangeNameDialog
      Change the name of the selected item in the item list.
      (package private) class  JPanelMousePlotter.PlayMouse
      Thread that plays.
      (package private) class  JPanelMousePlotter.RecordMouse
      Thread that records screen capture.
      • Nested classes/interfaces inherited from class javax.swing.JPanel

        javax.swing.JPanel.AccessibleJPanel
      • Nested classes/interfaces inherited from class javax.swing.JComponent

        javax.swing.JComponent.AccessibleJComponent
      • Nested classes/interfaces inherited from class java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) boolean changedMode
      flag to indicate current mode being changed.
      (package private) javax.swing.JToggleButton contButton
      Continue play button.
      (package private) int current
      index to the item list.
      (package private) MouseEventVectorPlotter currentEventVector
      Current event vector used by the save AVI.
      (package private) java.lang.Object currentObject
      current SceneState object being recorded by SaveAVI.
      (package private) javax.media.j3d.Transform3D currentTransform
      Current transform3D object used in Save AVI.
      (package private) java.util.Vector<MouseEventVectorPlotter> events
      Vector that holds mouse or change events.
      (package private) MouseEventVectorPlotter eventVector
      Global mouse event vector.
      (package private) boolean first
      Flag to indicate first event.
      (package private) javax.swing.JButton goButton
      Go to button.
      (package private) boolean isPlaying
      Flag to indicating play mouse is running or not.
      (package private) javax.swing.DefaultListModel listModel
      List to record info for each mouse, change events.
      private float mjpegQuality
      DOCUMENT ME!
      (package private) int mode
      Current mode, init to stop.
      (package private) int mouseCount
      Mouse event counter.
      (package private) javax.swing.JButton movieButton
      Save AVI button .
      (package private) SurfacePlotter myParentPlotter
      Reference to ViewJFrameSurfacePlotter.
      (package private) MouseEventVectorPlotter nameChangeVector
      Used by name change dialog to change name of the selected item.
      (package private) javax.swing.JButton newButton
      This button add at head of the list.
      (package private) RenderViewBase parentScene
      Parent scene.
      static int PAUSE_MODE
      Recorder/Player is paused.
      (package private) javax.swing.JToggleButton pauseButton
      Pause button.
      static int PLAY_MODE
      Recorder/Player is playing.
      (package private) javax.swing.JToggleButton playButton
      Display button.
      (package private) JPanelMousePlotter.PlayMouse playMouse
      Reference to PlayMouse class object.
      (package private) int process
      Process id used by the save AVI.
      static int RECORD_MODE
      Recorder/Player is recording.
      (package private) javax.swing.JToggleButton recordButton
      Recorder button.
      (package private) JPanelMousePlotter.RecordMouse recorderToAVI
      Reference to RecordMouse object class.
      (package private) javax.swing.JButton removeAllButton
      Remove all items in the item list.
      (package private) javax.swing.JButton removeButton
      Remove the selected item in the item list.
      (package private) javax.media.j3d.Transform3D resetTransform
      Current transform3D object.
      private static long serialVersionUID
      Use serialVersionUID for interoperability.
      private boolean setMouseVectorFlag
      flag to indicate the first time mouse tranform event happpened.
      (package private) int sliderCount
      Slider moves event counter.
      (package private) javax.swing.JToggleButton stepButton
      Next step button.
      static int STOP_MODE
      Recorder/Player is stopped.
      (package private) javax.swing.JToggleButton stopButton
      Stop button.
      (package private) javax.swing.JToolBar toolBar
      Tool bar of the mouse recorder.
      (package private) boolean transformChange
      DOCUMENT ME!
      (package private) javax.swing.JList viewList
      View list of the mouse recorder display list.
      • Fields inherited from class javax.swing.JComponent

        listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
      • Fields inherited from class java.awt.Component

        accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
      • Fields inherited from interface java.awt.image.ImageObserver

        ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
      • Fields inherited from interface com.sun.j3d.utils.behaviors.mouse.MouseBehaviorCallback

        ROTATE, TRANSLATE, ZOOM
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent event)
      Performs various actions depending on which event triggered this method.
      private void buildMenu()
      Builds menu with load, save, and exit options.
      private javax.swing.JToolBar buildToolBar()
      Builds the toolbar for the mouse recorder.
      void dispose()
      Dispose memory.
      protected void finalize()
      Calls dispose.
      javax.swing.JPanel getMainPanel()
      DOCUMENT ME!
      private void init()
      Initializes GUI components.
      private void load()
      Loads the mouse actions as an object file.
      void mouseClicked​(java.awt.event.MouseEvent event)
      Unchanged.
      void mouseDragged​(java.awt.event.MouseEvent event)
      If recording, adds this mouse event to the mouseEvents vector found at location current.
      void mouseEntered​(java.awt.event.MouseEvent event)
      Unchanged.
      void mouseExited​(java.awt.event.MouseEvent event)
      Unchanged.
      void mouseMoved​(java.awt.event.MouseEvent event)
      Unchanged.
      void mousePressed​(java.awt.event.MouseEvent event)
      If mode is RECORD_MODE, saves the current view and creates a new MouseEventVectorPlotter.
      void mouseReleased​(java.awt.event.MouseEvent event)
      If recording, adds this mouse event to the mouseEvents vector found at location current.
      private void play​(boolean selectedToEnd, boolean forever)
      If there is no other thread running, starts a new thread to play the mouse events.
      void removeAllItems()
      Removes all the items on the recording list.
      private void save()
      Saves the mouse actions as an object file.
      void setup()
      Sets up variables for recorder.
      void setVisible​(boolean status)
      Makes the dialog visible next to the parent frame.
      void stateChanged​(javax.swing.event.ChangeEvent e)
      Sets how the image plane should be displayed depending on value of slider.
      void transformChanged​(int type, javax.media.j3d.Transform3D transform)
      Accessor that lets the dialog know that the canvas transform has changed.
      void windowClosing​(java.awt.event.WindowEvent e)
      Accessor that closing the mouse recorder window frame.
      • Methods inherited from class javax.swing.JPanel

        getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
      • Methods inherited from class javax.swing.JComponent

        addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
      • Methods inherited from class java.awt.Container

        add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
      • Methods inherited from class java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.awt.event.FocusListener

        focusGained, focusLost
      • Methods inherited from interface java.awt.event.ItemListener

        itemStateChanged
      • Methods inherited from interface java.awt.event.KeyListener

        keyPressed, keyReleased, keyTyped
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Use serialVersionUID for interoperability.
        See Also:
        Constant Field Values
      • STOP_MODE

        public static final int STOP_MODE
        Recorder/Player is stopped.
        See Also:
        Constant Field Values
      • RECORD_MODE

        public static final int RECORD_MODE
        Recorder/Player is recording.
        See Also:
        Constant Field Values
      • PAUSE_MODE

        public static final int PAUSE_MODE
        Recorder/Player is paused.
        See Also:
        Constant Field Values
      • PLAY_MODE

        public static final int PLAY_MODE
        Recorder/Player is playing.
        See Also:
        Constant Field Values
      • changedMode

        boolean changedMode
        flag to indicate current mode being changed.
      • contButton

        javax.swing.JToggleButton contButton
        Continue play button.
      • current

        int current
        index to the item list.
      • currentObject

        java.lang.Object currentObject
        current SceneState object being recorded by SaveAVI.
      • currentTransform

        javax.media.j3d.Transform3D currentTransform
        Current transform3D object used in Save AVI.
      • first

        boolean first
        Flag to indicate first event.
      • goButton

        javax.swing.JButton goButton
        Go to button.
      • isPlaying

        boolean isPlaying
        Flag to indicating play mouse is running or not.
      • listModel

        javax.swing.DefaultListModel listModel
        List to record info for each mouse, change events.
      • mode

        int mode
        Current mode, init to stop.
      • mouseCount

        int mouseCount
        Mouse event counter.
      • movieButton

        javax.swing.JButton movieButton
        Save AVI button .
      • myParentPlotter

        SurfacePlotter myParentPlotter
        Reference to ViewJFrameSurfacePlotter.
      • nameChangeVector

        MouseEventVectorPlotter nameChangeVector
        Used by name change dialog to change name of the selected item.
      • newButton

        javax.swing.JButton newButton
        This button add at head of the list.
      • pauseButton

        javax.swing.JToggleButton pauseButton
        Pause button.
      • playButton

        javax.swing.JToggleButton playButton
        Display button.
      • process

        int process
        Process id used by the save AVI.
      • recordButton

        javax.swing.JToggleButton recordButton
        Recorder button.
      • removeAllButton

        javax.swing.JButton removeAllButton
        Remove all items in the item list.
      • removeButton

        javax.swing.JButton removeButton
        Remove the selected item in the item list.
      • resetTransform

        javax.media.j3d.Transform3D resetTransform
        Current transform3D object.
      • sliderCount

        int sliderCount
        Slider moves event counter.
      • stepButton

        javax.swing.JToggleButton stepButton
        Next step button.
      • stopButton

        javax.swing.JToggleButton stopButton
        Stop button.
      • toolBar

        javax.swing.JToolBar toolBar
        Tool bar of the mouse recorder.
      • transformChange

        boolean transformChange
        DOCUMENT ME!
      • viewList

        javax.swing.JList viewList
        View list of the mouse recorder display list.
      • mjpegQuality

        private float mjpegQuality
        DOCUMENT ME!
      • setMouseVectorFlag

        private boolean setMouseVectorFlag
        flag to indicate the first time mouse tranform event happpened.
    • Constructor Detail

      • JPanelMousePlotter

        public JPanelMousePlotter​(RenderViewBase parent)
        Constructs a new mouse recorder dialog. Makes the GUI components and ties them to the parent scene.
        Parameters:
        parent - Parent scene to tie actions to.
    • Method Detail

      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent event)
        Performs various actions depending on which event triggered this method.

        Playback toolbar buttons:

        • Record button - changes the mode to RECORD_MODE.
        • Play button - changes the mode to PLAY_MODE and calls play(boolean, boolean), which plays all the mouse events started at the selected one in a separate thread.
        • Play once button - changes the mode to PLAY_MODE and calls play(boolean, boolean), which plays one mouse event (the selected mouse event) in a separate thread.
        • Play continuously button - changes the mode to PLAY_MODE and calls play(boolean, boolean), which plays all the mouse events started at the selected one in a separate thread, until the stop button or pause button is pressed.
        • Pause button - changes the mode to PAUSE_MODE and causes the thread running in play(boolean, boolean) to sleep.
        • Stop button - changes the mode to STOP_MODE and causes play(boolean, boolean) to return.
        List buttons:
        • Add current - brings up a dialog asking the user for a name for the view, then adds it to the list and the vector.
        • Go - goes to the view associated with the name selected in the list.
        • Remove - removes the view associated with the name selected in the list. Disables playback if there are no views left in the list.
        Menu events:
        • Load mouse file - loads in an object file previously saved with the "Save mouse file" command. Displays the views in the list.
        • Save mouse file - uses the serialized writeObject method to save the vector of views/mouse events to a file.
        • Exit - disposes of this dialog.
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
        Specified by:
        actionPerformed in class JPanelRendererBase
        Parameters:
        event - Event that triggered this method.
      • dispose

        public void dispose()
        Dispose memory.
      • mouseClicked

        public void mouseClicked​(java.awt.event.MouseEvent event)
        Unchanged.
        Specified by:
        mouseClicked in interface java.awt.event.MouseListener
        Parameters:
        event - Original mouse event.
      • mouseDragged

        public void mouseDragged​(java.awt.event.MouseEvent event)
        If recording, adds this mouse event to the mouseEvents vector found at location current.
        Specified by:
        mouseDragged in interface java.awt.event.MouseMotionListener
        Parameters:
        event - Original mouse event.
      • mouseEntered

        public void mouseEntered​(java.awt.event.MouseEvent event)
        Unchanged.
        Specified by:
        mouseEntered in interface java.awt.event.MouseListener
        Parameters:
        event - Original mouse event.
      • mouseExited

        public void mouseExited​(java.awt.event.MouseEvent event)
        Unchanged.
        Specified by:
        mouseExited in interface java.awt.event.MouseListener
        Parameters:
        event - Original mouse event.
      • mouseMoved

        public void mouseMoved​(java.awt.event.MouseEvent event)
        Unchanged.
        Specified by:
        mouseMoved in interface java.awt.event.MouseMotionListener
        Parameters:
        event - Original mouse event.
      • mousePressed

        public void mousePressed​(java.awt.event.MouseEvent event)
        If mode is RECORD_MODE, saves the current view and creates a new MouseEventVectorPlotter. That object holds the name, the view, and a vector with the subsequent mouse events. This is so the size of the list that the user sees stays small. If all mouse events were displayed in the list, the list would soon reach into the thousands. This way, the user sees only the "beginning" of the mouse event. When playback happens, all the mouse events stored in the vector within MouseEventVectorPlotter are played. For more information, see MouseEventVectorPlotter.
        Specified by:
        mousePressed in interface java.awt.event.MouseListener
        Parameters:
        event - Original mouse event.
      • mouseReleased

        public void mouseReleased​(java.awt.event.MouseEvent event)
        If recording, adds this mouse event to the mouseEvents vector found at location current.
        Specified by:
        mouseReleased in interface java.awt.event.MouseListener
        Parameters:
        event - Original mouse event.
      • removeAllItems

        public void removeAllItems()
        Removes all the items on the recording list.
      • setup

        public void setup()
        Sets up variables for recorder.
      • setVisible

        public void setVisible​(boolean status)
        Makes the dialog visible next to the parent frame. If this makes it go off the screen, puts the dialog in the center of the screen.
        Overrides:
        setVisible in class JPanelRendererBase
        Parameters:
        status - Flag indicating if the dialog should be visible.
      • stateChanged

        public void stateChanged​(javax.swing.event.ChangeEvent e)
        Sets how the image plane should be displayed depending on value of slider.
        Specified by:
        stateChanged in interface javax.swing.event.ChangeListener
        Parameters:
        e - Event that triggered this function.
      • transformChanged

        public void transformChanged​(int type,
                                     javax.media.j3d.Transform3D transform)
        Accessor that lets the dialog know that the canvas transform has changed.
        Specified by:
        transformChanged in interface com.sun.j3d.utils.behaviors.mouse.MouseBehaviorCallback
        Parameters:
        type - DOCUMENT ME!
        transform - DOCUMENT ME!
      • windowClosing

        public void windowClosing​(java.awt.event.WindowEvent e)
        Accessor that closing the mouse recorder window frame.
        Parameters:
        e - DOCUMENT ME!
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Calls dispose.
        Overrides:
        finalize in class JPanelRendererBase
        Throws:
        java.lang.Throwable - DOCUMENT ME!
      • buildMenu

        private void buildMenu()
        Builds menu with load, save, and exit options.
      • buildToolBar

        private javax.swing.JToolBar buildToolBar()
        Builds the toolbar for the mouse recorder.
        Returns:
        DOCUMENT ME!
      • init

        private void init()
        Initializes GUI components.
      • load

        private void load()
                   throws java.io.IOException
        Loads the mouse actions as an object file. Clears out the old list and vector, brings up a dialog for the user to choose a file name and directory, then reads in each MouseEventVectorPlotter and puts it in the events vector (and puts the name in the list).
        Throws:
        java.io.IOException - DOCUMENT ME!
      • play

        private void play​(boolean selectedToEnd,
                          boolean forever)
        If there is no other thread running, starts a new thread to play the mouse events.
        Parameters:
        selectedToEnd - If true, the mouse events are played from the selected one to the end of the list. If false only the selected one is played.
        forever - If true, the mouse events list is played until the stop button or pause button is pressed.
      • save

        private void save()
                   throws java.io.IOException
        Saves the mouse actions as an object file. Brings up a dialog for the user to choose a file name and directory, then writes out the events vector using an ObjectOutputStream.
        Throws:
        java.io.IOException - DOCUMENT ME!