(************** Content-type: application/mathematica **************

                    Mathematica-Compatible Notebook

This notebook can be used with any Mathematica-compatible
application, such as Mathematica, MathReader or Publicon. The data
for the notebook starts with the line containing stars above.

To get the notebook into a Mathematica-compatible application, do
one of the following:

* Save the data starting with the line of stars above into a file
  with a name ending in .nb, then open the file inside the
  application;

* Copy the data starting with the line of stars above to the
  clipboard, then use the Paste menu command inside the application.

Data for notebooks contains only printable 7-bit ASCII and can be
sent directly in email or through ftp in text mode.  Newlines can be
CR, LF or CRLF (Unix, Macintosh or MS-DOS style).

NOTE: If you modify the data for this notebook not in a Mathematica-
compatible application, you must delete the line below containing
the word CacheID, otherwise Mathematica-compatible applications may
try to use invalid cache data.

For more information on notebooks and Mathematica-compatible 
applications, contact Wolfram Research:
  web: http://www.wolfram.com
  email: info@wolfram.com
  phone: +1-217-398-0700 (U.S.)

Notebook reader applications are available free of charge from 
Wolfram Research.
*******************************************************************)

(*CacheID: 232*)


(*NotebookFileLineBreakTest
NotebookFileLineBreakTest*)
(*NotebookOptionsPosition[      3613,         94]*)
(*NotebookOutlinePosition[      4399,        118]*)
(*  CellTagsIndexPosition[      4355,        114]*)
(*WindowFrame->Normal*)



Notebook[{

Cell[CellGroupData[{
Cell["SimpleProgressMonitorInputStream", "Title"],

Cell["Junzo SATO", "Subtitle"],

Cell["Copyright \[Copyright] 2000-2001, Junzo SATO. All rights reserved.", \
"Text",
  TextAlignment->Right],

Cell[BoxData[
    \(Needs["\<JLinkProgramming`JavaSwing`JavaSwing`\>"]\)], "Input"],

Cell[BoxData[{
    \(\(\(Remove[SimpleProgressMonitorInputStream];\)\(\[IndentingNewLine]\)
    \)\), "\[IndentingNewLine]", 
    \(SimpleProgressMonitorInputStream[parent_:  Null, path_:  Null] := 
      JavaBlock[
        Module[\[IndentingNewLine]{progress, file, inputStream, monitor, 
            curByte}, \[IndentingNewLine]InstallJava[]; \
\[IndentingNewLine]file = 
            JavaNew["\<java.io.File\>", 
              path]; \[IndentingNewLine]inputStream = 
            JavaNew["\<java.io.FileInputStream\>", 
              file]; \[IndentingNewLine]progress = 
            JavaNew["\<javax.swing.ProgressMonitorInputStream\>", \
\[IndentingNewLine]parent, \[IndentingNewLine]JavaNew["\<java.lang.String\>", \
"\<Reading file...\>"], \[IndentingNewLine]inputStream\[IndentingNewLine]]; \
\[IndentingNewLine]monitor = 
            progress@getProgressMonitor[]; \[IndentingNewLine]monitor@
            setMillisToDecideToPopup[0]; \[IndentingNewLine]monitor@
            setMillisToPopup[
              0]; \[IndentingNewLine]\[IndentingNewLine]curByte = 
            0; \[IndentingNewLine]While[\((curByte = 
                  progress@
                    read[])\) =!= \(-1\)\ , \[IndentingNewLine]SleepThread[
              0]; \[IndentingNewLine]If[
              monitor@isCanceled[], \[IndentingNewLine]progress@
                close[]; \[IndentingNewLine]Break[]\[IndentingNewLine]];\
\[IndentingNewLine]]; \[IndentingNewLine]progress@
            close[]; \[IndentingNewLine]ReleaseObject[
            progress];\[IndentingNewLine]]\[IndentingNewLine]]\)}], "Input"]
}, Open  ]]
},
FrontEndVersion->"4.1 for Microsoft Windows",
ScreenRectangle->{{0, 1024}, {0, 695}},
WindowSize->{964, 633},
WindowMargins->{{0, Automatic}, {Automatic, 1}},
StyleDefinitions -> FrontEnd`FileName[{ParentDirectory[], "FrontEnd", \
"StyleSheets"}, "JavaSwingStyle.nb", CharacterEncoding -> "ShiftJIS"]
]

(*******************************************************************
Cached data follows.  If you edit this Notebook file directly, not
using Mathematica, you must remove the line containing CacheID at
the top of  the file.  The cache data will then be recreated when
you save this file from within Mathematica.
*******************************************************************)

(*CellTagsOutline
CellTagsIndex->{}
*)

(*CellTagsIndex
CellTagsIndex->{}
*)

(*NotebookFileOutline
Notebook[{

Cell[CellGroupData[{
Cell[1727, 52, 49, 0, 76, "Title"],
Cell[1779, 54, 30, 0, 41, "Subtitle"],
Cell[1812, 56, 108, 2, 29, "Text"],
Cell[1923, 60, 83, 1, 22, "Input"],
Cell[2009, 63, 1588, 28, 562, "Input"]
}, Open  ]]
}
]
*)



(*******************************************************************
End of Mathematica Notebook file.
*******************************************************************)

