<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi All,<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>I have come across an issue with jCIFS.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>I use it to copy files from many remote PCs to a central server. Some of the PCs may be off so I drop the timeouts down a bit and run the process on a number of threads to maintain throughput. Unfortunately, on a regular basis, the whole tool falls apart leaving half-copied files all over the place.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>jcifs.smb.SmbException: Transport1 timedout waiting for response to SmbComNTCreateAndX[command=SMB_COM_NT_CREATE_ANDX,received=false,errorCode=0,flags=0x0018,flags2=0xC803,signSeq=0,tid=26631,pid=37999,uid=16385,mid=26766,wordCount=24,byteCount=75,andxCommand=0xFF,andxOffset=0,flags=0x00,rootDirectoryFid=0,desiredAccess=0x0089,allocationSize=0,extFileAttributes=0x0080,shareAccess=0x0007,createDisposition=0x0001,createOptions=0x00000040,impersonationLevel=0x0002,securityFlags=0x03,name=...]<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>I have narrowed the issue down to a combination of two factors, the number of threads I use and the time between transfer requests.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>The following test class demonstrates the issue. Test1 succeeds while test2 collapses in a heap on about the 20<sup>th</sup> file. Can you help? Is this a bug or am I abusing the system? If this is abuse, what &#8220;reasonable&#8221; limits should I stick to?<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Testing against jCIFS 1.3.15. Server=W7 Client=XP.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Paul<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>[code]<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>package</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> jcifs</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>smb</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>import</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> java</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>io</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>File</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>import</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> java</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>io</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>FileOutputStream</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>import</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> java</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>io</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>IOException</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>import</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> java</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>io</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>InputStream</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>import</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> java</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>io</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>OutputStream</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>import</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> java</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>net</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>MalformedURLException</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>import</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> java</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>util</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>concurrent</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>ArrayBlockingQueue</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>import</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> java</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>util</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>concurrent</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>BlockingQueue</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:teal;background:white;mso-highlight:white'>/**<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:teal;background:white;mso-highlight:white'> *<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:teal;background:white;mso-highlight:white'> * <b>@author</b> <o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:teal;background:white;mso-highlight:white'>&nbsp;*/</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>public</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>class</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> TestSMBPull </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:green;background:white;mso-highlight:white'>// Tests SMB pulling.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:green;background:white;mso-highlight:white'>// Unit to pull from. Can be an i/p or resolvable name.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>static</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>final</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> String PULL_FROM </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;PaulsPC&quot;</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:green;background:white;mso-highlight:white'>// Name of file to pull.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>static</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>final</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> String FILE_NAME_TO_PULL </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;TestFile.xml&quot;</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:green;background:white;mso-highlight:white'>// Where it is.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>static</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>final</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> String FOLDER_TO_PULL_FROM </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;C$/Temp&quot;</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:green;background:white;mso-highlight:white'>// The full thing.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>static</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>final</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> String URL </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;smb://&quot;</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>+</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> PULL_FROM </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>+</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;/&quot;</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>+</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> FOLDER_TO_PULL_FROM </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>+</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;/&quot;</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>+</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> FILE_NAME_TO_PULL</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>private</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>static</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>class</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> Puller </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>implements</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> Runnable </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:green;background:white;mso-highlight:white'>// My number.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>private</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>final</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>int</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> n</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:green;background:white;mso-highlight:white'>// My queue.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>private</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>final</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> BlockingQueue</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&lt;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>Puller</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&gt;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> queue</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>public</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> Puller</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>int</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> n</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>,</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> BlockingQueue</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&lt;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>Puller</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&gt;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> queue</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>)</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>this</span></b><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>n </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> n</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>this</span></b><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>queue </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> queue</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>public</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>void</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> go</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>()</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:green;background:white;mso-highlight:white'>// Use the queue to limit the number of pullers running at any one time.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>while</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(!</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>queue</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>offer</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>this</span></b><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>))</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>try</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thread</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>sleep</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:#FF8000;background:white;mso-highlight:white'>10</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>);</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>catch</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>InterruptedException ex</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>)</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:green;background:white;mso-highlight:white'>// Start my thread running.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thread t </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>new</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> Thread</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>this</span></b><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>,</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;Puller &quot;</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>+</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> n</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>);</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:green;background:white;mso-highlight:white'>// Run me in a thread.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>start</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>();</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>public</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>void</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> run</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>()</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String result </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;Failed&quot;</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>try</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SmbFile f </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>new</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> SmbFile</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>URL</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>);</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>if</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>f</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>exists</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>())</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:green;background:white;mso-highlight:white'>// Build the name of the target file.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String pullName </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> FILE_NAME_TO_PULL </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>+</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;_&quot;</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>+</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> n</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; File pullTo </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>new</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> File</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>pullName</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>);</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:green;background:white;mso-highlight:white'>// Pull it.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; transfer</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>f</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>getInputStream</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(),</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>new</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> FileOutputStream</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>pullTo</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>));</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; result </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;Success!&quot;</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>else</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; result </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;Doesn't exist.&quot;</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>catch</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>MalformedURLException ex</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>)</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; result </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;Failed (MalformedURLException): &quot;</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>+</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> ex</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>toString</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>()</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>+</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot; URL: &quot;</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>+</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> URL</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>catch</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>SmbException ex</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>)</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; result </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;Failed (SmbException): &quot;</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>+</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> ex</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>toString</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>()</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>+</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot; URL: &quot;</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>+</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> URL</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>catch</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>IOException ex</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>)</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; result </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;Failed (IOException): &quot;</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>+</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> ex</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>toString</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>()</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>+</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot; URL: &quot;</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>+</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> URL</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>catch</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>Exception ex</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>)</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; result </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;Failed (Exception): &quot;</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>+</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> ex</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>toString</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>()</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>+</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot; URL: &quot;</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>+</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> URL</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>finally</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:green;background:white;mso-highlight:white'>// Remove me from the queue.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; queue</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>remove</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>this</span></b><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>);</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>out</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>println</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;Result: &quot;</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>+</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> n </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>+</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot; was \&quot;&quot;</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>+</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> result </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>+</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;\&quot;&quot;</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>);</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>public</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>static</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>void</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> transfer</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>final</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> InputStream from</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>,</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>final</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> OutputStream to</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>)</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>throws</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> IOException </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>final</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>byte</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>[]</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> buffer </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>new</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>byte</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>[</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:#FF8000;background:white;mso-highlight:white'>1024</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>];</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>int</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> len</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>while</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>((</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>len </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> from</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>read</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>buffer</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>))</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&gt;=</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF8000;background:white;mso-highlight:white'>0</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>)</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>write</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>buffer</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>,</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF8000;background:white;mso-highlight:white'>0</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>,</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> len</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>);</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>private</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>static</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>void</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> drainQueue</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>BlockingQueue</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&lt;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>Puller</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&gt;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> queue</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>)</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:green;background:white;mso-highlight:white'>// Wait for the queue to empty.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>while</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>!</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>queue</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>isEmpty</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>()</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>)</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>try</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thread</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>sleep</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:#FF8000;background:white;mso-highlight:white'>100</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>);</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>catch</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>InterruptedException ex</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>)</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>private</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>static</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>void</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> test</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>BlockingQueue</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&lt;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>Puller</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&gt;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> queue</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>,</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>int</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> howMany</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>)</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:green;background:white;mso-highlight:white'>// Delay between each creatrion of a puller. Starts slowly but accelerates.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:green;background:white;mso-highlight:white'>// ## Things go bang when delay hits zero and there are lots of threads.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>int</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> delay </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF8000;background:white;mso-highlight:white'>100</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:green;background:white;mso-highlight:white'>// Test by pulling 1,000 files using a fixed maximum number of threads.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>for</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>int</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> i </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF8000;background:white;mso-highlight:white'>0</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> i </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&lt;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> howMany</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> i</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>++)</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Puller p </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>=</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>new</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> Puller</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>i</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>,</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> queue</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>);</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>go</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>();</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:green;background:white;mso-highlight:white'>// Start a bit slowly.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>if</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>delay </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&gt;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF8000;background:white;mso-highlight:white'>0</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>)</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>try</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thread</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>sleep</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>delay</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>);</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>catch</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>InterruptedException ex</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>)</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; delay </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>-=</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF8000;background:white;mso-highlight:white'>5</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drainQueue</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>queue</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>);</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>private</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>static</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>void</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> test1</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>()</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>out</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>println</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;Test1:\n------&quot;</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>);</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:green;background:white;mso-highlight:white'>// Allow for not too many of threads. Works fine so not many files.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; test </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>new</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> ArrayBlockingQueue</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&lt;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>Puller</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&gt;(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:#FF8000;background:white;mso-highlight:white'>20</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>),</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF8000;background:white;mso-highlight:white'>1000</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>);</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>private</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>static</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>void</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> test2</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>()</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>out</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>println</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;Test2:\n------&quot;</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>);</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:green;background:white;mso-highlight:white'>// Allow for lots of threads. Fails so lots of files for max chance.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; test </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><b><span style='font-size:10.0pt;font-family:"Courier New";color:blue;background:white;mso-highlight:white'>new</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> ArrayBlockingQueue</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&lt;</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>Puller</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>&gt;(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:#FF8000;background:white;mso-highlight:white'>100</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>),</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF8000;background:white;mso-highlight:white'>10000</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>);</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>public</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>static</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:#8000FF;background:white;mso-highlight:white'>void</span><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> main</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>String</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>[]</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> args</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>)</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>{</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; jcifs</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>Config</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>setProperty</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;jcifs.smb.client.responseTimeout&quot;</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>,</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;5000&quot;</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>);</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; jcifs</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>Config</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>setProperty</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;jcifs.smb.client.soTimeout&quot;</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>,</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;30000&quot;</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>);</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; jcifs</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>Config</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>setProperty</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;jcifs.smb.client.username&quot;</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>,</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;Administrator&quot;</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>);</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; jcifs</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>Config</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>.</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>setProperty</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>(</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;jcifs.smb.client.password&quot;</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>,</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:gray;background:white;mso-highlight:white'>&quot;***&quot;</span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>);</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; test1 </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>();</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; test2 </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>();</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'>&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;font-family:"Courier New";color:navy;background:white;mso-highlight:white'>}</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p></o:p></span></p><p class=MsoNormal>[/code]<o:p></o:p></p></div>This email is from Sanderson Group plc or a subsidiary of Sanderson Group plc ('the company') and is for the personal use of the intended recipient(s). The email and any files transmitted with it are confidential to the intended recipient(s) and may be legally privileged or contain proprietary and private information. If you are not an intended recipient, you may not review, copy or distribute this message. If received in error, please notify the sender and delete the message from your system
Any views or opinions expressed in this email and any files transmitted with it are those of the author only and may not necessarily reflect the views of the company. Unless otherwise pre-agreed by exchange of hard copy documents signed by duly authorised representatives, contracts may not be concluded on behalf of the company by email.

Please note that neither the company nor the sender accepts any responsibility for any viruses and it is your responsibility to scan the email and any attachments. All email received and sent by the company may be monitored to protect its business interests. 

Members of Sanderson Group plc:
Sanderson Group plc: Registered in England, Registered No. 04968444
Sanderson Limited: Registered in England, Registered No. 03743507
Sanderson Multi-Channel Solutions Limited: Registered in England, Registered No. 05684599
Sanderson Australia Pty Ltd  ACN: 001 723 039 
Registered Office for all aforementioned companies: Sanderson House, Manor Road, Coventry, CV1 2GF
Sanderson RBS Limited: Registered in England, Registered No. 02306403
Registered Office: 24-26 Vincent Avenue, Crownhill, Milton Keynes, MK8 0AB
</body></html>