IOUtils.html 366 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!-- NewPage -->
  3. <html lang="de">
  4. <head>
  5. <!-- Generated by javadoc -->
  6. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  7. <title>IOUtils (Apache Commons IO 2.6 API)</title>
  8. <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
  9. <script type="text/javascript" src="../../../../script.js"></script>
  10. </head>
  11. <body>
  12. <script type="text/javascript"><!--
  13. try {
  14. if (location.href.indexOf('is-external=true') == -1) {
  15. parent.document.title="IOUtils (Apache Commons IO 2.6 API)";
  16. }
  17. }
  18. catch(err) {
  19. }
  20. //-->
  21. var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":41,"i10":41,"i11":41,"i12":41,"i13":41,"i14":41,"i15":41,"i16":41,"i17":41,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":41,"i24":9,"i25":9,"i26":41,"i27":9,"i28":9,"i29":9,"i30":9,"i31":9,"i32":9,"i33":9,"i34":9,"i35":9,"i36":9,"i37":9,"i38":9,"i39":9,"i40":9,"i41":9,"i42":9,"i43":9,"i44":9,"i45":9,"i46":9,"i47":9,"i48":9,"i49":9,"i50":9,"i51":9,"i52":41,"i53":9,"i54":9,"i55":9,"i56":9,"i57":9,"i58":9,"i59":9,"i60":9,"i61":9,"i62":9,"i63":9,"i64":9,"i65":9,"i66":9,"i67":9,"i68":9,"i69":9,"i70":9,"i71":9,"i72":9,"i73":9,"i74":9,"i75":41,"i76":9,"i77":9,"i78":41,"i79":9,"i80":9,"i81":9,"i82":41,"i83":9,"i84":9,"i85":9,"i86":41,"i87":9,"i88":9,"i89":41,"i90":9,"i91":9,"i92":41,"i93":9,"i94":41,"i95":9,"i96":9,"i97":9,"i98":41,"i99":9,"i100":9,"i101":41,"i102":9,"i103":9,"i104":9,"i105":41,"i106":9,"i107":9,"i108":41,"i109":9,"i110":9,"i111":9,"i112":41,"i113":9,"i114":9,"i115":9,"i116":41,"i117":41,"i118":41,"i119":41,"i120":9,"i121":9,"i122":9,"i123":9,"i124":9,"i125":41,"i126":9,"i127":9,"i128":9};
  22. var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]};
  23. var altColor = "altColor";
  24. var rowColor = "rowColor";
  25. var tableTab = "tableTab";
  26. var activeTableTab = "activeTableTab";
  27. </script>
  28. <noscript>
  29. <div>JavaScript is disabled on your browser.</div>
  30. </noscript>
  31. <!-- ========= START OF TOP NAVBAR ======= -->
  32. <div class="topNav"><a name="navbar.top">
  33. <!-- -->
  34. </a>
  35. <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
  36. <a name="navbar.top.firstrow">
  37. <!-- -->
  38. </a>
  39. <ul class="navList" title="Navigation">
  40. <li><a href="../../../../overview-summary.html">Overview</a></li>
  41. <li><a href="package-summary.html">Package</a></li>
  42. <li class="navBarCell1Rev">Class</li>
  43. <li><a href="class-use/IOUtils.html">Use</a></li>
  44. <li><a href="package-tree.html">Tree</a></li>
  45. <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
  46. <li><a href="../../../../index-all.html">Index</a></li>
  47. <li><a href="../../../../help-doc.html">Help</a></li>
  48. </ul>
  49. </div>
  50. <div class="subNav">
  51. <ul class="navList">
  52. <li><a href="../../../../org/apache/commons/io/IOExceptionWithCause.html" title="class in org.apache.commons.io"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  53. <li><a href="../../../../org/apache/commons/io/LineIterator.html" title="class in org.apache.commons.io"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  54. </ul>
  55. <ul class="navList">
  56. <li><a href="../../../../index.html?org/apache/commons/io/IOUtils.html" target="_top">Frames</a></li>
  57. <li><a href="IOUtils.html" target="_top">No&nbsp;Frames</a></li>
  58. </ul>
  59. <ul class="navList" id="allclasses_navbar_top">
  60. <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  61. </ul>
  62. <div>
  63. <script type="text/javascript"><!--
  64. allClassesLink = document.getElementById("allclasses_navbar_top");
  65. if(window==top) {
  66. allClassesLink.style.display = "block";
  67. }
  68. else {
  69. allClassesLink.style.display = "none";
  70. }
  71. //-->
  72. </script>
  73. </div>
  74. <div>
  75. <ul class="subNavList">
  76. <li>Summary:&nbsp;</li>
  77. <li>Nested&nbsp;|&nbsp;</li>
  78. <li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
  79. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  80. <li><a href="#method.summary">Method</a></li>
  81. </ul>
  82. <ul class="subNavList">
  83. <li>Detail:&nbsp;</li>
  84. <li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
  85. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  86. <li><a href="#method.detail">Method</a></li>
  87. </ul>
  88. </div>
  89. <a name="skip.navbar.top">
  90. <!-- -->
  91. </a></div>
  92. <!-- ========= END OF TOP NAVBAR ========= -->
  93. <!-- ======== START OF CLASS DATA ======== -->
  94. <div class="header">
  95. <div class="subTitle">org.apache.commons.io</div>
  96. <h2 title="Class IOUtils" class="title">Class IOUtils</h2>
  97. </div>
  98. <div class="contentContainer">
  99. <ul class="inheritance">
  100. <li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
  101. <li>
  102. <ul class="inheritance">
  103. <li>org.apache.commons.io.IOUtils</li>
  104. </ul>
  105. </li>
  106. </ul>
  107. <div class="description">
  108. <ul class="blockList">
  109. <li class="blockList">
  110. <hr>
  111. <br>
  112. <pre>public class <span class="typeNameLabel">IOUtils</span>
  113. extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
  114. <div class="block">General IO stream manipulation utilities.
  115. <p>
  116. This class provides static utility methods for input/output operations.
  117. <ul>
  118. <li><b>[Deprecated]</b> closeQuietly - these methods close a stream ignoring nulls and exceptions
  119. <li>toXxx/read - these methods read data from a stream
  120. <li>write - these methods write data to a stream
  121. <li>copy - these methods copy all the data from one stream to another
  122. <li>contentEquals - these methods compare the content of two streams
  123. </ul>
  124. <p>
  125. The byte-to-char methods and char-to-byte methods involve a conversion step.
  126. Two methods are provided in each case, one that uses the platform default
  127. encoding and the other which allows you to specify an encoding. You are
  128. encouraged to always specify an encoding because relying on the platform
  129. default can lead to unexpected results, for example when moving from
  130. development to production.
  131. <p>
  132. All the methods in this class that read a stream are buffered internally.
  133. This means that there is no cause to use a <code>BufferedInputStream</code>
  134. or <code>BufferedReader</code>. The default buffer size of 4K has been shown
  135. to be efficient in tests.
  136. <p>
  137. The various copy methods all delegate the actual copying to one of the following methods:
  138. <ul>
  139. <li><a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.InputStream-java.io.OutputStream-byte:A-"><code>copyLarge(InputStream, OutputStream, byte[])</code></a></li>
  140. <li><a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.InputStream-java.io.OutputStream-long-long-byte:A-"><code>copyLarge(InputStream, OutputStream, long, long, byte[])</code></a></li>
  141. <li><a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.Reader-java.io.Writer-char:A-"><code>copyLarge(Reader, Writer, char[])</code></a></li>
  142. <li><a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.Reader-java.io.Writer-long-long-char:A-"><code>copyLarge(Reader, Writer, long, long, char[])</code></a></li>
  143. </ul>
  144. For example, <a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.InputStream-java.io.OutputStream-"><code>copy(InputStream, OutputStream)</code></a> calls <a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.InputStream-java.io.OutputStream-"><code>copyLarge(InputStream, OutputStream)</code></a>
  145. which calls <a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.InputStream-java.io.OutputStream-int-"><code>copy(InputStream, OutputStream, int)</code></a> which creates the buffer and calls
  146. <a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.InputStream-java.io.OutputStream-byte:A-"><code>copyLarge(InputStream, OutputStream, byte[])</code></a>.
  147. <p>
  148. Applications can re-use buffers by using the underlying methods directly.
  149. This may improve performance for applications that need to do a lot of copying.
  150. <p>
  151. Wherever possible, the methods in this class do <em>not</em> flush or close
  152. the stream. This is to avoid making non-portable assumptions about the
  153. streams' origin and further use. Thus the caller is still responsible for
  154. closing streams after use.
  155. <p>
  156. Origin of code: Excalibur.</div>
  157. </li>
  158. </ul>
  159. </div>
  160. <div class="summary">
  161. <ul class="blockList">
  162. <li class="blockList">
  163. <!-- =========== FIELD SUMMARY =========== -->
  164. <ul class="blockList">
  165. <li class="blockList"><a name="field.summary">
  166. <!-- -->
  167. </a>
  168. <h3>Field Summary</h3>
  169. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
  170. <caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
  171. <tr>
  172. <th class="colFirst" scope="col">Modifier and Type</th>
  173. <th class="colLast" scope="col">Field and Description</th>
  174. </tr>
  175. <tr class="altColor">
  176. <td class="colFirst"><code>static char</code></td>
  177. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#DIR_SEPARATOR">DIR_SEPARATOR</a></span></code>
  178. <div class="block">The system directory separator character.</div>
  179. </td>
  180. </tr>
  181. <tr class="rowColor">
  182. <td class="colFirst"><code>static char</code></td>
  183. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#DIR_SEPARATOR_UNIX">DIR_SEPARATOR_UNIX</a></span></code>
  184. <div class="block">The Unix directory separator character.</div>
  185. </td>
  186. </tr>
  187. <tr class="altColor">
  188. <td class="colFirst"><code>static char</code></td>
  189. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#DIR_SEPARATOR_WINDOWS">DIR_SEPARATOR_WINDOWS</a></span></code>
  190. <div class="block">The Windows directory separator character.</div>
  191. </td>
  192. </tr>
  193. <tr class="rowColor">
  194. <td class="colFirst"><code>static int</code></td>
  195. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#EOF">EOF</a></span></code>
  196. <div class="block">Represents the end-of-file (or stream).</div>
  197. </td>
  198. </tr>
  199. <tr class="altColor">
  200. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  201. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#LINE_SEPARATOR">LINE_SEPARATOR</a></span></code>
  202. <div class="block">The system line separator string.</div>
  203. </td>
  204. </tr>
  205. <tr class="rowColor">
  206. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  207. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#LINE_SEPARATOR_UNIX">LINE_SEPARATOR_UNIX</a></span></code>
  208. <div class="block">The Unix line separator string.</div>
  209. </td>
  210. </tr>
  211. <tr class="altColor">
  212. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  213. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#LINE_SEPARATOR_WINDOWS">LINE_SEPARATOR_WINDOWS</a></span></code>
  214. <div class="block">The Windows line separator string.</div>
  215. </td>
  216. </tr>
  217. </table>
  218. </li>
  219. </ul>
  220. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  221. <ul class="blockList">
  222. <li class="blockList"><a name="constructor.summary">
  223. <!-- -->
  224. </a>
  225. <h3>Constructor Summary</h3>
  226. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
  227. <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
  228. <tr>
  229. <th class="colOne" scope="col">Constructor and Description</th>
  230. </tr>
  231. <tr class="altColor">
  232. <td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#IOUtils--">IOUtils</a></span>()</code>
  233. <div class="block">Instances should NOT be constructed in standard programming.</div>
  234. </td>
  235. </tr>
  236. </table>
  237. </li>
  238. </ul>
  239. <!-- ========== METHOD SUMMARY =========== -->
  240. <ul class="blockList">
  241. <li class="blockList"><a name="method.summary">
  242. <!-- -->
  243. </a>
  244. <h3>Method Summary</h3>
  245. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  246. <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
  247. <tr>
  248. <th class="colFirst" scope="col">Modifier and Type</th>
  249. <th class="colLast" scope="col">Method and Description</th>
  250. </tr>
  251. <tr id="i0" class="altColor">
  252. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io">BufferedInputStream</a></code></td>
  253. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#buffer-java.io.InputStream-">buffer</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;inputStream)</code>
  254. <div class="block">Returns the given InputStream if it is already a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io"><code>BufferedInputStream</code></a>, otherwise creates a
  255. BufferedInputStream from the given InputStream.</div>
  256. </td>
  257. </tr>
  258. <tr id="i1" class="rowColor">
  259. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io">BufferedInputStream</a></code></td>
  260. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#buffer-java.io.InputStream-int-">buffer</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;inputStream,
  261. int&nbsp;size)</code>
  262. <div class="block">Returns the given InputStream if it is already a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io"><code>BufferedInputStream</code></a>, otherwise creates a
  263. BufferedInputStream from the given InputStream.</div>
  264. </td>
  265. </tr>
  266. <tr id="i2" class="altColor">
  267. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedOutputStream.html?is-external=true" title="class or interface in java.io">BufferedOutputStream</a></code></td>
  268. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#buffer-java.io.OutputStream-">buffer</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;outputStream)</code>
  269. <div class="block">Returns the given OutputStream if it is already a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedOutputStream.html?is-external=true" title="class or interface in java.io"><code>BufferedOutputStream</code></a>, otherwise creates a
  270. BufferedOutputStream from the given OutputStream.</div>
  271. </td>
  272. </tr>
  273. <tr id="i3" class="rowColor">
  274. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedOutputStream.html?is-external=true" title="class or interface in java.io">BufferedOutputStream</a></code></td>
  275. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#buffer-java.io.OutputStream-int-">buffer</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;outputStream,
  276. int&nbsp;size)</code>
  277. <div class="block">Returns the given OutputStream if it is already a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedOutputStream.html?is-external=true" title="class or interface in java.io"><code>BufferedOutputStream</code></a>, otherwise creates a
  278. BufferedOutputStream from the given OutputStream.</div>
  279. </td>
  280. </tr>
  281. <tr id="i4" class="altColor">
  282. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io">BufferedReader</a></code></td>
  283. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#buffer-java.io.Reader-">buffer</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader)</code>
  284. <div class="block">Returns the given reader if it is already a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io"><code>BufferedReader</code></a>, otherwise creates a BufferedReader from
  285. the given reader.</div>
  286. </td>
  287. </tr>
  288. <tr id="i5" class="rowColor">
  289. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io">BufferedReader</a></code></td>
  290. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#buffer-java.io.Reader-int-">buffer</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
  291. int&nbsp;size)</code>
  292. <div class="block">Returns the given reader if it is already a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io"><code>BufferedReader</code></a>, otherwise creates a BufferedReader from the
  293. given reader.</div>
  294. </td>
  295. </tr>
  296. <tr id="i6" class="altColor">
  297. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedWriter.html?is-external=true" title="class or interface in java.io">BufferedWriter</a></code></td>
  298. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#buffer-java.io.Writer-">buffer</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)</code>
  299. <div class="block">Returns the given Writer if it is already a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedWriter.html?is-external=true" title="class or interface in java.io"><code>BufferedWriter</code></a>, otherwise creates a BufferedWriter from the
  300. given Writer.</div>
  301. </td>
  302. </tr>
  303. <tr id="i7" class="rowColor">
  304. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedWriter.html?is-external=true" title="class or interface in java.io">BufferedWriter</a></code></td>
  305. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#buffer-java.io.Writer-int-">buffer</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer,
  306. int&nbsp;size)</code>
  307. <div class="block">Returns the given Writer if it is already a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedWriter.html?is-external=true" title="class or interface in java.io"><code>BufferedWriter</code></a>, otherwise creates a BufferedWriter from the
  308. given Writer.</div>
  309. </td>
  310. </tr>
  311. <tr id="i8" class="altColor">
  312. <td class="colFirst"><code>static void</code></td>
  313. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#close-java.net.URLConnection-">close</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URLConnection.html?is-external=true" title="class or interface in java.net">URLConnection</a>&nbsp;conn)</code>
  314. <div class="block">Closes a URLConnection.</div>
  315. </td>
  316. </tr>
  317. <tr id="i9" class="rowColor">
  318. <td class="colFirst"><code>static void</code></td>
  319. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#closeQuietly-java.io.Closeable...-">closeQuietly</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>...&nbsp;closeables)</code>
  320. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  321. <div class="block"><span class="deprecationComment">As of 2.6 removed without replacement. Please use the try-with-resources statement or handle
  322. suppressed exceptions manually.</span></div>
  323. </div>
  324. </td>
  325. </tr>
  326. <tr id="i10" class="altColor">
  327. <td class="colFirst"><code>static void</code></td>
  328. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#closeQuietly-java.io.Closeable-">closeQuietly</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>&nbsp;closeable)</code>
  329. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  330. <div class="block"><span class="deprecationComment">As of 2.6 removed without replacement. Please use the try-with-resources statement or handle
  331. suppressed exceptions manually.</span></div>
  332. </div>
  333. </td>
  334. </tr>
  335. <tr id="i11" class="rowColor">
  336. <td class="colFirst"><code>static void</code></td>
  337. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#closeQuietly-java.io.InputStream-">closeQuietly</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input)</code>
  338. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  339. <div class="block"><span class="deprecationComment">As of 2.6 removed without replacement. Please use the try-with-resources statement or handle
  340. suppressed exceptions manually.</span></div>
  341. </div>
  342. </td>
  343. </tr>
  344. <tr id="i12" class="altColor">
  345. <td class="colFirst"><code>static void</code></td>
  346. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#closeQuietly-java.io.OutputStream-">closeQuietly</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)</code>
  347. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  348. <div class="block"><span class="deprecationComment">As of 2.6 removed without replacement. Please use the try-with-resources statement or handle
  349. suppressed exceptions manually.</span></div>
  350. </div>
  351. </td>
  352. </tr>
  353. <tr id="i13" class="rowColor">
  354. <td class="colFirst"><code>static void</code></td>
  355. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#closeQuietly-java.io.Reader-">closeQuietly</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input)</code>
  356. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  357. <div class="block"><span class="deprecationComment">As of 2.6 removed without replacement. Please use the try-with-resources statement or handle
  358. suppressed exceptions manually.</span></div>
  359. </div>
  360. </td>
  361. </tr>
  362. <tr id="i14" class="altColor">
  363. <td class="colFirst"><code>static void</code></td>
  364. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#closeQuietly-java.nio.channels.Selector-">closeQuietly</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/channels/Selector.html?is-external=true" title="class or interface in java.nio.channels">Selector</a>&nbsp;selector)</code>
  365. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  366. <div class="block"><span class="deprecationComment">As of 2.6 removed without replacement. Please use the try-with-resources statement or handle
  367. suppressed exceptions manually.</span></div>
  368. </div>
  369. </td>
  370. </tr>
  371. <tr id="i15" class="rowColor">
  372. <td class="colFirst"><code>static void</code></td>
  373. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#closeQuietly-java.net.ServerSocket-">closeQuietly</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/ServerSocket.html?is-external=true" title="class or interface in java.net">ServerSocket</a>&nbsp;sock)</code>
  374. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  375. <div class="block"><span class="deprecationComment">As of 2.6 removed without replacement. Please use the try-with-resources statement or handle
  376. suppressed exceptions manually.</span></div>
  377. </div>
  378. </td>
  379. </tr>
  380. <tr id="i16" class="altColor">
  381. <td class="colFirst"><code>static void</code></td>
  382. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#closeQuietly-java.net.Socket-">closeQuietly</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/Socket.html?is-external=true" title="class or interface in java.net">Socket</a>&nbsp;sock)</code>
  383. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  384. <div class="block"><span class="deprecationComment">As of 2.6 removed without replacement. Please use the try-with-resources statement or handle
  385. suppressed exceptions manually.</span></div>
  386. </div>
  387. </td>
  388. </tr>
  389. <tr id="i17" class="rowColor">
  390. <td class="colFirst"><code>static void</code></td>
  391. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#closeQuietly-java.io.Writer-">closeQuietly</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output)</code>
  392. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  393. <div class="block"><span class="deprecationComment">As of 2.6 removed without replacement. Please use the try-with-resources statement or handle
  394. suppressed exceptions manually.</span></div>
  395. </div>
  396. </td>
  397. </tr>
  398. <tr id="i18" class="altColor">
  399. <td class="colFirst"><code>static boolean</code></td>
  400. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#contentEquals-java.io.InputStream-java.io.InputStream-">contentEquals</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input1,
  401. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input2)</code>
  402. <div class="block">Compares the contents of two Streams to determine if they are equal or
  403. not.</div>
  404. </td>
  405. </tr>
  406. <tr id="i19" class="rowColor">
  407. <td class="colFirst"><code>static boolean</code></td>
  408. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#contentEquals-java.io.Reader-java.io.Reader-">contentEquals</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input1,
  409. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input2)</code>
  410. <div class="block">Compares the contents of two Readers to determine if they are equal or
  411. not.</div>
  412. </td>
  413. </tr>
  414. <tr id="i20" class="altColor">
  415. <td class="colFirst"><code>static boolean</code></td>
  416. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#contentEqualsIgnoreEOL-java.io.Reader-java.io.Reader-">contentEqualsIgnoreEOL</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input1,
  417. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input2)</code>
  418. <div class="block">Compares the contents of two Readers to determine if they are equal or
  419. not, ignoring EOL characters.</div>
  420. </td>
  421. </tr>
  422. <tr id="i21" class="rowColor">
  423. <td class="colFirst"><code>static int</code></td>
  424. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.InputStream-java.io.OutputStream-">copy</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  425. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)</code>
  426. <div class="block">Copies bytes from an <code>InputStream</code> to an
  427. <code>OutputStream</code>.</div>
  428. </td>
  429. </tr>
  430. <tr id="i22" class="altColor">
  431. <td class="colFirst"><code>static long</code></td>
  432. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.InputStream-java.io.OutputStream-int-">copy</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  433. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  434. int&nbsp;bufferSize)</code>
  435. <div class="block">Copies bytes from an <code>InputStream</code> to an <code>OutputStream</code> using an internal buffer of the
  436. given size.</div>
  437. </td>
  438. </tr>
  439. <tr id="i23" class="rowColor">
  440. <td class="colFirst"><code>static void</code></td>
  441. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.InputStream-java.io.Writer-">copy</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  442. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output)</code>
  443. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  444. <div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.InputStream-java.io.Writer-java.nio.charset.Charset-"><code>copy(InputStream, Writer, Charset)</code></a> instead</span></div>
  445. </div>
  446. </td>
  447. </tr>
  448. <tr id="i24" class="altColor">
  449. <td class="colFirst"><code>static void</code></td>
  450. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.InputStream-java.io.Writer-java.nio.charset.Charset-">copy</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  451. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output,
  452. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;inputEncoding)</code>
  453. <div class="block">Copies bytes from an <code>InputStream</code> to chars on a
  454. <code>Writer</code> using the specified character encoding.</div>
  455. </td>
  456. </tr>
  457. <tr id="i25" class="rowColor">
  458. <td class="colFirst"><code>static void</code></td>
  459. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.InputStream-java.io.Writer-java.lang.String-">copy</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  460. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output,
  461. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;inputEncoding)</code>
  462. <div class="block">Copies bytes from an <code>InputStream</code> to chars on a
  463. <code>Writer</code> using the specified character encoding.</div>
  464. </td>
  465. </tr>
  466. <tr id="i26" class="altColor">
  467. <td class="colFirst"><code>static void</code></td>
  468. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.Reader-java.io.OutputStream-">copy</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  469. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)</code>
  470. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  471. <div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.Reader-java.io.OutputStream-java.nio.charset.Charset-"><code>copy(Reader, OutputStream, Charset)</code></a> instead</span></div>
  472. </div>
  473. </td>
  474. </tr>
  475. <tr id="i27" class="rowColor">
  476. <td class="colFirst"><code>static void</code></td>
  477. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.Reader-java.io.OutputStream-java.nio.charset.Charset-">copy</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  478. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  479. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;outputEncoding)</code>
  480. <div class="block">Copies chars from a <code>Reader</code> to bytes on an
  481. <code>OutputStream</code> using the specified character encoding, and
  482. calling flush.</div>
  483. </td>
  484. </tr>
  485. <tr id="i28" class="altColor">
  486. <td class="colFirst"><code>static void</code></td>
  487. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.Reader-java.io.OutputStream-java.lang.String-">copy</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  488. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  489. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;outputEncoding)</code>
  490. <div class="block">Copies chars from a <code>Reader</code> to bytes on an
  491. <code>OutputStream</code> using the specified character encoding, and
  492. calling flush.</div>
  493. </td>
  494. </tr>
  495. <tr id="i29" class="rowColor">
  496. <td class="colFirst"><code>static int</code></td>
  497. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.Reader-java.io.Writer-">copy</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  498. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output)</code>
  499. <div class="block">Copies chars from a <code>Reader</code> to a <code>Writer</code>.</div>
  500. </td>
  501. </tr>
  502. <tr id="i30" class="altColor">
  503. <td class="colFirst"><code>static long</code></td>
  504. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.InputStream-java.io.OutputStream-">copyLarge</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  505. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)</code>
  506. <div class="block">Copies bytes from a large (over 2GB) <code>InputStream</code> to an
  507. <code>OutputStream</code>.</div>
  508. </td>
  509. </tr>
  510. <tr id="i31" class="rowColor">
  511. <td class="colFirst"><code>static long</code></td>
  512. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.InputStream-java.io.OutputStream-byte:A-">copyLarge</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  513. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  514. byte[]&nbsp;buffer)</code>
  515. <div class="block">Copies bytes from a large (over 2GB) <code>InputStream</code> to an
  516. <code>OutputStream</code>.</div>
  517. </td>
  518. </tr>
  519. <tr id="i32" class="altColor">
  520. <td class="colFirst"><code>static long</code></td>
  521. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.InputStream-java.io.OutputStream-long-long-">copyLarge</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  522. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  523. long&nbsp;inputOffset,
  524. long&nbsp;length)</code>
  525. <div class="block">Copies some or all bytes from a large (over 2GB) <code>InputStream</code> to an
  526. <code>OutputStream</code>, optionally skipping input bytes.</div>
  527. </td>
  528. </tr>
  529. <tr id="i33" class="rowColor">
  530. <td class="colFirst"><code>static long</code></td>
  531. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.InputStream-java.io.OutputStream-long-long-byte:A-">copyLarge</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  532. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  533. long&nbsp;inputOffset,
  534. long&nbsp;length,
  535. byte[]&nbsp;buffer)</code>
  536. <div class="block">Copies some or all bytes from a large (over 2GB) <code>InputStream</code> to an
  537. <code>OutputStream</code>, optionally skipping input bytes.</div>
  538. </td>
  539. </tr>
  540. <tr id="i34" class="altColor">
  541. <td class="colFirst"><code>static long</code></td>
  542. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.Reader-java.io.Writer-">copyLarge</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  543. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output)</code>
  544. <div class="block">Copies chars from a large (over 2GB) <code>Reader</code> to a <code>Writer</code>.</div>
  545. </td>
  546. </tr>
  547. <tr id="i35" class="rowColor">
  548. <td class="colFirst"><code>static long</code></td>
  549. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.Reader-java.io.Writer-char:A-">copyLarge</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  550. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output,
  551. char[]&nbsp;buffer)</code>
  552. <div class="block">Copies chars from a large (over 2GB) <code>Reader</code> to a <code>Writer</code>.</div>
  553. </td>
  554. </tr>
  555. <tr id="i36" class="altColor">
  556. <td class="colFirst"><code>static long</code></td>
  557. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.Reader-java.io.Writer-long-long-">copyLarge</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  558. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output,
  559. long&nbsp;inputOffset,
  560. long&nbsp;length)</code>
  561. <div class="block">Copies some or all chars from a large (over 2GB) <code>InputStream</code> to an
  562. <code>OutputStream</code>, optionally skipping input chars.</div>
  563. </td>
  564. </tr>
  565. <tr id="i37" class="rowColor">
  566. <td class="colFirst"><code>static long</code></td>
  567. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#copyLarge-java.io.Reader-java.io.Writer-long-long-char:A-">copyLarge</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  568. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output,
  569. long&nbsp;inputOffset,
  570. long&nbsp;length,
  571. char[]&nbsp;buffer)</code>
  572. <div class="block">Copies some or all chars from a large (over 2GB) <code>InputStream</code> to an
  573. <code>OutputStream</code>, optionally skipping input chars.</div>
  574. </td>
  575. </tr>
  576. <tr id="i38" class="altColor">
  577. <td class="colFirst"><code>static <a href="../../../../org/apache/commons/io/LineIterator.html" title="class in org.apache.commons.io">LineIterator</a></code></td>
  578. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#lineIterator-java.io.InputStream-java.nio.charset.Charset-">lineIterator</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  579. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)</code>
  580. <div class="block">Returns an Iterator for the lines in an <code>InputStream</code>, using
  581. the character encoding specified (or default encoding if null).</div>
  582. </td>
  583. </tr>
  584. <tr id="i39" class="rowColor">
  585. <td class="colFirst"><code>static <a href="../../../../org/apache/commons/io/LineIterator.html" title="class in org.apache.commons.io">LineIterator</a></code></td>
  586. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#lineIterator-java.io.InputStream-java.lang.String-">lineIterator</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  587. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)</code>
  588. <div class="block">Returns an Iterator for the lines in an <code>InputStream</code>, using
  589. the character encoding specified (or default encoding if null).</div>
  590. </td>
  591. </tr>
  592. <tr id="i40" class="altColor">
  593. <td class="colFirst"><code>static <a href="../../../../org/apache/commons/io/LineIterator.html" title="class in org.apache.commons.io">LineIterator</a></code></td>
  594. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#lineIterator-java.io.Reader-">lineIterator</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader)</code>
  595. <div class="block">Returns an Iterator for the lines in a <code>Reader</code>.</div>
  596. </td>
  597. </tr>
  598. <tr id="i41" class="rowColor">
  599. <td class="colFirst"><code>static int</code></td>
  600. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#read-java.io.InputStream-byte:A-">read</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  601. byte[]&nbsp;buffer)</code>
  602. <div class="block">Reads bytes from an input stream.</div>
  603. </td>
  604. </tr>
  605. <tr id="i42" class="altColor">
  606. <td class="colFirst"><code>static int</code></td>
  607. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#read-java.io.InputStream-byte:A-int-int-">read</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  608. byte[]&nbsp;buffer,
  609. int&nbsp;offset,
  610. int&nbsp;length)</code>
  611. <div class="block">Reads bytes from an input stream.</div>
  612. </td>
  613. </tr>
  614. <tr id="i43" class="rowColor">
  615. <td class="colFirst"><code>static int</code></td>
  616. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#read-java.nio.channels.ReadableByteChannel-java.nio.ByteBuffer-">read</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/channels/ReadableByteChannel.html?is-external=true" title="class or interface in java.nio.channels">ReadableByteChannel</a>&nbsp;input,
  617. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buffer)</code>
  618. <div class="block">Reads bytes from a ReadableByteChannel.</div>
  619. </td>
  620. </tr>
  621. <tr id="i44" class="altColor">
  622. <td class="colFirst"><code>static int</code></td>
  623. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#read-java.io.Reader-char:A-">read</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  624. char[]&nbsp;buffer)</code>
  625. <div class="block">Reads characters from an input character stream.</div>
  626. </td>
  627. </tr>
  628. <tr id="i45" class="rowColor">
  629. <td class="colFirst"><code>static int</code></td>
  630. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#read-java.io.Reader-char:A-int-int-">read</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  631. char[]&nbsp;buffer,
  632. int&nbsp;offset,
  633. int&nbsp;length)</code>
  634. <div class="block">Reads characters from an input character stream.</div>
  635. </td>
  636. </tr>
  637. <tr id="i46" class="altColor">
  638. <td class="colFirst"><code>static void</code></td>
  639. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#readFully-java.io.InputStream-byte:A-">readFully</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  640. byte[]&nbsp;buffer)</code>
  641. <div class="block">Reads the requested number of bytes or fail if there are not enough left.</div>
  642. </td>
  643. </tr>
  644. <tr id="i47" class="rowColor">
  645. <td class="colFirst"><code>static void</code></td>
  646. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#readFully-java.io.InputStream-byte:A-int-int-">readFully</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  647. byte[]&nbsp;buffer,
  648. int&nbsp;offset,
  649. int&nbsp;length)</code>
  650. <div class="block">Reads the requested number of bytes or fail if there are not enough left.</div>
  651. </td>
  652. </tr>
  653. <tr id="i48" class="altColor">
  654. <td class="colFirst"><code>static byte[]</code></td>
  655. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#readFully-java.io.InputStream-int-">readFully</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  656. int&nbsp;length)</code>
  657. <div class="block">Reads the requested number of bytes or fail if there are not enough left.</div>
  658. </td>
  659. </tr>
  660. <tr id="i49" class="rowColor">
  661. <td class="colFirst"><code>static void</code></td>
  662. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#readFully-java.nio.channels.ReadableByteChannel-java.nio.ByteBuffer-">readFully</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/channels/ReadableByteChannel.html?is-external=true" title="class or interface in java.nio.channels">ReadableByteChannel</a>&nbsp;input,
  663. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buffer)</code>
  664. <div class="block">Reads the requested number of bytes or fail if there are not enough left.</div>
  665. </td>
  666. </tr>
  667. <tr id="i50" class="altColor">
  668. <td class="colFirst"><code>static void</code></td>
  669. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#readFully-java.io.Reader-char:A-">readFully</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  670. char[]&nbsp;buffer)</code>
  671. <div class="block">Reads the requested number of characters or fail if there are not enough left.</div>
  672. </td>
  673. </tr>
  674. <tr id="i51" class="rowColor">
  675. <td class="colFirst"><code>static void</code></td>
  676. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#readFully-java.io.Reader-char:A-int-int-">readFully</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  677. char[]&nbsp;buffer,
  678. int&nbsp;offset,
  679. int&nbsp;length)</code>
  680. <div class="block">Reads the requested number of characters or fail if there are not enough left.</div>
  681. </td>
  682. </tr>
  683. <tr id="i52" class="altColor">
  684. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
  685. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#readLines-java.io.InputStream-">readLines</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input)</code>
  686. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  687. <div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#readLines-java.io.InputStream-java.nio.charset.Charset-"><code>readLines(InputStream, Charset)</code></a> instead</span></div>
  688. </div>
  689. </td>
  690. </tr>
  691. <tr id="i53" class="rowColor">
  692. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
  693. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#readLines-java.io.InputStream-java.nio.charset.Charset-">readLines</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  694. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)</code>
  695. <div class="block">Gets the contents of an <code>InputStream</code> as a list of Strings,
  696. one entry per line, using the specified character encoding.</div>
  697. </td>
  698. </tr>
  699. <tr id="i54" class="altColor">
  700. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
  701. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#readLines-java.io.InputStream-java.lang.String-">readLines</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  702. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)</code>
  703. <div class="block">Gets the contents of an <code>InputStream</code> as a list of Strings,
  704. one entry per line, using the specified character encoding.</div>
  705. </td>
  706. </tr>
  707. <tr id="i55" class="rowColor">
  708. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
  709. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#readLines-java.io.Reader-">readLines</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input)</code>
  710. <div class="block">Gets the contents of a <code>Reader</code> as a list of Strings,
  711. one entry per line.</div>
  712. </td>
  713. </tr>
  714. <tr id="i56" class="altColor">
  715. <td class="colFirst"><code>static byte[]</code></td>
  716. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#resourceToByteArray-java.lang.String-">resourceToByteArray</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)</code>
  717. <div class="block">Gets the contents of a classpath resource as a byte array.</div>
  718. </td>
  719. </tr>
  720. <tr id="i57" class="rowColor">
  721. <td class="colFirst"><code>static byte[]</code></td>
  722. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#resourceToByteArray-java.lang.String-java.lang.ClassLoader-">resourceToByteArray</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
  723. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a>&nbsp;classLoader)</code>
  724. <div class="block">Gets the contents of a classpath resource as a byte array.</div>
  725. </td>
  726. </tr>
  727. <tr id="i58" class="altColor">
  728. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  729. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#resourceToString-java.lang.String-java.nio.charset.Charset-">resourceToString</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
  730. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)</code>
  731. <div class="block">Gets the contents of a classpath resource as a String using the
  732. specified character encoding.</div>
  733. </td>
  734. </tr>
  735. <tr id="i59" class="rowColor">
  736. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  737. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#resourceToString-java.lang.String-java.nio.charset.Charset-java.lang.ClassLoader-">resourceToString</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
  738. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding,
  739. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a>&nbsp;classLoader)</code>
  740. <div class="block">Gets the contents of a classpath resource as a String using the
  741. specified character encoding.</div>
  742. </td>
  743. </tr>
  744. <tr id="i60" class="altColor">
  745. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a></code></td>
  746. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#resourceToURL-java.lang.String-">resourceToURL</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)</code>
  747. <div class="block">Gets a URL pointing to the given classpath resource.</div>
  748. </td>
  749. </tr>
  750. <tr id="i61" class="rowColor">
  751. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a></code></td>
  752. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#resourceToURL-java.lang.String-java.lang.ClassLoader-">resourceToURL</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
  753. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a>&nbsp;classLoader)</code>
  754. <div class="block">Gets a URL pointing to the given classpath resource.</div>
  755. </td>
  756. </tr>
  757. <tr id="i62" class="altColor">
  758. <td class="colFirst"><code>static long</code></td>
  759. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#skip-java.io.InputStream-long-">skip</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  760. long&nbsp;toSkip)</code>
  761. <div class="block">Skips bytes from an input byte stream.</div>
  762. </td>
  763. </tr>
  764. <tr id="i63" class="rowColor">
  765. <td class="colFirst"><code>static long</code></td>
  766. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#skip-java.nio.channels.ReadableByteChannel-long-">skip</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/channels/ReadableByteChannel.html?is-external=true" title="class or interface in java.nio.channels">ReadableByteChannel</a>&nbsp;input,
  767. long&nbsp;toSkip)</code>
  768. <div class="block">Skips bytes from a ReadableByteChannel.</div>
  769. </td>
  770. </tr>
  771. <tr id="i64" class="altColor">
  772. <td class="colFirst"><code>static long</code></td>
  773. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#skip-java.io.Reader-long-">skip</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  774. long&nbsp;toSkip)</code>
  775. <div class="block">Skips characters from an input character stream.</div>
  776. </td>
  777. </tr>
  778. <tr id="i65" class="rowColor">
  779. <td class="colFirst"><code>static void</code></td>
  780. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#skipFully-java.io.InputStream-long-">skipFully</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  781. long&nbsp;toSkip)</code>
  782. <div class="block">Skips the requested number of bytes or fail if there are not enough left.</div>
  783. </td>
  784. </tr>
  785. <tr id="i66" class="altColor">
  786. <td class="colFirst"><code>static void</code></td>
  787. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#skipFully-java.nio.channels.ReadableByteChannel-long-">skipFully</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/channels/ReadableByteChannel.html?is-external=true" title="class or interface in java.nio.channels">ReadableByteChannel</a>&nbsp;input,
  788. long&nbsp;toSkip)</code>
  789. <div class="block">Skips the requested number of bytes or fail if there are not enough left.</div>
  790. </td>
  791. </tr>
  792. <tr id="i67" class="rowColor">
  793. <td class="colFirst"><code>static void</code></td>
  794. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#skipFully-java.io.Reader-long-">skipFully</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  795. long&nbsp;toSkip)</code>
  796. <div class="block">Skips the requested number of characters or fail if there are not enough left.</div>
  797. </td>
  798. </tr>
  799. <tr id="i68" class="altColor">
  800. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
  801. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toBufferedInputStream-java.io.InputStream-">toBufferedInputStream</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input)</code>
  802. <div class="block">Fetches entire contents of an <code>InputStream</code> and represent
  803. same data as result InputStream.</div>
  804. </td>
  805. </tr>
  806. <tr id="i69" class="rowColor">
  807. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
  808. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toBufferedInputStream-java.io.InputStream-int-">toBufferedInputStream</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  809. int&nbsp;size)</code>
  810. <div class="block">Fetches entire contents of an <code>InputStream</code> and represent
  811. same data as result InputStream.</div>
  812. </td>
  813. </tr>
  814. <tr id="i70" class="altColor">
  815. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io">BufferedReader</a></code></td>
  816. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toBufferedReader-java.io.Reader-">toBufferedReader</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader)</code>
  817. <div class="block">Returns the given reader if it is a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io"><code>BufferedReader</code></a>, otherwise creates a BufferedReader from the given
  818. reader.</div>
  819. </td>
  820. </tr>
  821. <tr id="i71" class="rowColor">
  822. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io">BufferedReader</a></code></td>
  823. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toBufferedReader-java.io.Reader-int-">toBufferedReader</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
  824. int&nbsp;size)</code>
  825. <div class="block">Returns the given reader if it is a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io"><code>BufferedReader</code></a>, otherwise creates a BufferedReader from the given
  826. reader.</div>
  827. </td>
  828. </tr>
  829. <tr id="i72" class="altColor">
  830. <td class="colFirst"><code>static byte[]</code></td>
  831. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.io.InputStream-">toByteArray</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input)</code>
  832. <div class="block">Gets the contents of an <code>InputStream</code> as a <code>byte[]</code>.</div>
  833. </td>
  834. </tr>
  835. <tr id="i73" class="rowColor">
  836. <td class="colFirst"><code>static byte[]</code></td>
  837. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.io.InputStream-int-">toByteArray</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  838. int&nbsp;size)</code>
  839. <div class="block">Gets the contents of an <code>InputStream</code> as a <code>byte[]</code>.</div>
  840. </td>
  841. </tr>
  842. <tr id="i74" class="altColor">
  843. <td class="colFirst"><code>static byte[]</code></td>
  844. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.io.InputStream-long-">toByteArray</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  845. long&nbsp;size)</code>
  846. <div class="block">Gets contents of an <code>InputStream</code> as a <code>byte[]</code>.</div>
  847. </td>
  848. </tr>
  849. <tr id="i75" class="rowColor">
  850. <td class="colFirst"><code>static byte[]</code></td>
  851. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.io.Reader-">toByteArray</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input)</code>
  852. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  853. <div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.io.Reader-java.nio.charset.Charset-"><code>toByteArray(Reader, Charset)</code></a> instead</span></div>
  854. </div>
  855. </td>
  856. </tr>
  857. <tr id="i76" class="altColor">
  858. <td class="colFirst"><code>static byte[]</code></td>
  859. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.io.Reader-java.nio.charset.Charset-">toByteArray</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  860. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)</code>
  861. <div class="block">Gets the contents of a <code>Reader</code> as a <code>byte[]</code>
  862. using the specified character encoding.</div>
  863. </td>
  864. </tr>
  865. <tr id="i77" class="rowColor">
  866. <td class="colFirst"><code>static byte[]</code></td>
  867. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.io.Reader-java.lang.String-">toByteArray</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  868. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)</code>
  869. <div class="block">Gets the contents of a <code>Reader</code> as a <code>byte[]</code>
  870. using the specified character encoding.</div>
  871. </td>
  872. </tr>
  873. <tr id="i78" class="altColor">
  874. <td class="colFirst"><code>static byte[]</code></td>
  875. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.lang.String-">toByteArray</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;input)</code>
  876. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  877. <div class="block"><span class="deprecationComment">2.5 Use <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes--" title="class or interface in java.lang"><code>String.getBytes()</code></a> instead</span></div>
  878. </div>
  879. </td>
  880. </tr>
  881. <tr id="i79" class="rowColor">
  882. <td class="colFirst"><code>static byte[]</code></td>
  883. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.net.URI-">toByteArray</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a>&nbsp;uri)</code>
  884. <div class="block">Gets the contents of a <code>URI</code> as a <code>byte[]</code>.</div>
  885. </td>
  886. </tr>
  887. <tr id="i80" class="altColor">
  888. <td class="colFirst"><code>static byte[]</code></td>
  889. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.net.URL-">toByteArray</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;url)</code>
  890. <div class="block">Gets the contents of a <code>URL</code> as a <code>byte[]</code>.</div>
  891. </td>
  892. </tr>
  893. <tr id="i81" class="rowColor">
  894. <td class="colFirst"><code>static byte[]</code></td>
  895. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.net.URLConnection-">toByteArray</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URLConnection.html?is-external=true" title="class or interface in java.net">URLConnection</a>&nbsp;urlConn)</code>
  896. <div class="block">Gets the contents of a <code>URLConnection</code> as a <code>byte[]</code>.</div>
  897. </td>
  898. </tr>
  899. <tr id="i82" class="altColor">
  900. <td class="colFirst"><code>static char[]</code></td>
  901. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toCharArray-java.io.InputStream-">toCharArray</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;is)</code>
  902. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  903. <div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toCharArray-java.io.InputStream-java.nio.charset.Charset-"><code>toCharArray(InputStream, Charset)</code></a> instead</span></div>
  904. </div>
  905. </td>
  906. </tr>
  907. <tr id="i83" class="rowColor">
  908. <td class="colFirst"><code>static char[]</code></td>
  909. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toCharArray-java.io.InputStream-java.nio.charset.Charset-">toCharArray</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;is,
  910. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)</code>
  911. <div class="block">Gets the contents of an <code>InputStream</code> as a character array
  912. using the specified character encoding.</div>
  913. </td>
  914. </tr>
  915. <tr id="i84" class="altColor">
  916. <td class="colFirst"><code>static char[]</code></td>
  917. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toCharArray-java.io.InputStream-java.lang.String-">toCharArray</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;is,
  918. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)</code>
  919. <div class="block">Gets the contents of an <code>InputStream</code> as a character array
  920. using the specified character encoding.</div>
  921. </td>
  922. </tr>
  923. <tr id="i85" class="rowColor">
  924. <td class="colFirst"><code>static char[]</code></td>
  925. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toCharArray-java.io.Reader-">toCharArray</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input)</code>
  926. <div class="block">Gets the contents of a <code>Reader</code> as a character array.</div>
  927. </td>
  928. </tr>
  929. <tr id="i86" class="altColor">
  930. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
  931. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toInputStream-java.lang.CharSequence-">toInputStream</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;input)</code>
  932. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  933. <div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toInputStream-java.lang.CharSequence-java.nio.charset.Charset-"><code>toInputStream(CharSequence, Charset)</code></a> instead</span></div>
  934. </div>
  935. </td>
  936. </tr>
  937. <tr id="i87" class="rowColor">
  938. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
  939. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toInputStream-java.lang.CharSequence-java.nio.charset.Charset-">toInputStream</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;input,
  940. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)</code>
  941. <div class="block">Converts the specified CharSequence to an input stream, encoded as bytes
  942. using the specified character encoding.</div>
  943. </td>
  944. </tr>
  945. <tr id="i88" class="altColor">
  946. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
  947. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toInputStream-java.lang.CharSequence-java.lang.String-">toInputStream</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;input,
  948. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)</code>
  949. <div class="block">Converts the specified CharSequence to an input stream, encoded as bytes
  950. using the specified character encoding.</div>
  951. </td>
  952. </tr>
  953. <tr id="i89" class="rowColor">
  954. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
  955. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toInputStream-java.lang.String-">toInputStream</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;input)</code>
  956. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  957. <div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toInputStream-java.lang.String-java.nio.charset.Charset-"><code>toInputStream(String, Charset)</code></a> instead</span></div>
  958. </div>
  959. </td>
  960. </tr>
  961. <tr id="i90" class="altColor">
  962. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
  963. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toInputStream-java.lang.String-java.nio.charset.Charset-">toInputStream</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;input,
  964. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)</code>
  965. <div class="block">Converts the specified string to an input stream, encoded as bytes
  966. using the specified character encoding.</div>
  967. </td>
  968. </tr>
  969. <tr id="i91" class="rowColor">
  970. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
  971. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toInputStream-java.lang.String-java.lang.String-">toInputStream</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;input,
  972. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)</code>
  973. <div class="block">Converts the specified string to an input stream, encoded as bytes
  974. using the specified character encoding.</div>
  975. </td>
  976. </tr>
  977. <tr id="i92" class="altColor">
  978. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  979. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toString-byte:A-">toString</a></span>(byte[]&nbsp;input)</code>
  980. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  981. <div class="block"><span class="deprecationComment">2.5 Use <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#String-byte:A-" title="class or interface in java.lang"><code>String.String(byte[])</code></a> instead</span></div>
  982. </div>
  983. </td>
  984. </tr>
  985. <tr id="i93" class="rowColor">
  986. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  987. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toString-byte:A-java.lang.String-">toString</a></span>(byte[]&nbsp;input,
  988. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)</code>
  989. <div class="block">Gets the contents of a <code>byte[]</code> as a String
  990. using the specified character encoding.</div>
  991. </td>
  992. </tr>
  993. <tr id="i94" class="altColor">
  994. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  995. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.io.InputStream-">toString</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input)</code>
  996. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  997. <div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.io.InputStream-java.nio.charset.Charset-"><code>toString(InputStream, Charset)</code></a> instead</span></div>
  998. </div>
  999. </td>
  1000. </tr>
  1001. <tr id="i95" class="rowColor">
  1002. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  1003. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.io.InputStream-java.nio.charset.Charset-">toString</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  1004. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)</code>
  1005. <div class="block">Gets the contents of an <code>InputStream</code> as a String
  1006. using the specified character encoding.</div>
  1007. </td>
  1008. </tr>
  1009. <tr id="i96" class="altColor">
  1010. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  1011. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.io.InputStream-java.lang.String-">toString</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  1012. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)</code>
  1013. <div class="block">Gets the contents of an <code>InputStream</code> as a String
  1014. using the specified character encoding.</div>
  1015. </td>
  1016. </tr>
  1017. <tr id="i97" class="rowColor">
  1018. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  1019. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.io.Reader-">toString</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input)</code>
  1020. <div class="block">Gets the contents of a <code>Reader</code> as a String.</div>
  1021. </td>
  1022. </tr>
  1023. <tr id="i98" class="altColor">
  1024. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  1025. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.net.URI-">toString</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a>&nbsp;uri)</code>
  1026. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  1027. <div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.net.URI-java.nio.charset.Charset-"><code>toString(URI, Charset)</code></a> instead</span></div>
  1028. </div>
  1029. </td>
  1030. </tr>
  1031. <tr id="i99" class="rowColor">
  1032. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  1033. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.net.URI-java.nio.charset.Charset-">toString</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a>&nbsp;uri,
  1034. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)</code>
  1035. <div class="block">Gets the contents at the given URI.</div>
  1036. </td>
  1037. </tr>
  1038. <tr id="i100" class="altColor">
  1039. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  1040. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.net.URI-java.lang.String-">toString</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a>&nbsp;uri,
  1041. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)</code>
  1042. <div class="block">Gets the contents at the given URI.</div>
  1043. </td>
  1044. </tr>
  1045. <tr id="i101" class="rowColor">
  1046. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  1047. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.net.URL-">toString</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;url)</code>
  1048. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  1049. <div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.net.URL-java.nio.charset.Charset-"><code>toString(URL, Charset)</code></a> instead</span></div>
  1050. </div>
  1051. </td>
  1052. </tr>
  1053. <tr id="i102" class="altColor">
  1054. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  1055. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.net.URL-java.nio.charset.Charset-">toString</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;url,
  1056. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)</code>
  1057. <div class="block">Gets the contents at the given URL.</div>
  1058. </td>
  1059. </tr>
  1060. <tr id="i103" class="rowColor">
  1061. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  1062. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.net.URL-java.lang.String-">toString</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;url,
  1063. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)</code>
  1064. <div class="block">Gets the contents at the given URL.</div>
  1065. </td>
  1066. </tr>
  1067. <tr id="i104" class="altColor">
  1068. <td class="colFirst"><code>static void</code></td>
  1069. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-byte:A-java.io.OutputStream-">write</a></span>(byte[]&nbsp;data,
  1070. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)</code>
  1071. <div class="block">Writes bytes from a <code>byte[]</code> to an <code>OutputStream</code>.</div>
  1072. </td>
  1073. </tr>
  1074. <tr id="i105" class="rowColor">
  1075. <td class="colFirst"><code>static void</code></td>
  1076. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-byte:A-java.io.Writer-">write</a></span>(byte[]&nbsp;data,
  1077. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output)</code>
  1078. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  1079. <div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#write-byte:A-java.io.Writer-java.nio.charset.Charset-"><code>write(byte[], Writer, Charset)</code></a> instead</span></div>
  1080. </div>
  1081. </td>
  1082. </tr>
  1083. <tr id="i106" class="altColor">
  1084. <td class="colFirst"><code>static void</code></td>
  1085. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-byte:A-java.io.Writer-java.nio.charset.Charset-">write</a></span>(byte[]&nbsp;data,
  1086. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output,
  1087. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)</code>
  1088. <div class="block">Writes bytes from a <code>byte[]</code> to chars on a <code>Writer</code>
  1089. using the specified character encoding.</div>
  1090. </td>
  1091. </tr>
  1092. <tr id="i107" class="rowColor">
  1093. <td class="colFirst"><code>static void</code></td>
  1094. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-byte:A-java.io.Writer-java.lang.String-">write</a></span>(byte[]&nbsp;data,
  1095. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output,
  1096. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)</code>
  1097. <div class="block">Writes bytes from a <code>byte[]</code> to chars on a <code>Writer</code>
  1098. using the specified character encoding.</div>
  1099. </td>
  1100. </tr>
  1101. <tr id="i108" class="altColor">
  1102. <td class="colFirst"><code>static void</code></td>
  1103. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-char:A-java.io.OutputStream-">write</a></span>(char[]&nbsp;data,
  1104. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)</code>
  1105. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  1106. <div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#write-char:A-java.io.OutputStream-java.nio.charset.Charset-"><code>write(char[], OutputStream, Charset)</code></a> instead</span></div>
  1107. </div>
  1108. </td>
  1109. </tr>
  1110. <tr id="i109" class="rowColor">
  1111. <td class="colFirst"><code>static void</code></td>
  1112. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-char:A-java.io.OutputStream-java.nio.charset.Charset-">write</a></span>(char[]&nbsp;data,
  1113. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  1114. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)</code>
  1115. <div class="block">Writes chars from a <code>char[]</code> to bytes on an
  1116. <code>OutputStream</code> using the specified character encoding.</div>
  1117. </td>
  1118. </tr>
  1119. <tr id="i110" class="altColor">
  1120. <td class="colFirst"><code>static void</code></td>
  1121. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-char:A-java.io.OutputStream-java.lang.String-">write</a></span>(char[]&nbsp;data,
  1122. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  1123. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)</code>
  1124. <div class="block">Writes chars from a <code>char[]</code> to bytes on an
  1125. <code>OutputStream</code> using the specified character encoding.</div>
  1126. </td>
  1127. </tr>
  1128. <tr id="i111" class="rowColor">
  1129. <td class="colFirst"><code>static void</code></td>
  1130. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-char:A-java.io.Writer-">write</a></span>(char[]&nbsp;data,
  1131. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output)</code>
  1132. <div class="block">Writes chars from a <code>char[]</code> to a <code>Writer</code></div>
  1133. </td>
  1134. </tr>
  1135. <tr id="i112" class="altColor">
  1136. <td class="colFirst"><code>static void</code></td>
  1137. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.CharSequence-java.io.OutputStream-">write</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data,
  1138. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)</code>
  1139. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  1140. <div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.CharSequence-java.io.OutputStream-java.nio.charset.Charset-"><code>write(CharSequence, OutputStream, Charset)</code></a> instead</span></div>
  1141. </div>
  1142. </td>
  1143. </tr>
  1144. <tr id="i113" class="rowColor">
  1145. <td class="colFirst"><code>static void</code></td>
  1146. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.CharSequence-java.io.OutputStream-java.nio.charset.Charset-">write</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data,
  1147. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  1148. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)</code>
  1149. <div class="block">Writes chars from a <code>CharSequence</code> to bytes on an
  1150. <code>OutputStream</code> using the specified character encoding.</div>
  1151. </td>
  1152. </tr>
  1153. <tr id="i114" class="altColor">
  1154. <td class="colFirst"><code>static void</code></td>
  1155. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.CharSequence-java.io.OutputStream-java.lang.String-">write</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data,
  1156. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  1157. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)</code>
  1158. <div class="block">Writes chars from a <code>CharSequence</code> to bytes on an
  1159. <code>OutputStream</code> using the specified character encoding.</div>
  1160. </td>
  1161. </tr>
  1162. <tr id="i115" class="rowColor">
  1163. <td class="colFirst"><code>static void</code></td>
  1164. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.CharSequence-java.io.Writer-">write</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data,
  1165. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output)</code>
  1166. <div class="block">Writes chars from a <code>CharSequence</code> to a <code>Writer</code>.</div>
  1167. </td>
  1168. </tr>
  1169. <tr id="i116" class="altColor">
  1170. <td class="colFirst"><code>static void</code></td>
  1171. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.StringBuffer-java.io.OutputStream-">write</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang">StringBuffer</a>&nbsp;data,
  1172. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)</code>
  1173. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  1174. <div class="block"><span class="deprecationComment">replaced by write(CharSequence, OutputStream)</span></div>
  1175. </div>
  1176. </td>
  1177. </tr>
  1178. <tr id="i117" class="rowColor">
  1179. <td class="colFirst"><code>static void</code></td>
  1180. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.StringBuffer-java.io.OutputStream-java.lang.String-">write</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang">StringBuffer</a>&nbsp;data,
  1181. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  1182. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)</code>
  1183. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  1184. <div class="block"><span class="deprecationComment">replaced by write(CharSequence, OutputStream, String)</span></div>
  1185. </div>
  1186. </td>
  1187. </tr>
  1188. <tr id="i118" class="altColor">
  1189. <td class="colFirst"><code>static void</code></td>
  1190. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.StringBuffer-java.io.Writer-">write</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang">StringBuffer</a>&nbsp;data,
  1191. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output)</code>
  1192. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  1193. <div class="block"><span class="deprecationComment">replaced by write(CharSequence, Writer)</span></div>
  1194. </div>
  1195. </td>
  1196. </tr>
  1197. <tr id="i119" class="rowColor">
  1198. <td class="colFirst"><code>static void</code></td>
  1199. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.String-java.io.OutputStream-">write</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data,
  1200. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)</code>
  1201. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  1202. <div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.String-java.io.OutputStream-java.nio.charset.Charset-"><code>write(String, OutputStream, Charset)</code></a> instead</span></div>
  1203. </div>
  1204. </td>
  1205. </tr>
  1206. <tr id="i120" class="altColor">
  1207. <td class="colFirst"><code>static void</code></td>
  1208. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.String-java.io.OutputStream-java.nio.charset.Charset-">write</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data,
  1209. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  1210. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)</code>
  1211. <div class="block">Writes chars from a <code>String</code> to bytes on an
  1212. <code>OutputStream</code> using the specified character encoding.</div>
  1213. </td>
  1214. </tr>
  1215. <tr id="i121" class="rowColor">
  1216. <td class="colFirst"><code>static void</code></td>
  1217. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.String-java.io.OutputStream-java.lang.String-">write</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data,
  1218. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  1219. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)</code>
  1220. <div class="block">Writes chars from a <code>String</code> to bytes on an
  1221. <code>OutputStream</code> using the specified character encoding.</div>
  1222. </td>
  1223. </tr>
  1224. <tr id="i122" class="altColor">
  1225. <td class="colFirst"><code>static void</code></td>
  1226. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.String-java.io.Writer-">write</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data,
  1227. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output)</code>
  1228. <div class="block">Writes chars from a <code>String</code> to a <code>Writer</code>.</div>
  1229. </td>
  1230. </tr>
  1231. <tr id="i123" class="rowColor">
  1232. <td class="colFirst"><code>static void</code></td>
  1233. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#writeChunked-byte:A-java.io.OutputStream-">writeChunked</a></span>(byte[]&nbsp;data,
  1234. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)</code>
  1235. <div class="block">Writes bytes from a <code>byte[]</code> to an <code>OutputStream</code> using chunked writes.</div>
  1236. </td>
  1237. </tr>
  1238. <tr id="i124" class="altColor">
  1239. <td class="colFirst"><code>static void</code></td>
  1240. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#writeChunked-char:A-java.io.Writer-">writeChunked</a></span>(char[]&nbsp;data,
  1241. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output)</code>
  1242. <div class="block">Writes chars from a <code>char[]</code> to a <code>Writer</code> using chunked writes.</div>
  1243. </td>
  1244. </tr>
  1245. <tr id="i125" class="rowColor">
  1246. <td class="colFirst"><code>static void</code></td>
  1247. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#writeLines-java.util.Collection-java.lang.String-java.io.OutputStream-">writeLines</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
  1248. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;lineEnding,
  1249. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)</code>
  1250. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  1251. <div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#writeLines-java.util.Collection-java.lang.String-java.io.OutputStream-java.nio.charset.Charset-"><code>writeLines(Collection, String, OutputStream, Charset)</code></a> instead</span></div>
  1252. </div>
  1253. </td>
  1254. </tr>
  1255. <tr id="i126" class="altColor">
  1256. <td class="colFirst"><code>static void</code></td>
  1257. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#writeLines-java.util.Collection-java.lang.String-java.io.OutputStream-java.nio.charset.Charset-">writeLines</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
  1258. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;lineEnding,
  1259. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  1260. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)</code>
  1261. <div class="block">Writes the <code>toString()</code> value of each item in a collection to
  1262. an <code>OutputStream</code> line by line, using the specified character
  1263. encoding and the specified line ending.</div>
  1264. </td>
  1265. </tr>
  1266. <tr id="i127" class="rowColor">
  1267. <td class="colFirst"><code>static void</code></td>
  1268. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#writeLines-java.util.Collection-java.lang.String-java.io.OutputStream-java.lang.String-">writeLines</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
  1269. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;lineEnding,
  1270. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  1271. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)</code>
  1272. <div class="block">Writes the <code>toString()</code> value of each item in a collection to
  1273. an <code>OutputStream</code> line by line, using the specified character
  1274. encoding and the specified line ending.</div>
  1275. </td>
  1276. </tr>
  1277. <tr id="i128" class="altColor">
  1278. <td class="colFirst"><code>static void</code></td>
  1279. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/IOUtils.html#writeLines-java.util.Collection-java.lang.String-java.io.Writer-">writeLines</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
  1280. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;lineEnding,
  1281. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)</code>
  1282. <div class="block">Writes the <code>toString()</code> value of each item in a collection to
  1283. a <code>Writer</code> line by line, using the specified line ending.</div>
  1284. </td>
  1285. </tr>
  1286. </table>
  1287. <ul class="blockList">
  1288. <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
  1289. <!-- -->
  1290. </a>
  1291. <h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
  1292. <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
  1293. </ul>
  1294. </li>
  1295. </ul>
  1296. </li>
  1297. </ul>
  1298. </div>
  1299. <div class="details">
  1300. <ul class="blockList">
  1301. <li class="blockList">
  1302. <!-- ============ FIELD DETAIL =========== -->
  1303. <ul class="blockList">
  1304. <li class="blockList"><a name="field.detail">
  1305. <!-- -->
  1306. </a>
  1307. <h3>Field Detail</h3>
  1308. <a name="EOF">
  1309. <!-- -->
  1310. </a>
  1311. <ul class="blockList">
  1312. <li class="blockList">
  1313. <h4>EOF</h4>
  1314. <pre>public static final&nbsp;int EOF</pre>
  1315. <div class="block">Represents the end-of-file (or stream).</div>
  1316. <dl>
  1317. <dt><span class="simpleTagLabel">Since:</span></dt>
  1318. <dd>2.5 (made public)</dd>
  1319. <dt><span class="seeLabel">See Also:</span></dt>
  1320. <dd><a href="../../../../constant-values.html#org.apache.commons.io.IOUtils.EOF">Constant Field Values</a></dd>
  1321. </dl>
  1322. </li>
  1323. </ul>
  1324. <a name="DIR_SEPARATOR_UNIX">
  1325. <!-- -->
  1326. </a>
  1327. <ul class="blockList">
  1328. <li class="blockList">
  1329. <h4>DIR_SEPARATOR_UNIX</h4>
  1330. <pre>public static final&nbsp;char DIR_SEPARATOR_UNIX</pre>
  1331. <div class="block">The Unix directory separator character.</div>
  1332. <dl>
  1333. <dt><span class="seeLabel">See Also:</span></dt>
  1334. <dd><a href="../../../../constant-values.html#org.apache.commons.io.IOUtils.DIR_SEPARATOR_UNIX">Constant Field Values</a></dd>
  1335. </dl>
  1336. </li>
  1337. </ul>
  1338. <a name="DIR_SEPARATOR_WINDOWS">
  1339. <!-- -->
  1340. </a>
  1341. <ul class="blockList">
  1342. <li class="blockList">
  1343. <h4>DIR_SEPARATOR_WINDOWS</h4>
  1344. <pre>public static final&nbsp;char DIR_SEPARATOR_WINDOWS</pre>
  1345. <div class="block">The Windows directory separator character.</div>
  1346. <dl>
  1347. <dt><span class="seeLabel">See Also:</span></dt>
  1348. <dd><a href="../../../../constant-values.html#org.apache.commons.io.IOUtils.DIR_SEPARATOR_WINDOWS">Constant Field Values</a></dd>
  1349. </dl>
  1350. </li>
  1351. </ul>
  1352. <a name="DIR_SEPARATOR">
  1353. <!-- -->
  1354. </a>
  1355. <ul class="blockList">
  1356. <li class="blockList">
  1357. <h4>DIR_SEPARATOR</h4>
  1358. <pre>public static final&nbsp;char DIR_SEPARATOR</pre>
  1359. <div class="block">The system directory separator character.</div>
  1360. </li>
  1361. </ul>
  1362. <a name="LINE_SEPARATOR_UNIX">
  1363. <!-- -->
  1364. </a>
  1365. <ul class="blockList">
  1366. <li class="blockList">
  1367. <h4>LINE_SEPARATOR_UNIX</h4>
  1368. <pre>public static final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> LINE_SEPARATOR_UNIX</pre>
  1369. <div class="block">The Unix line separator string.</div>
  1370. <dl>
  1371. <dt><span class="seeLabel">See Also:</span></dt>
  1372. <dd><a href="../../../../constant-values.html#org.apache.commons.io.IOUtils.LINE_SEPARATOR_UNIX">Constant Field Values</a></dd>
  1373. </dl>
  1374. </li>
  1375. </ul>
  1376. <a name="LINE_SEPARATOR_WINDOWS">
  1377. <!-- -->
  1378. </a>
  1379. <ul class="blockList">
  1380. <li class="blockList">
  1381. <h4>LINE_SEPARATOR_WINDOWS</h4>
  1382. <pre>public static final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> LINE_SEPARATOR_WINDOWS</pre>
  1383. <div class="block">The Windows line separator string.</div>
  1384. <dl>
  1385. <dt><span class="seeLabel">See Also:</span></dt>
  1386. <dd><a href="../../../../constant-values.html#org.apache.commons.io.IOUtils.LINE_SEPARATOR_WINDOWS">Constant Field Values</a></dd>
  1387. </dl>
  1388. </li>
  1389. </ul>
  1390. <a name="LINE_SEPARATOR">
  1391. <!-- -->
  1392. </a>
  1393. <ul class="blockListLast">
  1394. <li class="blockList">
  1395. <h4>LINE_SEPARATOR</h4>
  1396. <pre>public static final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> LINE_SEPARATOR</pre>
  1397. <div class="block">The system line separator string.</div>
  1398. </li>
  1399. </ul>
  1400. </li>
  1401. </ul>
  1402. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  1403. <ul class="blockList">
  1404. <li class="blockList"><a name="constructor.detail">
  1405. <!-- -->
  1406. </a>
  1407. <h3>Constructor Detail</h3>
  1408. <a name="IOUtils--">
  1409. <!-- -->
  1410. </a>
  1411. <ul class="blockListLast">
  1412. <li class="blockList">
  1413. <h4>IOUtils</h4>
  1414. <pre>public&nbsp;IOUtils()</pre>
  1415. <div class="block">Instances should NOT be constructed in standard programming.</div>
  1416. </li>
  1417. </ul>
  1418. </li>
  1419. </ul>
  1420. <!-- ============ METHOD DETAIL ========== -->
  1421. <ul class="blockList">
  1422. <li class="blockList"><a name="method.detail">
  1423. <!-- -->
  1424. </a>
  1425. <h3>Method Detail</h3>
  1426. <a name="close-java.net.URLConnection-">
  1427. <!-- -->
  1428. </a>
  1429. <ul class="blockList">
  1430. <li class="blockList">
  1431. <h4>close</h4>
  1432. <pre>public static&nbsp;void&nbsp;close(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URLConnection.html?is-external=true" title="class or interface in java.net">URLConnection</a>&nbsp;conn)</pre>
  1433. <div class="block">Closes a URLConnection.</div>
  1434. <dl>
  1435. <dt><span class="paramLabel">Parameters:</span></dt>
  1436. <dd><code>conn</code> - the connection to close.</dd>
  1437. <dt><span class="simpleTagLabel">Since:</span></dt>
  1438. <dd>2.4</dd>
  1439. </dl>
  1440. </li>
  1441. </ul>
  1442. <a name="closeQuietly-java.io.Reader-">
  1443. <!-- -->
  1444. </a>
  1445. <ul class="blockList">
  1446. <li class="blockList">
  1447. <h4>closeQuietly</h4>
  1448. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  1449. public static&nbsp;void&nbsp;closeQuietly(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input)</pre>
  1450. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">As of 2.6 removed without replacement. Please use the try-with-resources statement or handle
  1451. suppressed exceptions manually.</span></div>
  1452. <div class="block">Closes an <code>Reader</code> unconditionally.
  1453. <p>
  1454. Equivalent to <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true#close--" title="class or interface in java.io"><code>Reader.close()</code></a>, except any exceptions will be ignored.
  1455. This is typically used in finally blocks.
  1456. <p>
  1457. Example code:
  1458. <pre>
  1459. char[] data = new char[1024];
  1460. Reader in = null;
  1461. try {
  1462. in = new FileReader("foo.txt");
  1463. in.read(data);
  1464. in.close(); //close errors are handled
  1465. } catch (Exception e) {
  1466. // error handling
  1467. } finally {
  1468. IOUtils.closeQuietly(in);
  1469. }
  1470. </pre></div>
  1471. <dl>
  1472. <dt><span class="paramLabel">Parameters:</span></dt>
  1473. <dd><code>input</code> - the Reader to close, may be null or already closed</dd>
  1474. <dt><span class="seeLabel">See Also:</span></dt>
  1475. <dd><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#addSuppressed-java.lang.Throwable-" title="class or interface in java.lang"><code>Throwable.addSuppressed(java.lang.Throwable)</code></a></dd>
  1476. </dl>
  1477. </li>
  1478. </ul>
  1479. <a name="closeQuietly-java.io.Writer-">
  1480. <!-- -->
  1481. </a>
  1482. <ul class="blockList">
  1483. <li class="blockList">
  1484. <h4>closeQuietly</h4>
  1485. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  1486. public static&nbsp;void&nbsp;closeQuietly(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output)</pre>
  1487. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">As of 2.6 removed without replacement. Please use the try-with-resources statement or handle
  1488. suppressed exceptions manually.</span></div>
  1489. <div class="block">Closes an <code>Writer</code> unconditionally.
  1490. <p>
  1491. Equivalent to <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true#close--" title="class or interface in java.io"><code>Writer.close()</code></a>, except any exceptions will be ignored.
  1492. This is typically used in finally blocks.
  1493. <p>
  1494. Example code:
  1495. <pre>
  1496. Writer out = null;
  1497. try {
  1498. out = new StringWriter();
  1499. out.write("Hello World");
  1500. out.close(); //close errors are handled
  1501. } catch (Exception e) {
  1502. // error handling
  1503. } finally {
  1504. IOUtils.closeQuietly(out);
  1505. }
  1506. </pre></div>
  1507. <dl>
  1508. <dt><span class="paramLabel">Parameters:</span></dt>
  1509. <dd><code>output</code> - the Writer to close, may be null or already closed</dd>
  1510. <dt><span class="seeLabel">See Also:</span></dt>
  1511. <dd><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#addSuppressed-java.lang.Throwable-" title="class or interface in java.lang"><code>Throwable.addSuppressed(java.lang.Throwable)</code></a></dd>
  1512. </dl>
  1513. </li>
  1514. </ul>
  1515. <a name="closeQuietly-java.io.InputStream-">
  1516. <!-- -->
  1517. </a>
  1518. <ul class="blockList">
  1519. <li class="blockList">
  1520. <h4>closeQuietly</h4>
  1521. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  1522. public static&nbsp;void&nbsp;closeQuietly(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input)</pre>
  1523. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">As of 2.6 removed without replacement. Please use the try-with-resources statement or handle
  1524. suppressed exceptions manually.</span></div>
  1525. <div class="block">Closes an <code>InputStream</code> unconditionally.
  1526. <p>
  1527. Equivalent to <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#close--" title="class or interface in java.io"><code>InputStream.close()</code></a>, except any exceptions will be ignored.
  1528. This is typically used in finally blocks.
  1529. <p>
  1530. Example code:
  1531. <pre>
  1532. byte[] data = new byte[1024];
  1533. InputStream in = null;
  1534. try {
  1535. in = new FileInputStream("foo.txt");
  1536. in.read(data);
  1537. in.close(); //close errors are handled
  1538. } catch (Exception e) {
  1539. // error handling
  1540. } finally {
  1541. IOUtils.closeQuietly(in);
  1542. }
  1543. </pre></div>
  1544. <dl>
  1545. <dt><span class="paramLabel">Parameters:</span></dt>
  1546. <dd><code>input</code> - the InputStream to close, may be null or already closed</dd>
  1547. <dt><span class="seeLabel">See Also:</span></dt>
  1548. <dd><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#addSuppressed-java.lang.Throwable-" title="class or interface in java.lang"><code>Throwable.addSuppressed(java.lang.Throwable)</code></a></dd>
  1549. </dl>
  1550. </li>
  1551. </ul>
  1552. <a name="closeQuietly-java.io.OutputStream-">
  1553. <!-- -->
  1554. </a>
  1555. <ul class="blockList">
  1556. <li class="blockList">
  1557. <h4>closeQuietly</h4>
  1558. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  1559. public static&nbsp;void&nbsp;closeQuietly(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)</pre>
  1560. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">As of 2.6 removed without replacement. Please use the try-with-resources statement or handle
  1561. suppressed exceptions manually.</span></div>
  1562. <div class="block">Closes an <code>OutputStream</code> unconditionally.
  1563. <p>
  1564. Equivalent to <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true#close--" title="class or interface in java.io"><code>OutputStream.close()</code></a>, except any exceptions will be ignored.
  1565. This is typically used in finally blocks.
  1566. <p>
  1567. Example code:
  1568. <pre>
  1569. byte[] data = "Hello, World".getBytes();
  1570. OutputStream out = null;
  1571. try {
  1572. out = new FileOutputStream("foo.txt");
  1573. out.write(data);
  1574. out.close(); //close errors are handled
  1575. } catch (IOException e) {
  1576. // error handling
  1577. } finally {
  1578. IOUtils.closeQuietly(out);
  1579. }
  1580. </pre></div>
  1581. <dl>
  1582. <dt><span class="paramLabel">Parameters:</span></dt>
  1583. <dd><code>output</code> - the OutputStream to close, may be null or already closed</dd>
  1584. <dt><span class="seeLabel">See Also:</span></dt>
  1585. <dd><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#addSuppressed-java.lang.Throwable-" title="class or interface in java.lang"><code>Throwable.addSuppressed(java.lang.Throwable)</code></a></dd>
  1586. </dl>
  1587. </li>
  1588. </ul>
  1589. <a name="closeQuietly-java.io.Closeable-">
  1590. <!-- -->
  1591. </a>
  1592. <ul class="blockList">
  1593. <li class="blockList">
  1594. <h4>closeQuietly</h4>
  1595. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  1596. public static&nbsp;void&nbsp;closeQuietly(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>&nbsp;closeable)</pre>
  1597. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">As of 2.6 removed without replacement. Please use the try-with-resources statement or handle
  1598. suppressed exceptions manually.</span></div>
  1599. <div class="block">Closes a <code>Closeable</code> unconditionally.
  1600. <p>
  1601. Equivalent to <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true#close--" title="class or interface in java.io"><code>Closeable.close()</code></a>, except any exceptions will be ignored. This is typically used in
  1602. finally blocks.
  1603. <p>
  1604. Example code:
  1605. </p>
  1606. <pre>
  1607. Closeable closeable = null;
  1608. try {
  1609. closeable = new FileReader(&quot;foo.txt&quot;);
  1610. // process closeable
  1611. closeable.close();
  1612. } catch (Exception e) {
  1613. // error handling
  1614. } finally {
  1615. IOUtils.closeQuietly(closeable);
  1616. }
  1617. </pre>
  1618. <p>
  1619. Closing all streams:
  1620. </p>
  1621. <pre>
  1622. try {
  1623. return IOUtils.copy(inputStream, outputStream);
  1624. } finally {
  1625. IOUtils.closeQuietly(inputStream);
  1626. IOUtils.closeQuietly(outputStream);
  1627. }
  1628. </pre></div>
  1629. <dl>
  1630. <dt><span class="paramLabel">Parameters:</span></dt>
  1631. <dd><code>closeable</code> - the objects to close, may be null or already closed</dd>
  1632. <dt><span class="simpleTagLabel">Since:</span></dt>
  1633. <dd>2.0</dd>
  1634. <dt><span class="seeLabel">See Also:</span></dt>
  1635. <dd><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#addSuppressed-java.lang.Throwable-" title="class or interface in java.lang"><code>Throwable.addSuppressed(java.lang.Throwable)</code></a></dd>
  1636. </dl>
  1637. </li>
  1638. </ul>
  1639. <a name="closeQuietly-java.io.Closeable...-">
  1640. <!-- -->
  1641. </a>
  1642. <ul class="blockList">
  1643. <li class="blockList">
  1644. <h4>closeQuietly</h4>
  1645. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  1646. public static&nbsp;void&nbsp;closeQuietly(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>...&nbsp;closeables)</pre>
  1647. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">As of 2.6 removed without replacement. Please use the try-with-resources statement or handle
  1648. suppressed exceptions manually.</span></div>
  1649. <div class="block">Closes a <code>Closeable</code> unconditionally.
  1650. <p>
  1651. Equivalent to <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true#close--" title="class or interface in java.io"><code>Closeable.close()</code></a>, except any exceptions will be ignored.
  1652. <p>
  1653. This is typically used in finally blocks to ensure that the closeable is closed
  1654. even if an Exception was thrown before the normal close statement was reached.
  1655. <br>
  1656. <b>It should not be used to replace the close statement(s)
  1657. which should be present for the non-exceptional case.</b>
  1658. <br>
  1659. It is only intended to simplify tidying up where normal processing has already failed
  1660. and reporting close failure as well is not necessary or useful.
  1661. <p>
  1662. Example code:
  1663. </p>
  1664. <pre>
  1665. Closeable closeable = null;
  1666. try {
  1667. closeable = new FileReader(&quot;foo.txt&quot;);
  1668. // processing using the closeable; may throw an Exception
  1669. closeable.close(); // Normal close - exceptions not ignored
  1670. } catch (Exception e) {
  1671. // error handling
  1672. } finally {
  1673. <b>IOUtils.closeQuietly(closeable); // In case normal close was skipped due to Exception</b>
  1674. }
  1675. </pre>
  1676. <p>
  1677. Closing all streams:
  1678. <br>
  1679. <pre>
  1680. try {
  1681. return IOUtils.copy(inputStream, outputStream);
  1682. } finally {
  1683. IOUtils.closeQuietly(inputStream, outputStream);
  1684. }
  1685. </pre></div>
  1686. <dl>
  1687. <dt><span class="paramLabel">Parameters:</span></dt>
  1688. <dd><code>closeables</code> - the objects to close, may be null or already closed</dd>
  1689. <dt><span class="simpleTagLabel">Since:</span></dt>
  1690. <dd>2.5</dd>
  1691. <dt><span class="seeLabel">See Also:</span></dt>
  1692. <dd><a href="../../../../org/apache/commons/io/IOUtils.html#closeQuietly-java.io.Closeable-"><code>closeQuietly(Closeable)</code></a>,
  1693. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#addSuppressed-java.lang.Throwable-" title="class or interface in java.lang"><code>Throwable.addSuppressed(java.lang.Throwable)</code></a></dd>
  1694. </dl>
  1695. </li>
  1696. </ul>
  1697. <a name="closeQuietly-java.net.Socket-">
  1698. <!-- -->
  1699. </a>
  1700. <ul class="blockList">
  1701. <li class="blockList">
  1702. <h4>closeQuietly</h4>
  1703. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  1704. public static&nbsp;void&nbsp;closeQuietly(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/Socket.html?is-external=true" title="class or interface in java.net">Socket</a>&nbsp;sock)</pre>
  1705. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">As of 2.6 removed without replacement. Please use the try-with-resources statement or handle
  1706. suppressed exceptions manually.</span></div>
  1707. <div class="block">Closes a <code>Socket</code> unconditionally.
  1708. <p>
  1709. Equivalent to <a href="http://docs.oracle.com/javase/7/docs/api/java/net/Socket.html?is-external=true#close--" title="class or interface in java.net"><code>Socket.close()</code></a>, except any exceptions will be ignored.
  1710. This is typically used in finally blocks.
  1711. <p>
  1712. Example code:
  1713. <pre>
  1714. Socket socket = null;
  1715. try {
  1716. socket = new Socket("http://www.foo.com/", 80);
  1717. // process socket
  1718. socket.close();
  1719. } catch (Exception e) {
  1720. // error handling
  1721. } finally {
  1722. IOUtils.closeQuietly(socket);
  1723. }
  1724. </pre></div>
  1725. <dl>
  1726. <dt><span class="paramLabel">Parameters:</span></dt>
  1727. <dd><code>sock</code> - the Socket to close, may be null or already closed</dd>
  1728. <dt><span class="simpleTagLabel">Since:</span></dt>
  1729. <dd>2.0</dd>
  1730. <dt><span class="seeLabel">See Also:</span></dt>
  1731. <dd><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#addSuppressed-java.lang.Throwable-" title="class or interface in java.lang"><code>Throwable.addSuppressed(java.lang.Throwable)</code></a></dd>
  1732. </dl>
  1733. </li>
  1734. </ul>
  1735. <a name="closeQuietly-java.nio.channels.Selector-">
  1736. <!-- -->
  1737. </a>
  1738. <ul class="blockList">
  1739. <li class="blockList">
  1740. <h4>closeQuietly</h4>
  1741. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  1742. public static&nbsp;void&nbsp;closeQuietly(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/channels/Selector.html?is-external=true" title="class or interface in java.nio.channels">Selector</a>&nbsp;selector)</pre>
  1743. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">As of 2.6 removed without replacement. Please use the try-with-resources statement or handle
  1744. suppressed exceptions manually.</span></div>
  1745. <div class="block">Closes a <code>Selector</code> unconditionally.
  1746. <p>
  1747. Equivalent to <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/channels/Selector.html?is-external=true#close--" title="class or interface in java.nio.channels"><code>Selector.close()</code></a>, except any exceptions will be ignored.
  1748. This is typically used in finally blocks.
  1749. <p>
  1750. Example code:
  1751. <pre>
  1752. Selector selector = null;
  1753. try {
  1754. selector = Selector.open();
  1755. // process socket
  1756. } catch (Exception e) {
  1757. // error handling
  1758. } finally {
  1759. IOUtils.closeQuietly(selector);
  1760. }
  1761. </pre></div>
  1762. <dl>
  1763. <dt><span class="paramLabel">Parameters:</span></dt>
  1764. <dd><code>selector</code> - the Selector to close, may be null or already closed</dd>
  1765. <dt><span class="simpleTagLabel">Since:</span></dt>
  1766. <dd>2.2</dd>
  1767. <dt><span class="seeLabel">See Also:</span></dt>
  1768. <dd><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#addSuppressed-java.lang.Throwable-" title="class or interface in java.lang"><code>Throwable.addSuppressed(java.lang.Throwable)</code></a></dd>
  1769. </dl>
  1770. </li>
  1771. </ul>
  1772. <a name="closeQuietly-java.net.ServerSocket-">
  1773. <!-- -->
  1774. </a>
  1775. <ul class="blockList">
  1776. <li class="blockList">
  1777. <h4>closeQuietly</h4>
  1778. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  1779. public static&nbsp;void&nbsp;closeQuietly(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/ServerSocket.html?is-external=true" title="class or interface in java.net">ServerSocket</a>&nbsp;sock)</pre>
  1780. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">As of 2.6 removed without replacement. Please use the try-with-resources statement or handle
  1781. suppressed exceptions manually.</span></div>
  1782. <div class="block">Closes a <code>ServerSocket</code> unconditionally.
  1783. <p>
  1784. Equivalent to <a href="http://docs.oracle.com/javase/7/docs/api/java/net/ServerSocket.html?is-external=true#close--" title="class or interface in java.net"><code>ServerSocket.close()</code></a>, except any exceptions will be ignored.
  1785. This is typically used in finally blocks.
  1786. <p>
  1787. Example code:
  1788. <pre>
  1789. ServerSocket socket = null;
  1790. try {
  1791. socket = new ServerSocket();
  1792. // process socket
  1793. socket.close();
  1794. } catch (Exception e) {
  1795. // error handling
  1796. } finally {
  1797. IOUtils.closeQuietly(socket);
  1798. }
  1799. </pre></div>
  1800. <dl>
  1801. <dt><span class="paramLabel">Parameters:</span></dt>
  1802. <dd><code>sock</code> - the ServerSocket to close, may be null or already closed</dd>
  1803. <dt><span class="simpleTagLabel">Since:</span></dt>
  1804. <dd>2.2</dd>
  1805. <dt><span class="seeLabel">See Also:</span></dt>
  1806. <dd><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#addSuppressed-java.lang.Throwable-" title="class or interface in java.lang"><code>Throwable.addSuppressed(java.lang.Throwable)</code></a></dd>
  1807. </dl>
  1808. </li>
  1809. </ul>
  1810. <a name="toBufferedInputStream-java.io.InputStream-">
  1811. <!-- -->
  1812. </a>
  1813. <ul class="blockList">
  1814. <li class="blockList">
  1815. <h4>toBufferedInputStream</h4>
  1816. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;toBufferedInputStream(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input)
  1817. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  1818. <div class="block">Fetches entire contents of an <code>InputStream</code> and represent
  1819. same data as result InputStream.
  1820. <p>
  1821. This method is useful where,
  1822. <ul>
  1823. <li>Source InputStream is slow.</li>
  1824. <li>It has network resources associated, so we cannot keep it open for
  1825. long time.</li>
  1826. <li>It has network timeout associated.</li>
  1827. </ul>
  1828. It can be used in favor of <a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.io.InputStream-"><code>toByteArray(InputStream)</code></a>, since it
  1829. avoids unnecessary allocation and copy of byte[].<br>
  1830. This method buffers the input internally, so there is no need to use a
  1831. <code>BufferedInputStream</code>.</div>
  1832. <dl>
  1833. <dt><span class="paramLabel">Parameters:</span></dt>
  1834. <dd><code>input</code> - Stream to be fully buffered.</dd>
  1835. <dt><span class="returnLabel">Returns:</span></dt>
  1836. <dd>A fully buffered stream.</dd>
  1837. <dt><span class="throwsLabel">Throws:</span></dt>
  1838. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  1839. <dt><span class="simpleTagLabel">Since:</span></dt>
  1840. <dd>2.0</dd>
  1841. </dl>
  1842. </li>
  1843. </ul>
  1844. <a name="toBufferedInputStream-java.io.InputStream-int-">
  1845. <!-- -->
  1846. </a>
  1847. <ul class="blockList">
  1848. <li class="blockList">
  1849. <h4>toBufferedInputStream</h4>
  1850. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;toBufferedInputStream(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  1851. int&nbsp;size)
  1852. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  1853. <div class="block">Fetches entire contents of an <code>InputStream</code> and represent
  1854. same data as result InputStream.
  1855. <p>
  1856. This method is useful where,
  1857. <ul>
  1858. <li>Source InputStream is slow.</li>
  1859. <li>It has network resources associated, so we cannot keep it open for
  1860. long time.</li>
  1861. <li>It has network timeout associated.</li>
  1862. </ul>
  1863. It can be used in favor of <a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.io.InputStream-"><code>toByteArray(InputStream)</code></a>, since it
  1864. avoids unnecessary allocation and copy of byte[].<br>
  1865. This method buffers the input internally, so there is no need to use a
  1866. <code>BufferedInputStream</code>.</div>
  1867. <dl>
  1868. <dt><span class="paramLabel">Parameters:</span></dt>
  1869. <dd><code>input</code> - Stream to be fully buffered.</dd>
  1870. <dd><code>size</code> - the initial buffer size</dd>
  1871. <dt><span class="returnLabel">Returns:</span></dt>
  1872. <dd>A fully buffered stream.</dd>
  1873. <dt><span class="throwsLabel">Throws:</span></dt>
  1874. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  1875. <dt><span class="simpleTagLabel">Since:</span></dt>
  1876. <dd>2.5</dd>
  1877. </dl>
  1878. </li>
  1879. </ul>
  1880. <a name="toBufferedReader-java.io.Reader-">
  1881. <!-- -->
  1882. </a>
  1883. <ul class="blockList">
  1884. <li class="blockList">
  1885. <h4>toBufferedReader</h4>
  1886. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io">BufferedReader</a>&nbsp;toBufferedReader(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader)</pre>
  1887. <div class="block">Returns the given reader if it is a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io"><code>BufferedReader</code></a>, otherwise creates a BufferedReader from the given
  1888. reader.</div>
  1889. <dl>
  1890. <dt><span class="paramLabel">Parameters:</span></dt>
  1891. <dd><code>reader</code> - the reader to wrap or return (not null)</dd>
  1892. <dt><span class="returnLabel">Returns:</span></dt>
  1893. <dd>the given reader or a new <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io"><code>BufferedReader</code></a> for the given reader</dd>
  1894. <dt><span class="throwsLabel">Throws:</span></dt>
  1895. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input parameter is null</dd>
  1896. <dt><span class="simpleTagLabel">Since:</span></dt>
  1897. <dd>2.2</dd>
  1898. <dt><span class="seeLabel">See Also:</span></dt>
  1899. <dd><a href="../../../../org/apache/commons/io/IOUtils.html#buffer-java.io.Reader-"><code>buffer(Reader)</code></a></dd>
  1900. </dl>
  1901. </li>
  1902. </ul>
  1903. <a name="toBufferedReader-java.io.Reader-int-">
  1904. <!-- -->
  1905. </a>
  1906. <ul class="blockList">
  1907. <li class="blockList">
  1908. <h4>toBufferedReader</h4>
  1909. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io">BufferedReader</a>&nbsp;toBufferedReader(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
  1910. int&nbsp;size)</pre>
  1911. <div class="block">Returns the given reader if it is a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io"><code>BufferedReader</code></a>, otherwise creates a BufferedReader from the given
  1912. reader.</div>
  1913. <dl>
  1914. <dt><span class="paramLabel">Parameters:</span></dt>
  1915. <dd><code>reader</code> - the reader to wrap or return (not null)</dd>
  1916. <dd><code>size</code> - the buffer size, if a new BufferedReader is created.</dd>
  1917. <dt><span class="returnLabel">Returns:</span></dt>
  1918. <dd>the given reader or a new <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io"><code>BufferedReader</code></a> for the given reader</dd>
  1919. <dt><span class="throwsLabel">Throws:</span></dt>
  1920. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input parameter is null</dd>
  1921. <dt><span class="simpleTagLabel">Since:</span></dt>
  1922. <dd>2.5</dd>
  1923. <dt><span class="seeLabel">See Also:</span></dt>
  1924. <dd><a href="../../../../org/apache/commons/io/IOUtils.html#buffer-java.io.Reader-"><code>buffer(Reader)</code></a></dd>
  1925. </dl>
  1926. </li>
  1927. </ul>
  1928. <a name="buffer-java.io.Reader-">
  1929. <!-- -->
  1930. </a>
  1931. <ul class="blockList">
  1932. <li class="blockList">
  1933. <h4>buffer</h4>
  1934. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io">BufferedReader</a>&nbsp;buffer(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader)</pre>
  1935. <div class="block">Returns the given reader if it is already a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io"><code>BufferedReader</code></a>, otherwise creates a BufferedReader from
  1936. the given reader.</div>
  1937. <dl>
  1938. <dt><span class="paramLabel">Parameters:</span></dt>
  1939. <dd><code>reader</code> - the reader to wrap or return (not null)</dd>
  1940. <dt><span class="returnLabel">Returns:</span></dt>
  1941. <dd>the given reader or a new <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io"><code>BufferedReader</code></a> for the given reader</dd>
  1942. <dt><span class="throwsLabel">Throws:</span></dt>
  1943. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input parameter is null</dd>
  1944. <dt><span class="simpleTagLabel">Since:</span></dt>
  1945. <dd>2.5</dd>
  1946. </dl>
  1947. </li>
  1948. </ul>
  1949. <a name="buffer-java.io.Reader-int-">
  1950. <!-- -->
  1951. </a>
  1952. <ul class="blockList">
  1953. <li class="blockList">
  1954. <h4>buffer</h4>
  1955. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io">BufferedReader</a>&nbsp;buffer(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader,
  1956. int&nbsp;size)</pre>
  1957. <div class="block">Returns the given reader if it is already a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io"><code>BufferedReader</code></a>, otherwise creates a BufferedReader from the
  1958. given reader.</div>
  1959. <dl>
  1960. <dt><span class="paramLabel">Parameters:</span></dt>
  1961. <dd><code>reader</code> - the reader to wrap or return (not null)</dd>
  1962. <dd><code>size</code> - the buffer size, if a new BufferedReader is created.</dd>
  1963. <dt><span class="returnLabel">Returns:</span></dt>
  1964. <dd>the given reader or a new <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html?is-external=true" title="class or interface in java.io"><code>BufferedReader</code></a> for the given reader</dd>
  1965. <dt><span class="throwsLabel">Throws:</span></dt>
  1966. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input parameter is null</dd>
  1967. <dt><span class="simpleTagLabel">Since:</span></dt>
  1968. <dd>2.5</dd>
  1969. </dl>
  1970. </li>
  1971. </ul>
  1972. <a name="buffer-java.io.Writer-">
  1973. <!-- -->
  1974. </a>
  1975. <ul class="blockList">
  1976. <li class="blockList">
  1977. <h4>buffer</h4>
  1978. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedWriter.html?is-external=true" title="class or interface in java.io">BufferedWriter</a>&nbsp;buffer(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)</pre>
  1979. <div class="block">Returns the given Writer if it is already a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedWriter.html?is-external=true" title="class or interface in java.io"><code>BufferedWriter</code></a>, otherwise creates a BufferedWriter from the
  1980. given Writer.</div>
  1981. <dl>
  1982. <dt><span class="paramLabel">Parameters:</span></dt>
  1983. <dd><code>writer</code> - the Writer to wrap or return (not null)</dd>
  1984. <dt><span class="returnLabel">Returns:</span></dt>
  1985. <dd>the given Writer or a new <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedWriter.html?is-external=true" title="class or interface in java.io"><code>BufferedWriter</code></a> for the given Writer</dd>
  1986. <dt><span class="throwsLabel">Throws:</span></dt>
  1987. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input parameter is null</dd>
  1988. <dt><span class="simpleTagLabel">Since:</span></dt>
  1989. <dd>2.5</dd>
  1990. </dl>
  1991. </li>
  1992. </ul>
  1993. <a name="buffer-java.io.Writer-int-">
  1994. <!-- -->
  1995. </a>
  1996. <ul class="blockList">
  1997. <li class="blockList">
  1998. <h4>buffer</h4>
  1999. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedWriter.html?is-external=true" title="class or interface in java.io">BufferedWriter</a>&nbsp;buffer(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer,
  2000. int&nbsp;size)</pre>
  2001. <div class="block">Returns the given Writer if it is already a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedWriter.html?is-external=true" title="class or interface in java.io"><code>BufferedWriter</code></a>, otherwise creates a BufferedWriter from the
  2002. given Writer.</div>
  2003. <dl>
  2004. <dt><span class="paramLabel">Parameters:</span></dt>
  2005. <dd><code>writer</code> - the Writer to wrap or return (not null)</dd>
  2006. <dd><code>size</code> - the buffer size, if a new BufferedWriter is created.</dd>
  2007. <dt><span class="returnLabel">Returns:</span></dt>
  2008. <dd>the given Writer or a new <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedWriter.html?is-external=true" title="class or interface in java.io"><code>BufferedWriter</code></a> for the given Writer</dd>
  2009. <dt><span class="throwsLabel">Throws:</span></dt>
  2010. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input parameter is null</dd>
  2011. <dt><span class="simpleTagLabel">Since:</span></dt>
  2012. <dd>2.5</dd>
  2013. </dl>
  2014. </li>
  2015. </ul>
  2016. <a name="buffer-java.io.OutputStream-">
  2017. <!-- -->
  2018. </a>
  2019. <ul class="blockList">
  2020. <li class="blockList">
  2021. <h4>buffer</h4>
  2022. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedOutputStream.html?is-external=true" title="class or interface in java.io">BufferedOutputStream</a>&nbsp;buffer(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;outputStream)</pre>
  2023. <div class="block">Returns the given OutputStream if it is already a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedOutputStream.html?is-external=true" title="class or interface in java.io"><code>BufferedOutputStream</code></a>, otherwise creates a
  2024. BufferedOutputStream from the given OutputStream.</div>
  2025. <dl>
  2026. <dt><span class="paramLabel">Parameters:</span></dt>
  2027. <dd><code>outputStream</code> - the OutputStream to wrap or return (not null)</dd>
  2028. <dt><span class="returnLabel">Returns:</span></dt>
  2029. <dd>the given OutputStream or a new <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedOutputStream.html?is-external=true" title="class or interface in java.io"><code>BufferedOutputStream</code></a> for the given OutputStream</dd>
  2030. <dt><span class="throwsLabel">Throws:</span></dt>
  2031. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input parameter is null</dd>
  2032. <dt><span class="simpleTagLabel">Since:</span></dt>
  2033. <dd>2.5</dd>
  2034. </dl>
  2035. </li>
  2036. </ul>
  2037. <a name="buffer-java.io.OutputStream-int-">
  2038. <!-- -->
  2039. </a>
  2040. <ul class="blockList">
  2041. <li class="blockList">
  2042. <h4>buffer</h4>
  2043. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedOutputStream.html?is-external=true" title="class or interface in java.io">BufferedOutputStream</a>&nbsp;buffer(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;outputStream,
  2044. int&nbsp;size)</pre>
  2045. <div class="block">Returns the given OutputStream if it is already a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedOutputStream.html?is-external=true" title="class or interface in java.io"><code>BufferedOutputStream</code></a>, otherwise creates a
  2046. BufferedOutputStream from the given OutputStream.</div>
  2047. <dl>
  2048. <dt><span class="paramLabel">Parameters:</span></dt>
  2049. <dd><code>outputStream</code> - the OutputStream to wrap or return (not null)</dd>
  2050. <dd><code>size</code> - the buffer size, if a new BufferedOutputStream is created.</dd>
  2051. <dt><span class="returnLabel">Returns:</span></dt>
  2052. <dd>the given OutputStream or a new <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedOutputStream.html?is-external=true" title="class or interface in java.io"><code>BufferedOutputStream</code></a> for the given OutputStream</dd>
  2053. <dt><span class="throwsLabel">Throws:</span></dt>
  2054. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input parameter is null</dd>
  2055. <dt><span class="simpleTagLabel">Since:</span></dt>
  2056. <dd>2.5</dd>
  2057. </dl>
  2058. </li>
  2059. </ul>
  2060. <a name="buffer-java.io.InputStream-">
  2061. <!-- -->
  2062. </a>
  2063. <ul class="blockList">
  2064. <li class="blockList">
  2065. <h4>buffer</h4>
  2066. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io">BufferedInputStream</a>&nbsp;buffer(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;inputStream)</pre>
  2067. <div class="block">Returns the given InputStream if it is already a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io"><code>BufferedInputStream</code></a>, otherwise creates a
  2068. BufferedInputStream from the given InputStream.</div>
  2069. <dl>
  2070. <dt><span class="paramLabel">Parameters:</span></dt>
  2071. <dd><code>inputStream</code> - the InputStream to wrap or return (not null)</dd>
  2072. <dt><span class="returnLabel">Returns:</span></dt>
  2073. <dd>the given InputStream or a new <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io"><code>BufferedInputStream</code></a> for the given InputStream</dd>
  2074. <dt><span class="throwsLabel">Throws:</span></dt>
  2075. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input parameter is null</dd>
  2076. <dt><span class="simpleTagLabel">Since:</span></dt>
  2077. <dd>2.5</dd>
  2078. </dl>
  2079. </li>
  2080. </ul>
  2081. <a name="buffer-java.io.InputStream-int-">
  2082. <!-- -->
  2083. </a>
  2084. <ul class="blockList">
  2085. <li class="blockList">
  2086. <h4>buffer</h4>
  2087. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io">BufferedInputStream</a>&nbsp;buffer(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;inputStream,
  2088. int&nbsp;size)</pre>
  2089. <div class="block">Returns the given InputStream if it is already a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io"><code>BufferedInputStream</code></a>, otherwise creates a
  2090. BufferedInputStream from the given InputStream.</div>
  2091. <dl>
  2092. <dt><span class="paramLabel">Parameters:</span></dt>
  2093. <dd><code>inputStream</code> - the InputStream to wrap or return (not null)</dd>
  2094. <dd><code>size</code> - the buffer size, if a new BufferedInputStream is created.</dd>
  2095. <dt><span class="returnLabel">Returns:</span></dt>
  2096. <dd>the given InputStream or a new <a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io"><code>BufferedInputStream</code></a> for the given InputStream</dd>
  2097. <dt><span class="throwsLabel">Throws:</span></dt>
  2098. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input parameter is null</dd>
  2099. <dt><span class="simpleTagLabel">Since:</span></dt>
  2100. <dd>2.5</dd>
  2101. </dl>
  2102. </li>
  2103. </ul>
  2104. <a name="toByteArray-java.io.InputStream-">
  2105. <!-- -->
  2106. </a>
  2107. <ul class="blockList">
  2108. <li class="blockList">
  2109. <h4>toByteArray</h4>
  2110. <pre>public static&nbsp;byte[]&nbsp;toByteArray(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input)
  2111. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2112. <div class="block">Gets the contents of an <code>InputStream</code> as a <code>byte[]</code>.
  2113. <p>
  2114. This method buffers the input internally, so there is no need to use a
  2115. <code>BufferedInputStream</code>.</div>
  2116. <dl>
  2117. <dt><span class="paramLabel">Parameters:</span></dt>
  2118. <dd><code>input</code> - the <code>InputStream</code> to read from</dd>
  2119. <dt><span class="returnLabel">Returns:</span></dt>
  2120. <dd>the requested byte array</dd>
  2121. <dt><span class="throwsLabel">Throws:</span></dt>
  2122. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
  2123. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  2124. </dl>
  2125. </li>
  2126. </ul>
  2127. <a name="toByteArray-java.io.InputStream-long-">
  2128. <!-- -->
  2129. </a>
  2130. <ul class="blockList">
  2131. <li class="blockList">
  2132. <h4>toByteArray</h4>
  2133. <pre>public static&nbsp;byte[]&nbsp;toByteArray(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  2134. long&nbsp;size)
  2135. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2136. <div class="block">Gets contents of an <code>InputStream</code> as a <code>byte[]</code>.
  2137. Use this method instead of <code>toByteArray(InputStream)</code>
  2138. when <code>InputStream</code> size is known.
  2139. <b>NOTE:</b> the method checks that the length can safely be cast to an int without truncation
  2140. before using <a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.io.InputStream-int-"><code>toByteArray(java.io.InputStream, int)</code></a> to read into the byte array.
  2141. (Arrays can have no more than Integer.MAX_VALUE entries anyway)</div>
  2142. <dl>
  2143. <dt><span class="paramLabel">Parameters:</span></dt>
  2144. <dd><code>input</code> - the <code>InputStream</code> to read from</dd>
  2145. <dd><code>size</code> - the size of <code>InputStream</code></dd>
  2146. <dt><span class="returnLabel">Returns:</span></dt>
  2147. <dd>the requested byte array</dd>
  2148. <dt><span class="throwsLabel">Throws:</span></dt>
  2149. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs or <code>InputStream</code> size differ from parameter
  2150. size</dd>
  2151. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if size is less than zero or size is greater than Integer.MAX_VALUE</dd>
  2152. <dt><span class="simpleTagLabel">Since:</span></dt>
  2153. <dd>2.1</dd>
  2154. <dt><span class="seeLabel">See Also:</span></dt>
  2155. <dd><a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.io.InputStream-int-"><code>toByteArray(java.io.InputStream, int)</code></a></dd>
  2156. </dl>
  2157. </li>
  2158. </ul>
  2159. <a name="toByteArray-java.io.InputStream-int-">
  2160. <!-- -->
  2161. </a>
  2162. <ul class="blockList">
  2163. <li class="blockList">
  2164. <h4>toByteArray</h4>
  2165. <pre>public static&nbsp;byte[]&nbsp;toByteArray(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  2166. int&nbsp;size)
  2167. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2168. <div class="block">Gets the contents of an <code>InputStream</code> as a <code>byte[]</code>.
  2169. Use this method instead of <code>toByteArray(InputStream)</code>
  2170. when <code>InputStream</code> size is known</div>
  2171. <dl>
  2172. <dt><span class="paramLabel">Parameters:</span></dt>
  2173. <dd><code>input</code> - the <code>InputStream</code> to read from</dd>
  2174. <dd><code>size</code> - the size of <code>InputStream</code></dd>
  2175. <dt><span class="returnLabel">Returns:</span></dt>
  2176. <dd>the requested byte array</dd>
  2177. <dt><span class="throwsLabel">Throws:</span></dt>
  2178. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs or <code>InputStream</code> size differ from parameter
  2179. size</dd>
  2180. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if size is less than zero</dd>
  2181. <dt><span class="simpleTagLabel">Since:</span></dt>
  2182. <dd>2.1</dd>
  2183. </dl>
  2184. </li>
  2185. </ul>
  2186. <a name="toByteArray-java.io.Reader-">
  2187. <!-- -->
  2188. </a>
  2189. <ul class="blockList">
  2190. <li class="blockList">
  2191. <h4>toByteArray</h4>
  2192. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  2193. public static&nbsp;byte[]&nbsp;toByteArray(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input)
  2194. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2195. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toByteArray-java.io.Reader-java.nio.charset.Charset-"><code>toByteArray(Reader, Charset)</code></a> instead</span></div>
  2196. <div class="block">Gets the contents of a <code>Reader</code> as a <code>byte[]</code>
  2197. using the default character encoding of the platform.
  2198. <p>
  2199. This method buffers the input internally, so there is no need to use a
  2200. <code>BufferedReader</code>.</div>
  2201. <dl>
  2202. <dt><span class="paramLabel">Parameters:</span></dt>
  2203. <dd><code>input</code> - the <code>Reader</code> to read from</dd>
  2204. <dt><span class="returnLabel">Returns:</span></dt>
  2205. <dd>the requested byte array</dd>
  2206. <dt><span class="throwsLabel">Throws:</span></dt>
  2207. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
  2208. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  2209. </dl>
  2210. </li>
  2211. </ul>
  2212. <a name="toByteArray-java.io.Reader-java.nio.charset.Charset-">
  2213. <!-- -->
  2214. </a>
  2215. <ul class="blockList">
  2216. <li class="blockList">
  2217. <h4>toByteArray</h4>
  2218. <pre>public static&nbsp;byte[]&nbsp;toByteArray(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  2219. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)
  2220. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2221. <div class="block">Gets the contents of a <code>Reader</code> as a <code>byte[]</code>
  2222. using the specified character encoding.
  2223. <p>
  2224. This method buffers the input internally, so there is no need to use a
  2225. <code>BufferedReader</code>.</div>
  2226. <dl>
  2227. <dt><span class="paramLabel">Parameters:</span></dt>
  2228. <dd><code>input</code> - the <code>Reader</code> to read from</dd>
  2229. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  2230. <dt><span class="returnLabel">Returns:</span></dt>
  2231. <dd>the requested byte array</dd>
  2232. <dt><span class="throwsLabel">Throws:</span></dt>
  2233. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
  2234. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  2235. <dt><span class="simpleTagLabel">Since:</span></dt>
  2236. <dd>2.3</dd>
  2237. </dl>
  2238. </li>
  2239. </ul>
  2240. <a name="toByteArray-java.io.Reader-java.lang.String-">
  2241. <!-- -->
  2242. </a>
  2243. <ul class="blockList">
  2244. <li class="blockList">
  2245. <h4>toByteArray</h4>
  2246. <pre>public static&nbsp;byte[]&nbsp;toByteArray(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  2247. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)
  2248. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2249. <div class="block">Gets the contents of a <code>Reader</code> as a <code>byte[]</code>
  2250. using the specified character encoding.
  2251. <p>
  2252. Character encoding names can be found at
  2253. <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
  2254. <p>
  2255. This method buffers the input internally, so there is no need to use a
  2256. <code>BufferedReader</code>.</div>
  2257. <dl>
  2258. <dt><span class="paramLabel">Parameters:</span></dt>
  2259. <dd><code>input</code> - the <code>Reader</code> to read from</dd>
  2260. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  2261. <dt><span class="returnLabel">Returns:</span></dt>
  2262. <dd>the requested byte array</dd>
  2263. <dt><span class="throwsLabel">Throws:</span></dt>
  2264. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
  2265. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  2266. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the
  2267. encoding is not supported.</dd>
  2268. <dt><span class="simpleTagLabel">Since:</span></dt>
  2269. <dd>1.1</dd>
  2270. </dl>
  2271. </li>
  2272. </ul>
  2273. <a name="toByteArray-java.lang.String-">
  2274. <!-- -->
  2275. </a>
  2276. <ul class="blockList">
  2277. <li class="blockList">
  2278. <h4>toByteArray</h4>
  2279. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  2280. public static&nbsp;byte[]&nbsp;toByteArray(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;input)
  2281. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2282. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 Use <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes--" title="class or interface in java.lang"><code>String.getBytes()</code></a> instead</span></div>
  2283. <div class="block">Gets the contents of a <code>String</code> as a <code>byte[]</code>
  2284. using the default character encoding of the platform.
  2285. <p>
  2286. This is the same as <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes--" title="class or interface in java.lang"><code>String.getBytes()</code></a>.</div>
  2287. <dl>
  2288. <dt><span class="paramLabel">Parameters:</span></dt>
  2289. <dd><code>input</code> - the <code>String</code> to convert</dd>
  2290. <dt><span class="returnLabel">Returns:</span></dt>
  2291. <dd>the requested byte array</dd>
  2292. <dt><span class="throwsLabel">Throws:</span></dt>
  2293. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
  2294. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs (never occurs)</dd>
  2295. </dl>
  2296. </li>
  2297. </ul>
  2298. <a name="toByteArray-java.net.URI-">
  2299. <!-- -->
  2300. </a>
  2301. <ul class="blockList">
  2302. <li class="blockList">
  2303. <h4>toByteArray</h4>
  2304. <pre>public static&nbsp;byte[]&nbsp;toByteArray(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a>&nbsp;uri)
  2305. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2306. <div class="block">Gets the contents of a <code>URI</code> as a <code>byte[]</code>.</div>
  2307. <dl>
  2308. <dt><span class="paramLabel">Parameters:</span></dt>
  2309. <dd><code>uri</code> - the <code>URI</code> to read</dd>
  2310. <dt><span class="returnLabel">Returns:</span></dt>
  2311. <dd>the requested byte array</dd>
  2312. <dt><span class="throwsLabel">Throws:</span></dt>
  2313. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the uri is null</dd>
  2314. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs</dd>
  2315. <dt><span class="simpleTagLabel">Since:</span></dt>
  2316. <dd>2.4</dd>
  2317. </dl>
  2318. </li>
  2319. </ul>
  2320. <a name="toByteArray-java.net.URL-">
  2321. <!-- -->
  2322. </a>
  2323. <ul class="blockList">
  2324. <li class="blockList">
  2325. <h4>toByteArray</h4>
  2326. <pre>public static&nbsp;byte[]&nbsp;toByteArray(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;url)
  2327. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2328. <div class="block">Gets the contents of a <code>URL</code> as a <code>byte[]</code>.</div>
  2329. <dl>
  2330. <dt><span class="paramLabel">Parameters:</span></dt>
  2331. <dd><code>url</code> - the <code>URL</code> to read</dd>
  2332. <dt><span class="returnLabel">Returns:</span></dt>
  2333. <dd>the requested byte array</dd>
  2334. <dt><span class="throwsLabel">Throws:</span></dt>
  2335. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
  2336. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs</dd>
  2337. <dt><span class="simpleTagLabel">Since:</span></dt>
  2338. <dd>2.4</dd>
  2339. </dl>
  2340. </li>
  2341. </ul>
  2342. <a name="toByteArray-java.net.URLConnection-">
  2343. <!-- -->
  2344. </a>
  2345. <ul class="blockList">
  2346. <li class="blockList">
  2347. <h4>toByteArray</h4>
  2348. <pre>public static&nbsp;byte[]&nbsp;toByteArray(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URLConnection.html?is-external=true" title="class or interface in java.net">URLConnection</a>&nbsp;urlConn)
  2349. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2350. <div class="block">Gets the contents of a <code>URLConnection</code> as a <code>byte[]</code>.</div>
  2351. <dl>
  2352. <dt><span class="paramLabel">Parameters:</span></dt>
  2353. <dd><code>urlConn</code> - the <code>URLConnection</code> to read</dd>
  2354. <dt><span class="returnLabel">Returns:</span></dt>
  2355. <dd>the requested byte array</dd>
  2356. <dt><span class="throwsLabel">Throws:</span></dt>
  2357. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the urlConn is null</dd>
  2358. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs</dd>
  2359. <dt><span class="simpleTagLabel">Since:</span></dt>
  2360. <dd>2.4</dd>
  2361. </dl>
  2362. </li>
  2363. </ul>
  2364. <a name="toCharArray-java.io.InputStream-">
  2365. <!-- -->
  2366. </a>
  2367. <ul class="blockList">
  2368. <li class="blockList">
  2369. <h4>toCharArray</h4>
  2370. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  2371. public static&nbsp;char[]&nbsp;toCharArray(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;is)
  2372. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2373. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toCharArray-java.io.InputStream-java.nio.charset.Charset-"><code>toCharArray(InputStream, Charset)</code></a> instead</span></div>
  2374. <div class="block">Gets the contents of an <code>InputStream</code> as a character array
  2375. using the default character encoding of the platform.
  2376. <p>
  2377. This method buffers the input internally, so there is no need to use a
  2378. <code>BufferedInputStream</code>.</div>
  2379. <dl>
  2380. <dt><span class="paramLabel">Parameters:</span></dt>
  2381. <dd><code>is</code> - the <code>InputStream</code> to read from</dd>
  2382. <dt><span class="returnLabel">Returns:</span></dt>
  2383. <dd>the requested character array</dd>
  2384. <dt><span class="throwsLabel">Throws:</span></dt>
  2385. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
  2386. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  2387. <dt><span class="simpleTagLabel">Since:</span></dt>
  2388. <dd>1.1</dd>
  2389. </dl>
  2390. </li>
  2391. </ul>
  2392. <a name="toCharArray-java.io.InputStream-java.nio.charset.Charset-">
  2393. <!-- -->
  2394. </a>
  2395. <ul class="blockList">
  2396. <li class="blockList">
  2397. <h4>toCharArray</h4>
  2398. <pre>public static&nbsp;char[]&nbsp;toCharArray(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;is,
  2399. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)
  2400. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2401. <div class="block">Gets the contents of an <code>InputStream</code> as a character array
  2402. using the specified character encoding.
  2403. <p>
  2404. This method buffers the input internally, so there is no need to use a
  2405. <code>BufferedInputStream</code>.</div>
  2406. <dl>
  2407. <dt><span class="paramLabel">Parameters:</span></dt>
  2408. <dd><code>is</code> - the <code>InputStream</code> to read from</dd>
  2409. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  2410. <dt><span class="returnLabel">Returns:</span></dt>
  2411. <dd>the requested character array</dd>
  2412. <dt><span class="throwsLabel">Throws:</span></dt>
  2413. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
  2414. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  2415. <dt><span class="simpleTagLabel">Since:</span></dt>
  2416. <dd>2.3</dd>
  2417. </dl>
  2418. </li>
  2419. </ul>
  2420. <a name="toCharArray-java.io.InputStream-java.lang.String-">
  2421. <!-- -->
  2422. </a>
  2423. <ul class="blockList">
  2424. <li class="blockList">
  2425. <h4>toCharArray</h4>
  2426. <pre>public static&nbsp;char[]&nbsp;toCharArray(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;is,
  2427. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)
  2428. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2429. <div class="block">Gets the contents of an <code>InputStream</code> as a character array
  2430. using the specified character encoding.
  2431. <p>
  2432. Character encoding names can be found at
  2433. <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
  2434. <p>
  2435. This method buffers the input internally, so there is no need to use a
  2436. <code>BufferedInputStream</code>.</div>
  2437. <dl>
  2438. <dt><span class="paramLabel">Parameters:</span></dt>
  2439. <dd><code>is</code> - the <code>InputStream</code> to read from</dd>
  2440. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  2441. <dt><span class="returnLabel">Returns:</span></dt>
  2442. <dd>the requested character array</dd>
  2443. <dt><span class="throwsLabel">Throws:</span></dt>
  2444. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
  2445. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  2446. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the
  2447. encoding is not supported.</dd>
  2448. <dt><span class="simpleTagLabel">Since:</span></dt>
  2449. <dd>1.1</dd>
  2450. </dl>
  2451. </li>
  2452. </ul>
  2453. <a name="toCharArray-java.io.Reader-">
  2454. <!-- -->
  2455. </a>
  2456. <ul class="blockList">
  2457. <li class="blockList">
  2458. <h4>toCharArray</h4>
  2459. <pre>public static&nbsp;char[]&nbsp;toCharArray(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input)
  2460. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2461. <div class="block">Gets the contents of a <code>Reader</code> as a character array.
  2462. <p>
  2463. This method buffers the input internally, so there is no need to use a
  2464. <code>BufferedReader</code>.</div>
  2465. <dl>
  2466. <dt><span class="paramLabel">Parameters:</span></dt>
  2467. <dd><code>input</code> - the <code>Reader</code> to read from</dd>
  2468. <dt><span class="returnLabel">Returns:</span></dt>
  2469. <dd>the requested character array</dd>
  2470. <dt><span class="throwsLabel">Throws:</span></dt>
  2471. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
  2472. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  2473. <dt><span class="simpleTagLabel">Since:</span></dt>
  2474. <dd>1.1</dd>
  2475. </dl>
  2476. </li>
  2477. </ul>
  2478. <a name="toString-java.io.InputStream-">
  2479. <!-- -->
  2480. </a>
  2481. <ul class="blockList">
  2482. <li class="blockList">
  2483. <h4>toString</h4>
  2484. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  2485. public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input)
  2486. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2487. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.io.InputStream-java.nio.charset.Charset-"><code>toString(InputStream, Charset)</code></a> instead</span></div>
  2488. <div class="block">Gets the contents of an <code>InputStream</code> as a String
  2489. using the default character encoding of the platform.
  2490. <p>
  2491. This method buffers the input internally, so there is no need to use a
  2492. <code>BufferedInputStream</code>.</div>
  2493. <dl>
  2494. <dt><span class="paramLabel">Parameters:</span></dt>
  2495. <dd><code>input</code> - the <code>InputStream</code> to read from</dd>
  2496. <dt><span class="returnLabel">Returns:</span></dt>
  2497. <dd>the requested String</dd>
  2498. <dt><span class="throwsLabel">Throws:</span></dt>
  2499. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
  2500. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  2501. </dl>
  2502. </li>
  2503. </ul>
  2504. <a name="toString-java.io.InputStream-java.nio.charset.Charset-">
  2505. <!-- -->
  2506. </a>
  2507. <ul class="blockList">
  2508. <li class="blockList">
  2509. <h4>toString</h4>
  2510. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  2511. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)
  2512. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2513. <div class="block">Gets the contents of an <code>InputStream</code> as a String
  2514. using the specified character encoding.
  2515. <p>
  2516. This method buffers the input internally, so there is no need to use a
  2517. <code>BufferedInputStream</code>.
  2518. </p></div>
  2519. <dl>
  2520. <dt><span class="paramLabel">Parameters:</span></dt>
  2521. <dd><code>input</code> - the <code>InputStream</code> to read from</dd>
  2522. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  2523. <dt><span class="returnLabel">Returns:</span></dt>
  2524. <dd>the requested String</dd>
  2525. <dt><span class="throwsLabel">Throws:</span></dt>
  2526. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
  2527. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  2528. <dt><span class="simpleTagLabel">Since:</span></dt>
  2529. <dd>2.3</dd>
  2530. </dl>
  2531. </li>
  2532. </ul>
  2533. <a name="toString-java.io.InputStream-java.lang.String-">
  2534. <!-- -->
  2535. </a>
  2536. <ul class="blockList">
  2537. <li class="blockList">
  2538. <h4>toString</h4>
  2539. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  2540. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)
  2541. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2542. <div class="block">Gets the contents of an <code>InputStream</code> as a String
  2543. using the specified character encoding.
  2544. <p>
  2545. Character encoding names can be found at
  2546. <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
  2547. <p>
  2548. This method buffers the input internally, so there is no need to use a
  2549. <code>BufferedInputStream</code>.</div>
  2550. <dl>
  2551. <dt><span class="paramLabel">Parameters:</span></dt>
  2552. <dd><code>input</code> - the <code>InputStream</code> to read from</dd>
  2553. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  2554. <dt><span class="returnLabel">Returns:</span></dt>
  2555. <dd>the requested String</dd>
  2556. <dt><span class="throwsLabel">Throws:</span></dt>
  2557. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
  2558. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  2559. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the
  2560. encoding is not supported.</dd>
  2561. </dl>
  2562. </li>
  2563. </ul>
  2564. <a name="toString-java.io.Reader-">
  2565. <!-- -->
  2566. </a>
  2567. <ul class="blockList">
  2568. <li class="blockList">
  2569. <h4>toString</h4>
  2570. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input)
  2571. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2572. <div class="block">Gets the contents of a <code>Reader</code> as a String.
  2573. <p>
  2574. This method buffers the input internally, so there is no need to use a
  2575. <code>BufferedReader</code>.</div>
  2576. <dl>
  2577. <dt><span class="paramLabel">Parameters:</span></dt>
  2578. <dd><code>input</code> - the <code>Reader</code> to read from</dd>
  2579. <dt><span class="returnLabel">Returns:</span></dt>
  2580. <dd>the requested String</dd>
  2581. <dt><span class="throwsLabel">Throws:</span></dt>
  2582. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
  2583. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  2584. </dl>
  2585. </li>
  2586. </ul>
  2587. <a name="toString-java.net.URI-">
  2588. <!-- -->
  2589. </a>
  2590. <ul class="blockList">
  2591. <li class="blockList">
  2592. <h4>toString</h4>
  2593. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  2594. public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a>&nbsp;uri)
  2595. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2596. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.net.URI-java.nio.charset.Charset-"><code>toString(URI, Charset)</code></a> instead</span></div>
  2597. <div class="block">Gets the contents at the given URI.</div>
  2598. <dl>
  2599. <dt><span class="paramLabel">Parameters:</span></dt>
  2600. <dd><code>uri</code> - The URI source.</dd>
  2601. <dt><span class="returnLabel">Returns:</span></dt>
  2602. <dd>The contents of the URL as a String.</dd>
  2603. <dt><span class="throwsLabel">Throws:</span></dt>
  2604. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs.</dd>
  2605. <dt><span class="simpleTagLabel">Since:</span></dt>
  2606. <dd>2.1</dd>
  2607. </dl>
  2608. </li>
  2609. </ul>
  2610. <a name="toString-java.net.URI-java.nio.charset.Charset-">
  2611. <!-- -->
  2612. </a>
  2613. <ul class="blockList">
  2614. <li class="blockList">
  2615. <h4>toString</h4>
  2616. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a>&nbsp;uri,
  2617. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)
  2618. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2619. <div class="block">Gets the contents at the given URI.</div>
  2620. <dl>
  2621. <dt><span class="paramLabel">Parameters:</span></dt>
  2622. <dd><code>uri</code> - The URI source.</dd>
  2623. <dd><code>encoding</code> - The encoding name for the URL contents.</dd>
  2624. <dt><span class="returnLabel">Returns:</span></dt>
  2625. <dd>The contents of the URL as a String.</dd>
  2626. <dt><span class="throwsLabel">Throws:</span></dt>
  2627. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs.</dd>
  2628. <dt><span class="simpleTagLabel">Since:</span></dt>
  2629. <dd>2.3.</dd>
  2630. </dl>
  2631. </li>
  2632. </ul>
  2633. <a name="toString-java.net.URI-java.lang.String-">
  2634. <!-- -->
  2635. </a>
  2636. <ul class="blockList">
  2637. <li class="blockList">
  2638. <h4>toString</h4>
  2639. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a>&nbsp;uri,
  2640. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)
  2641. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2642. <div class="block">Gets the contents at the given URI.</div>
  2643. <dl>
  2644. <dt><span class="paramLabel">Parameters:</span></dt>
  2645. <dd><code>uri</code> - The URI source.</dd>
  2646. <dd><code>encoding</code> - The encoding name for the URL contents.</dd>
  2647. <dt><span class="returnLabel">Returns:</span></dt>
  2648. <dd>The contents of the URL as a String.</dd>
  2649. <dt><span class="throwsLabel">Throws:</span></dt>
  2650. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs.</dd>
  2651. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the
  2652. encoding is not supported.</dd>
  2653. <dt><span class="simpleTagLabel">Since:</span></dt>
  2654. <dd>2.1</dd>
  2655. </dl>
  2656. </li>
  2657. </ul>
  2658. <a name="toString-java.net.URL-">
  2659. <!-- -->
  2660. </a>
  2661. <ul class="blockList">
  2662. <li class="blockList">
  2663. <h4>toString</h4>
  2664. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  2665. public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;url)
  2666. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2667. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toString-java.net.URL-java.nio.charset.Charset-"><code>toString(URL, Charset)</code></a> instead</span></div>
  2668. <div class="block">Gets the contents at the given URL.</div>
  2669. <dl>
  2670. <dt><span class="paramLabel">Parameters:</span></dt>
  2671. <dd><code>url</code> - The URL source.</dd>
  2672. <dt><span class="returnLabel">Returns:</span></dt>
  2673. <dd>The contents of the URL as a String.</dd>
  2674. <dt><span class="throwsLabel">Throws:</span></dt>
  2675. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs.</dd>
  2676. <dt><span class="simpleTagLabel">Since:</span></dt>
  2677. <dd>2.1</dd>
  2678. </dl>
  2679. </li>
  2680. </ul>
  2681. <a name="toString-java.net.URL-java.nio.charset.Charset-">
  2682. <!-- -->
  2683. </a>
  2684. <ul class="blockList">
  2685. <li class="blockList">
  2686. <h4>toString</h4>
  2687. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;url,
  2688. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)
  2689. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2690. <div class="block">Gets the contents at the given URL.</div>
  2691. <dl>
  2692. <dt><span class="paramLabel">Parameters:</span></dt>
  2693. <dd><code>url</code> - The URL source.</dd>
  2694. <dd><code>encoding</code> - The encoding name for the URL contents.</dd>
  2695. <dt><span class="returnLabel">Returns:</span></dt>
  2696. <dd>The contents of the URL as a String.</dd>
  2697. <dt><span class="throwsLabel">Throws:</span></dt>
  2698. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs.</dd>
  2699. <dt><span class="simpleTagLabel">Since:</span></dt>
  2700. <dd>2.3</dd>
  2701. </dl>
  2702. </li>
  2703. </ul>
  2704. <a name="toString-java.net.URL-java.lang.String-">
  2705. <!-- -->
  2706. </a>
  2707. <ul class="blockList">
  2708. <li class="blockList">
  2709. <h4>toString</h4>
  2710. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;url,
  2711. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)
  2712. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2713. <div class="block">Gets the contents at the given URL.</div>
  2714. <dl>
  2715. <dt><span class="paramLabel">Parameters:</span></dt>
  2716. <dd><code>url</code> - The URL source.</dd>
  2717. <dd><code>encoding</code> - The encoding name for the URL contents.</dd>
  2718. <dt><span class="returnLabel">Returns:</span></dt>
  2719. <dd>The contents of the URL as a String.</dd>
  2720. <dt><span class="throwsLabel">Throws:</span></dt>
  2721. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs.</dd>
  2722. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the
  2723. encoding is not supported.</dd>
  2724. <dt><span class="simpleTagLabel">Since:</span></dt>
  2725. <dd>2.1</dd>
  2726. </dl>
  2727. </li>
  2728. </ul>
  2729. <a name="toString-byte:A-">
  2730. <!-- -->
  2731. </a>
  2732. <ul class="blockList">
  2733. <li class="blockList">
  2734. <h4>toString</h4>
  2735. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  2736. public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(byte[]&nbsp;input)
  2737. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2738. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 Use <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#String-byte:A-" title="class or interface in java.lang"><code>String.String(byte[])</code></a> instead</span></div>
  2739. <div class="block">Gets the contents of a <code>byte[]</code> as a String
  2740. using the default character encoding of the platform.</div>
  2741. <dl>
  2742. <dt><span class="paramLabel">Parameters:</span></dt>
  2743. <dd><code>input</code> - the byte array to read from</dd>
  2744. <dt><span class="returnLabel">Returns:</span></dt>
  2745. <dd>the requested String</dd>
  2746. <dt><span class="throwsLabel">Throws:</span></dt>
  2747. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
  2748. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs (never occurs)</dd>
  2749. </dl>
  2750. </li>
  2751. </ul>
  2752. <a name="toString-byte:A-java.lang.String-">
  2753. <!-- -->
  2754. </a>
  2755. <ul class="blockList">
  2756. <li class="blockList">
  2757. <h4>toString</h4>
  2758. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(byte[]&nbsp;input,
  2759. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)
  2760. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2761. <div class="block">Gets the contents of a <code>byte[]</code> as a String
  2762. using the specified character encoding.
  2763. <p>
  2764. Character encoding names can be found at
  2765. <a href="http://www.iana.org/assignments/character-sets">IANA</a>.</div>
  2766. <dl>
  2767. <dt><span class="paramLabel">Parameters:</span></dt>
  2768. <dd><code>input</code> - the byte array to read from</dd>
  2769. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  2770. <dt><span class="returnLabel">Returns:</span></dt>
  2771. <dd>the requested String</dd>
  2772. <dt><span class="throwsLabel">Throws:</span></dt>
  2773. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
  2774. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs (never occurs)</dd>
  2775. </dl>
  2776. </li>
  2777. </ul>
  2778. <a name="resourceToString-java.lang.String-java.nio.charset.Charset-">
  2779. <!-- -->
  2780. </a>
  2781. <ul class="blockList">
  2782. <li class="blockList">
  2783. <h4>resourceToString</h4>
  2784. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;resourceToString(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
  2785. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)
  2786. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2787. <div class="block">Gets the contents of a classpath resource as a String using the
  2788. specified character encoding.
  2789. <p>
  2790. It is expected the given <code>name</code> to be absolute. The
  2791. behavior is not well-defined otherwise.
  2792. </p></div>
  2793. <dl>
  2794. <dt><span class="paramLabel">Parameters:</span></dt>
  2795. <dd><code>name</code> - name of the desired resource</dd>
  2796. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  2797. <dt><span class="returnLabel">Returns:</span></dt>
  2798. <dd>the requested String</dd>
  2799. <dt><span class="throwsLabel">Throws:</span></dt>
  2800. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  2801. <dt><span class="simpleTagLabel">Since:</span></dt>
  2802. <dd>2.6</dd>
  2803. </dl>
  2804. </li>
  2805. </ul>
  2806. <a name="resourceToString-java.lang.String-java.nio.charset.Charset-java.lang.ClassLoader-">
  2807. <!-- -->
  2808. </a>
  2809. <ul class="blockList">
  2810. <li class="blockList">
  2811. <h4>resourceToString</h4>
  2812. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;resourceToString(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
  2813. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding,
  2814. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a>&nbsp;classLoader)
  2815. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2816. <div class="block">Gets the contents of a classpath resource as a String using the
  2817. specified character encoding.
  2818. <p>
  2819. It is expected the given <code>name</code> to be absolute. The
  2820. behavior is not well-defined otherwise.
  2821. </p></div>
  2822. <dl>
  2823. <dt><span class="paramLabel">Parameters:</span></dt>
  2824. <dd><code>name</code> - name of the desired resource</dd>
  2825. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  2826. <dd><code>classLoader</code> - the class loader that the resolution of the resource is delegated to</dd>
  2827. <dt><span class="returnLabel">Returns:</span></dt>
  2828. <dd>the requested String</dd>
  2829. <dt><span class="throwsLabel">Throws:</span></dt>
  2830. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  2831. <dt><span class="simpleTagLabel">Since:</span></dt>
  2832. <dd>2.6</dd>
  2833. </dl>
  2834. </li>
  2835. </ul>
  2836. <a name="resourceToByteArray-java.lang.String-">
  2837. <!-- -->
  2838. </a>
  2839. <ul class="blockList">
  2840. <li class="blockList">
  2841. <h4>resourceToByteArray</h4>
  2842. <pre>public static&nbsp;byte[]&nbsp;resourceToByteArray(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)
  2843. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2844. <div class="block">Gets the contents of a classpath resource as a byte array.
  2845. <p>
  2846. It is expected the given <code>name</code> to be absolute. The
  2847. behavior is not well-defined otherwise.
  2848. </p></div>
  2849. <dl>
  2850. <dt><span class="paramLabel">Parameters:</span></dt>
  2851. <dd><code>name</code> - name of the desired resource</dd>
  2852. <dt><span class="returnLabel">Returns:</span></dt>
  2853. <dd>the requested byte array</dd>
  2854. <dt><span class="throwsLabel">Throws:</span></dt>
  2855. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  2856. <dt><span class="simpleTagLabel">Since:</span></dt>
  2857. <dd>2.6</dd>
  2858. </dl>
  2859. </li>
  2860. </ul>
  2861. <a name="resourceToByteArray-java.lang.String-java.lang.ClassLoader-">
  2862. <!-- -->
  2863. </a>
  2864. <ul class="blockList">
  2865. <li class="blockList">
  2866. <h4>resourceToByteArray</h4>
  2867. <pre>public static&nbsp;byte[]&nbsp;resourceToByteArray(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
  2868. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a>&nbsp;classLoader)
  2869. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2870. <div class="block">Gets the contents of a classpath resource as a byte array.
  2871. <p>
  2872. It is expected the given <code>name</code> to be absolute. The
  2873. behavior is not well-defined otherwise.
  2874. </p></div>
  2875. <dl>
  2876. <dt><span class="paramLabel">Parameters:</span></dt>
  2877. <dd><code>name</code> - name of the desired resource</dd>
  2878. <dd><code>classLoader</code> - the class loader that the resolution of the resource is delegated to</dd>
  2879. <dt><span class="returnLabel">Returns:</span></dt>
  2880. <dd>the requested byte array</dd>
  2881. <dt><span class="throwsLabel">Throws:</span></dt>
  2882. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  2883. <dt><span class="simpleTagLabel">Since:</span></dt>
  2884. <dd>2.6</dd>
  2885. </dl>
  2886. </li>
  2887. </ul>
  2888. <a name="resourceToURL-java.lang.String-">
  2889. <!-- -->
  2890. </a>
  2891. <ul class="blockList">
  2892. <li class="blockList">
  2893. <h4>resourceToURL</h4>
  2894. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;resourceToURL(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)
  2895. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2896. <div class="block">Gets a URL pointing to the given classpath resource.
  2897. <p>
  2898. It is expected the given <code>name</code> to be absolute. The
  2899. behavior is not well-defined otherwise.
  2900. </p></div>
  2901. <dl>
  2902. <dt><span class="paramLabel">Parameters:</span></dt>
  2903. <dd><code>name</code> - name of the desired resource</dd>
  2904. <dt><span class="returnLabel">Returns:</span></dt>
  2905. <dd>the requested URL</dd>
  2906. <dt><span class="throwsLabel">Throws:</span></dt>
  2907. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  2908. <dt><span class="simpleTagLabel">Since:</span></dt>
  2909. <dd>2.6</dd>
  2910. </dl>
  2911. </li>
  2912. </ul>
  2913. <a name="resourceToURL-java.lang.String-java.lang.ClassLoader-">
  2914. <!-- -->
  2915. </a>
  2916. <ul class="blockList">
  2917. <li class="blockList">
  2918. <h4>resourceToURL</h4>
  2919. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;resourceToURL(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
  2920. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a>&nbsp;classLoader)
  2921. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2922. <div class="block">Gets a URL pointing to the given classpath resource.
  2923. <p>
  2924. It is expected the given <code>name</code> to be absolute. The
  2925. behavior is not well-defined otherwise.
  2926. </p></div>
  2927. <dl>
  2928. <dt><span class="paramLabel">Parameters:</span></dt>
  2929. <dd><code>name</code> - name of the desired resource</dd>
  2930. <dd><code>classLoader</code> - the class loader that the resolution of the resource is delegated to</dd>
  2931. <dt><span class="returnLabel">Returns:</span></dt>
  2932. <dd>the requested URL</dd>
  2933. <dt><span class="throwsLabel">Throws:</span></dt>
  2934. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  2935. <dt><span class="simpleTagLabel">Since:</span></dt>
  2936. <dd>2.6</dd>
  2937. </dl>
  2938. </li>
  2939. </ul>
  2940. <a name="readLines-java.io.InputStream-">
  2941. <!-- -->
  2942. </a>
  2943. <ul class="blockList">
  2944. <li class="blockList">
  2945. <h4>readLines</h4>
  2946. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  2947. public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;readLines(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input)
  2948. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2949. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#readLines-java.io.InputStream-java.nio.charset.Charset-"><code>readLines(InputStream, Charset)</code></a> instead</span></div>
  2950. <div class="block">Gets the contents of an <code>InputStream</code> as a list of Strings,
  2951. one entry per line, using the default character encoding of the platform.
  2952. <p>
  2953. This method buffers the input internally, so there is no need to use a
  2954. <code>BufferedInputStream</code>.</div>
  2955. <dl>
  2956. <dt><span class="paramLabel">Parameters:</span></dt>
  2957. <dd><code>input</code> - the <code>InputStream</code> to read from, not null</dd>
  2958. <dt><span class="returnLabel">Returns:</span></dt>
  2959. <dd>the list of Strings, never null</dd>
  2960. <dt><span class="throwsLabel">Throws:</span></dt>
  2961. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
  2962. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  2963. <dt><span class="simpleTagLabel">Since:</span></dt>
  2964. <dd>1.1</dd>
  2965. </dl>
  2966. </li>
  2967. </ul>
  2968. <a name="readLines-java.io.InputStream-java.nio.charset.Charset-">
  2969. <!-- -->
  2970. </a>
  2971. <ul class="blockList">
  2972. <li class="blockList">
  2973. <h4>readLines</h4>
  2974. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;readLines(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  2975. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)
  2976. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2977. <div class="block">Gets the contents of an <code>InputStream</code> as a list of Strings,
  2978. one entry per line, using the specified character encoding.
  2979. <p>
  2980. This method buffers the input internally, so there is no need to use a
  2981. <code>BufferedInputStream</code>.</div>
  2982. <dl>
  2983. <dt><span class="paramLabel">Parameters:</span></dt>
  2984. <dd><code>input</code> - the <code>InputStream</code> to read from, not null</dd>
  2985. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  2986. <dt><span class="returnLabel">Returns:</span></dt>
  2987. <dd>the list of Strings, never null</dd>
  2988. <dt><span class="throwsLabel">Throws:</span></dt>
  2989. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
  2990. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  2991. <dt><span class="simpleTagLabel">Since:</span></dt>
  2992. <dd>2.3</dd>
  2993. </dl>
  2994. </li>
  2995. </ul>
  2996. <a name="readLines-java.io.InputStream-java.lang.String-">
  2997. <!-- -->
  2998. </a>
  2999. <ul class="blockList">
  3000. <li class="blockList">
  3001. <h4>readLines</h4>
  3002. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;readLines(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  3003. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)
  3004. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3005. <div class="block">Gets the contents of an <code>InputStream</code> as a list of Strings,
  3006. one entry per line, using the specified character encoding.
  3007. <p>
  3008. Character encoding names can be found at
  3009. <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
  3010. <p>
  3011. This method buffers the input internally, so there is no need to use a
  3012. <code>BufferedInputStream</code>.</div>
  3013. <dl>
  3014. <dt><span class="paramLabel">Parameters:</span></dt>
  3015. <dd><code>input</code> - the <code>InputStream</code> to read from, not null</dd>
  3016. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  3017. <dt><span class="returnLabel">Returns:</span></dt>
  3018. <dd>the list of Strings, never null</dd>
  3019. <dt><span class="throwsLabel">Throws:</span></dt>
  3020. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
  3021. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  3022. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the
  3023. encoding is not supported.</dd>
  3024. <dt><span class="simpleTagLabel">Since:</span></dt>
  3025. <dd>1.1</dd>
  3026. </dl>
  3027. </li>
  3028. </ul>
  3029. <a name="readLines-java.io.Reader-">
  3030. <!-- -->
  3031. </a>
  3032. <ul class="blockList">
  3033. <li class="blockList">
  3034. <h4>readLines</h4>
  3035. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;readLines(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input)
  3036. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3037. <div class="block">Gets the contents of a <code>Reader</code> as a list of Strings,
  3038. one entry per line.
  3039. <p>
  3040. This method buffers the input internally, so there is no need to use a
  3041. <code>BufferedReader</code>.</div>
  3042. <dl>
  3043. <dt><span class="paramLabel">Parameters:</span></dt>
  3044. <dd><code>input</code> - the <code>Reader</code> to read from, not null</dd>
  3045. <dt><span class="returnLabel">Returns:</span></dt>
  3046. <dd>the list of Strings, never null</dd>
  3047. <dt><span class="throwsLabel">Throws:</span></dt>
  3048. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
  3049. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  3050. <dt><span class="simpleTagLabel">Since:</span></dt>
  3051. <dd>1.1</dd>
  3052. </dl>
  3053. </li>
  3054. </ul>
  3055. <a name="lineIterator-java.io.Reader-">
  3056. <!-- -->
  3057. </a>
  3058. <ul class="blockList">
  3059. <li class="blockList">
  3060. <h4>lineIterator</h4>
  3061. <pre>public static&nbsp;<a href="../../../../org/apache/commons/io/LineIterator.html" title="class in org.apache.commons.io">LineIterator</a>&nbsp;lineIterator(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;reader)</pre>
  3062. <div class="block">Returns an Iterator for the lines in a <code>Reader</code>.
  3063. <p>
  3064. <code>LineIterator</code> holds a reference to the open
  3065. <code>Reader</code> specified here. When you have finished with the
  3066. iterator you should close the reader to free internal resources.
  3067. This can be done by closing the reader directly, or by calling
  3068. <a href="../../../../org/apache/commons/io/LineIterator.html#close--"><code>LineIterator.close()</code></a> or <a href="../../../../org/apache/commons/io/LineIterator.html#closeQuietly-org.apache.commons.io.LineIterator-"><code>LineIterator.closeQuietly(LineIterator)</code></a>.
  3069. <p>
  3070. The recommended usage pattern is:
  3071. <pre>
  3072. try {
  3073. LineIterator it = IOUtils.lineIterator(reader);
  3074. while (it.hasNext()) {
  3075. String line = it.nextLine();
  3076. /// do something with line
  3077. }
  3078. } finally {
  3079. IOUtils.closeQuietly(reader);
  3080. }
  3081. </pre></div>
  3082. <dl>
  3083. <dt><span class="paramLabel">Parameters:</span></dt>
  3084. <dd><code>reader</code> - the <code>Reader</code> to read from, not null</dd>
  3085. <dt><span class="returnLabel">Returns:</span></dt>
  3086. <dd>an Iterator of the lines in the reader, never null</dd>
  3087. <dt><span class="throwsLabel">Throws:</span></dt>
  3088. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the reader is null</dd>
  3089. <dt><span class="simpleTagLabel">Since:</span></dt>
  3090. <dd>1.2</dd>
  3091. </dl>
  3092. </li>
  3093. </ul>
  3094. <a name="lineIterator-java.io.InputStream-java.nio.charset.Charset-">
  3095. <!-- -->
  3096. </a>
  3097. <ul class="blockList">
  3098. <li class="blockList">
  3099. <h4>lineIterator</h4>
  3100. <pre>public static&nbsp;<a href="../../../../org/apache/commons/io/LineIterator.html" title="class in org.apache.commons.io">LineIterator</a>&nbsp;lineIterator(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  3101. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)
  3102. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3103. <div class="block">Returns an Iterator for the lines in an <code>InputStream</code>, using
  3104. the character encoding specified (or default encoding if null).
  3105. <p>
  3106. <code>LineIterator</code> holds a reference to the open
  3107. <code>InputStream</code> specified here. When you have finished with
  3108. the iterator you should close the stream to free internal resources.
  3109. This can be done by closing the stream directly, or by calling
  3110. <a href="../../../../org/apache/commons/io/LineIterator.html#close--"><code>LineIterator.close()</code></a> or <a href="../../../../org/apache/commons/io/LineIterator.html#closeQuietly-org.apache.commons.io.LineIterator-"><code>LineIterator.closeQuietly(LineIterator)</code></a>.
  3111. <p>
  3112. The recommended usage pattern is:
  3113. <pre>
  3114. try {
  3115. LineIterator it = IOUtils.lineIterator(stream, charset);
  3116. while (it.hasNext()) {
  3117. String line = it.nextLine();
  3118. /// do something with line
  3119. }
  3120. } finally {
  3121. IOUtils.closeQuietly(stream);
  3122. }
  3123. </pre></div>
  3124. <dl>
  3125. <dt><span class="paramLabel">Parameters:</span></dt>
  3126. <dd><code>input</code> - the <code>InputStream</code> to read from, not null</dd>
  3127. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  3128. <dt><span class="returnLabel">Returns:</span></dt>
  3129. <dd>an Iterator of the lines in the reader, never null</dd>
  3130. <dt><span class="throwsLabel">Throws:</span></dt>
  3131. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the input is null</dd>
  3132. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs, such as if the encoding is invalid</dd>
  3133. <dt><span class="simpleTagLabel">Since:</span></dt>
  3134. <dd>2.3</dd>
  3135. </dl>
  3136. </li>
  3137. </ul>
  3138. <a name="lineIterator-java.io.InputStream-java.lang.String-">
  3139. <!-- -->
  3140. </a>
  3141. <ul class="blockList">
  3142. <li class="blockList">
  3143. <h4>lineIterator</h4>
  3144. <pre>public static&nbsp;<a href="../../../../org/apache/commons/io/LineIterator.html" title="class in org.apache.commons.io">LineIterator</a>&nbsp;lineIterator(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  3145. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)
  3146. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3147. <div class="block">Returns an Iterator for the lines in an <code>InputStream</code>, using
  3148. the character encoding specified (or default encoding if null).
  3149. <p>
  3150. <code>LineIterator</code> holds a reference to the open
  3151. <code>InputStream</code> specified here. When you have finished with
  3152. the iterator you should close the stream to free internal resources.
  3153. This can be done by closing the stream directly, or by calling
  3154. <a href="../../../../org/apache/commons/io/LineIterator.html#close--"><code>LineIterator.close()</code></a> or <a href="../../../../org/apache/commons/io/LineIterator.html#closeQuietly-org.apache.commons.io.LineIterator-"><code>LineIterator.closeQuietly(LineIterator)</code></a>.
  3155. <p>
  3156. The recommended usage pattern is:
  3157. <pre>
  3158. try {
  3159. LineIterator it = IOUtils.lineIterator(stream, "UTF-8");
  3160. while (it.hasNext()) {
  3161. String line = it.nextLine();
  3162. /// do something with line
  3163. }
  3164. } finally {
  3165. IOUtils.closeQuietly(stream);
  3166. }
  3167. </pre></div>
  3168. <dl>
  3169. <dt><span class="paramLabel">Parameters:</span></dt>
  3170. <dd><code>input</code> - the <code>InputStream</code> to read from, not null</dd>
  3171. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  3172. <dt><span class="returnLabel">Returns:</span></dt>
  3173. <dd>an Iterator of the lines in the reader, never null</dd>
  3174. <dt><span class="throwsLabel">Throws:</span></dt>
  3175. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the input is null</dd>
  3176. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs, such as if the encoding is invalid</dd>
  3177. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the
  3178. encoding is not supported.</dd>
  3179. <dt><span class="simpleTagLabel">Since:</span></dt>
  3180. <dd>1.2</dd>
  3181. </dl>
  3182. </li>
  3183. </ul>
  3184. <a name="toInputStream-java.lang.CharSequence-">
  3185. <!-- -->
  3186. </a>
  3187. <ul class="blockList">
  3188. <li class="blockList">
  3189. <h4>toInputStream</h4>
  3190. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  3191. public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;toInputStream(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;input)</pre>
  3192. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toInputStream-java.lang.CharSequence-java.nio.charset.Charset-"><code>toInputStream(CharSequence, Charset)</code></a> instead</span></div>
  3193. <div class="block">Converts the specified CharSequence to an input stream, encoded as bytes
  3194. using the default character encoding of the platform.</div>
  3195. <dl>
  3196. <dt><span class="paramLabel">Parameters:</span></dt>
  3197. <dd><code>input</code> - the CharSequence to convert</dd>
  3198. <dt><span class="returnLabel">Returns:</span></dt>
  3199. <dd>an input stream</dd>
  3200. <dt><span class="simpleTagLabel">Since:</span></dt>
  3201. <dd>2.0</dd>
  3202. </dl>
  3203. </li>
  3204. </ul>
  3205. <a name="toInputStream-java.lang.CharSequence-java.nio.charset.Charset-">
  3206. <!-- -->
  3207. </a>
  3208. <ul class="blockList">
  3209. <li class="blockList">
  3210. <h4>toInputStream</h4>
  3211. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;toInputStream(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;input,
  3212. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)</pre>
  3213. <div class="block">Converts the specified CharSequence to an input stream, encoded as bytes
  3214. using the specified character encoding.</div>
  3215. <dl>
  3216. <dt><span class="paramLabel">Parameters:</span></dt>
  3217. <dd><code>input</code> - the CharSequence to convert</dd>
  3218. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  3219. <dt><span class="returnLabel">Returns:</span></dt>
  3220. <dd>an input stream</dd>
  3221. <dt><span class="simpleTagLabel">Since:</span></dt>
  3222. <dd>2.3</dd>
  3223. </dl>
  3224. </li>
  3225. </ul>
  3226. <a name="toInputStream-java.lang.CharSequence-java.lang.String-">
  3227. <!-- -->
  3228. </a>
  3229. <ul class="blockList">
  3230. <li class="blockList">
  3231. <h4>toInputStream</h4>
  3232. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;toInputStream(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;input,
  3233. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)
  3234. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3235. <div class="block">Converts the specified CharSequence to an input stream, encoded as bytes
  3236. using the specified character encoding.
  3237. <p>
  3238. Character encoding names can be found at
  3239. <a href="http://www.iana.org/assignments/character-sets">IANA</a>.</div>
  3240. <dl>
  3241. <dt><span class="paramLabel">Parameters:</span></dt>
  3242. <dd><code>input</code> - the CharSequence to convert</dd>
  3243. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  3244. <dt><span class="returnLabel">Returns:</span></dt>
  3245. <dd>an input stream</dd>
  3246. <dt><span class="throwsLabel">Throws:</span></dt>
  3247. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if the encoding is invalid</dd>
  3248. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the
  3249. encoding is not supported.</dd>
  3250. <dt><span class="simpleTagLabel">Since:</span></dt>
  3251. <dd>2.0</dd>
  3252. </dl>
  3253. </li>
  3254. </ul>
  3255. <a name="toInputStream-java.lang.String-">
  3256. <!-- -->
  3257. </a>
  3258. <ul class="blockList">
  3259. <li class="blockList">
  3260. <h4>toInputStream</h4>
  3261. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  3262. public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;toInputStream(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;input)</pre>
  3263. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#toInputStream-java.lang.String-java.nio.charset.Charset-"><code>toInputStream(String, Charset)</code></a> instead</span></div>
  3264. <div class="block">Converts the specified string to an input stream, encoded as bytes
  3265. using the default character encoding of the platform.</div>
  3266. <dl>
  3267. <dt><span class="paramLabel">Parameters:</span></dt>
  3268. <dd><code>input</code> - the string to convert</dd>
  3269. <dt><span class="returnLabel">Returns:</span></dt>
  3270. <dd>an input stream</dd>
  3271. <dt><span class="simpleTagLabel">Since:</span></dt>
  3272. <dd>1.1</dd>
  3273. </dl>
  3274. </li>
  3275. </ul>
  3276. <a name="toInputStream-java.lang.String-java.nio.charset.Charset-">
  3277. <!-- -->
  3278. </a>
  3279. <ul class="blockList">
  3280. <li class="blockList">
  3281. <h4>toInputStream</h4>
  3282. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;toInputStream(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;input,
  3283. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)</pre>
  3284. <div class="block">Converts the specified string to an input stream, encoded as bytes
  3285. using the specified character encoding.</div>
  3286. <dl>
  3287. <dt><span class="paramLabel">Parameters:</span></dt>
  3288. <dd><code>input</code> - the string to convert</dd>
  3289. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  3290. <dt><span class="returnLabel">Returns:</span></dt>
  3291. <dd>an input stream</dd>
  3292. <dt><span class="simpleTagLabel">Since:</span></dt>
  3293. <dd>2.3</dd>
  3294. </dl>
  3295. </li>
  3296. </ul>
  3297. <a name="toInputStream-java.lang.String-java.lang.String-">
  3298. <!-- -->
  3299. </a>
  3300. <ul class="blockList">
  3301. <li class="blockList">
  3302. <h4>toInputStream</h4>
  3303. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;toInputStream(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;input,
  3304. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)
  3305. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3306. <div class="block">Converts the specified string to an input stream, encoded as bytes
  3307. using the specified character encoding.
  3308. <p>
  3309. Character encoding names can be found at
  3310. <a href="http://www.iana.org/assignments/character-sets">IANA</a>.</div>
  3311. <dl>
  3312. <dt><span class="paramLabel">Parameters:</span></dt>
  3313. <dd><code>input</code> - the string to convert</dd>
  3314. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  3315. <dt><span class="returnLabel">Returns:</span></dt>
  3316. <dd>an input stream</dd>
  3317. <dt><span class="throwsLabel">Throws:</span></dt>
  3318. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if the encoding is invalid</dd>
  3319. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the
  3320. encoding is not supported.</dd>
  3321. <dt><span class="simpleTagLabel">Since:</span></dt>
  3322. <dd>1.1</dd>
  3323. </dl>
  3324. </li>
  3325. </ul>
  3326. <a name="write-byte:A-java.io.OutputStream-">
  3327. <!-- -->
  3328. </a>
  3329. <ul class="blockList">
  3330. <li class="blockList">
  3331. <h4>write</h4>
  3332. <pre>public static&nbsp;void&nbsp;write(byte[]&nbsp;data,
  3333. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)
  3334. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3335. <div class="block">Writes bytes from a <code>byte[]</code> to an <code>OutputStream</code>.</div>
  3336. <dl>
  3337. <dt><span class="paramLabel">Parameters:</span></dt>
  3338. <dd><code>data</code> - the byte array to write, do not modify during output,
  3339. null ignored</dd>
  3340. <dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
  3341. <dt><span class="throwsLabel">Throws:</span></dt>
  3342. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
  3343. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  3344. <dt><span class="simpleTagLabel">Since:</span></dt>
  3345. <dd>1.1</dd>
  3346. </dl>
  3347. </li>
  3348. </ul>
  3349. <a name="writeChunked-byte:A-java.io.OutputStream-">
  3350. <!-- -->
  3351. </a>
  3352. <ul class="blockList">
  3353. <li class="blockList">
  3354. <h4>writeChunked</h4>
  3355. <pre>public static&nbsp;void&nbsp;writeChunked(byte[]&nbsp;data,
  3356. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)
  3357. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3358. <div class="block">Writes bytes from a <code>byte[]</code> to an <code>OutputStream</code> using chunked writes.
  3359. This is intended for writing very large byte arrays which might otherwise cause excessive
  3360. memory usage if the native code has to allocate a copy.</div>
  3361. <dl>
  3362. <dt><span class="paramLabel">Parameters:</span></dt>
  3363. <dd><code>data</code> - the byte array to write, do not modify during output,
  3364. null ignored</dd>
  3365. <dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
  3366. <dt><span class="throwsLabel">Throws:</span></dt>
  3367. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
  3368. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  3369. <dt><span class="simpleTagLabel">Since:</span></dt>
  3370. <dd>2.5</dd>
  3371. </dl>
  3372. </li>
  3373. </ul>
  3374. <a name="write-byte:A-java.io.Writer-">
  3375. <!-- -->
  3376. </a>
  3377. <ul class="blockList">
  3378. <li class="blockList">
  3379. <h4>write</h4>
  3380. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  3381. public static&nbsp;void&nbsp;write(byte[]&nbsp;data,
  3382. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output)
  3383. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3384. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#write-byte:A-java.io.Writer-java.nio.charset.Charset-"><code>write(byte[], Writer, Charset)</code></a> instead</span></div>
  3385. <div class="block">Writes bytes from a <code>byte[]</code> to chars on a <code>Writer</code>
  3386. using the default character encoding of the platform.
  3387. <p>
  3388. This method uses <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#String-byte:A-" title="class or interface in java.lang"><code>String.String(byte[])</code></a>.</div>
  3389. <dl>
  3390. <dt><span class="paramLabel">Parameters:</span></dt>
  3391. <dd><code>data</code> - the byte array to write, do not modify during output,
  3392. null ignored</dd>
  3393. <dd><code>output</code> - the <code>Writer</code> to write to</dd>
  3394. <dt><span class="throwsLabel">Throws:</span></dt>
  3395. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
  3396. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  3397. <dt><span class="simpleTagLabel">Since:</span></dt>
  3398. <dd>1.1</dd>
  3399. </dl>
  3400. </li>
  3401. </ul>
  3402. <a name="write-byte:A-java.io.Writer-java.nio.charset.Charset-">
  3403. <!-- -->
  3404. </a>
  3405. <ul class="blockList">
  3406. <li class="blockList">
  3407. <h4>write</h4>
  3408. <pre>public static&nbsp;void&nbsp;write(byte[]&nbsp;data,
  3409. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output,
  3410. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)
  3411. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3412. <div class="block">Writes bytes from a <code>byte[]</code> to chars on a <code>Writer</code>
  3413. using the specified character encoding.
  3414. <p>
  3415. This method uses <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#String-byte:A-java.lang.String-" title="class or interface in java.lang"><code>String.String(byte[], String)</code></a>.</div>
  3416. <dl>
  3417. <dt><span class="paramLabel">Parameters:</span></dt>
  3418. <dd><code>data</code> - the byte array to write, do not modify during output,
  3419. null ignored</dd>
  3420. <dd><code>output</code> - the <code>Writer</code> to write to</dd>
  3421. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  3422. <dt><span class="throwsLabel">Throws:</span></dt>
  3423. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
  3424. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  3425. <dt><span class="simpleTagLabel">Since:</span></dt>
  3426. <dd>2.3</dd>
  3427. </dl>
  3428. </li>
  3429. </ul>
  3430. <a name="write-byte:A-java.io.Writer-java.lang.String-">
  3431. <!-- -->
  3432. </a>
  3433. <ul class="blockList">
  3434. <li class="blockList">
  3435. <h4>write</h4>
  3436. <pre>public static&nbsp;void&nbsp;write(byte[]&nbsp;data,
  3437. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output,
  3438. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)
  3439. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3440. <div class="block">Writes bytes from a <code>byte[]</code> to chars on a <code>Writer</code>
  3441. using the specified character encoding.
  3442. <p>
  3443. Character encoding names can be found at
  3444. <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
  3445. <p>
  3446. This method uses <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#String-byte:A-java.lang.String-" title="class or interface in java.lang"><code>String.String(byte[], String)</code></a>.</div>
  3447. <dl>
  3448. <dt><span class="paramLabel">Parameters:</span></dt>
  3449. <dd><code>data</code> - the byte array to write, do not modify during output,
  3450. null ignored</dd>
  3451. <dd><code>output</code> - the <code>Writer</code> to write to</dd>
  3452. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  3453. <dt><span class="throwsLabel">Throws:</span></dt>
  3454. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
  3455. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  3456. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the
  3457. encoding is not supported.</dd>
  3458. <dt><span class="simpleTagLabel">Since:</span></dt>
  3459. <dd>1.1</dd>
  3460. </dl>
  3461. </li>
  3462. </ul>
  3463. <a name="write-char:A-java.io.Writer-">
  3464. <!-- -->
  3465. </a>
  3466. <ul class="blockList">
  3467. <li class="blockList">
  3468. <h4>write</h4>
  3469. <pre>public static&nbsp;void&nbsp;write(char[]&nbsp;data,
  3470. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output)
  3471. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3472. <div class="block">Writes chars from a <code>char[]</code> to a <code>Writer</code></div>
  3473. <dl>
  3474. <dt><span class="paramLabel">Parameters:</span></dt>
  3475. <dd><code>data</code> - the char array to write, do not modify during output,
  3476. null ignored</dd>
  3477. <dd><code>output</code> - the <code>Writer</code> to write to</dd>
  3478. <dt><span class="throwsLabel">Throws:</span></dt>
  3479. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
  3480. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  3481. <dt><span class="simpleTagLabel">Since:</span></dt>
  3482. <dd>1.1</dd>
  3483. </dl>
  3484. </li>
  3485. </ul>
  3486. <a name="writeChunked-char:A-java.io.Writer-">
  3487. <!-- -->
  3488. </a>
  3489. <ul class="blockList">
  3490. <li class="blockList">
  3491. <h4>writeChunked</h4>
  3492. <pre>public static&nbsp;void&nbsp;writeChunked(char[]&nbsp;data,
  3493. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output)
  3494. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3495. <div class="block">Writes chars from a <code>char[]</code> to a <code>Writer</code> using chunked writes.
  3496. This is intended for writing very large byte arrays which might otherwise cause excessive
  3497. memory usage if the native code has to allocate a copy.</div>
  3498. <dl>
  3499. <dt><span class="paramLabel">Parameters:</span></dt>
  3500. <dd><code>data</code> - the char array to write, do not modify during output,
  3501. null ignored</dd>
  3502. <dd><code>output</code> - the <code>Writer</code> to write to</dd>
  3503. <dt><span class="throwsLabel">Throws:</span></dt>
  3504. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
  3505. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  3506. <dt><span class="simpleTagLabel">Since:</span></dt>
  3507. <dd>2.5</dd>
  3508. </dl>
  3509. </li>
  3510. </ul>
  3511. <a name="write-char:A-java.io.OutputStream-">
  3512. <!-- -->
  3513. </a>
  3514. <ul class="blockList">
  3515. <li class="blockList">
  3516. <h4>write</h4>
  3517. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  3518. public static&nbsp;void&nbsp;write(char[]&nbsp;data,
  3519. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)
  3520. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3521. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#write-char:A-java.io.OutputStream-java.nio.charset.Charset-"><code>write(char[], OutputStream, Charset)</code></a> instead</span></div>
  3522. <div class="block">Writes chars from a <code>char[]</code> to bytes on an
  3523. <code>OutputStream</code>.
  3524. <p>
  3525. This method uses <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#String-char:A-" title="class or interface in java.lang"><code>String.String(char[])</code></a> and
  3526. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes--" title="class or interface in java.lang"><code>String.getBytes()</code></a>.</div>
  3527. <dl>
  3528. <dt><span class="paramLabel">Parameters:</span></dt>
  3529. <dd><code>data</code> - the char array to write, do not modify during output,
  3530. null ignored</dd>
  3531. <dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
  3532. <dt><span class="throwsLabel">Throws:</span></dt>
  3533. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
  3534. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  3535. <dt><span class="simpleTagLabel">Since:</span></dt>
  3536. <dd>1.1</dd>
  3537. </dl>
  3538. </li>
  3539. </ul>
  3540. <a name="write-char:A-java.io.OutputStream-java.nio.charset.Charset-">
  3541. <!-- -->
  3542. </a>
  3543. <ul class="blockList">
  3544. <li class="blockList">
  3545. <h4>write</h4>
  3546. <pre>public static&nbsp;void&nbsp;write(char[]&nbsp;data,
  3547. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  3548. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)
  3549. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3550. <div class="block">Writes chars from a <code>char[]</code> to bytes on an
  3551. <code>OutputStream</code> using the specified character encoding.
  3552. <p>
  3553. This method uses <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#String-char:A-" title="class or interface in java.lang"><code>String.String(char[])</code></a> and
  3554. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.lang.String-" title="class or interface in java.lang"><code>String.getBytes(String)</code></a>.</div>
  3555. <dl>
  3556. <dt><span class="paramLabel">Parameters:</span></dt>
  3557. <dd><code>data</code> - the char array to write, do not modify during output,
  3558. null ignored</dd>
  3559. <dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
  3560. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  3561. <dt><span class="throwsLabel">Throws:</span></dt>
  3562. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
  3563. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  3564. <dt><span class="simpleTagLabel">Since:</span></dt>
  3565. <dd>2.3</dd>
  3566. </dl>
  3567. </li>
  3568. </ul>
  3569. <a name="write-char:A-java.io.OutputStream-java.lang.String-">
  3570. <!-- -->
  3571. </a>
  3572. <ul class="blockList">
  3573. <li class="blockList">
  3574. <h4>write</h4>
  3575. <pre>public static&nbsp;void&nbsp;write(char[]&nbsp;data,
  3576. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  3577. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)
  3578. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3579. <div class="block">Writes chars from a <code>char[]</code> to bytes on an
  3580. <code>OutputStream</code> using the specified character encoding.
  3581. <p>
  3582. Character encoding names can be found at
  3583. <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
  3584. <p>
  3585. This method uses <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#String-char:A-" title="class or interface in java.lang"><code>String.String(char[])</code></a> and
  3586. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.lang.String-" title="class or interface in java.lang"><code>String.getBytes(String)</code></a>.</div>
  3587. <dl>
  3588. <dt><span class="paramLabel">Parameters:</span></dt>
  3589. <dd><code>data</code> - the char array to write, do not modify during output,
  3590. null ignored</dd>
  3591. <dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
  3592. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  3593. <dt><span class="throwsLabel">Throws:</span></dt>
  3594. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
  3595. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  3596. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the encoding is not supported.</dd>
  3597. <dt><span class="simpleTagLabel">Since:</span></dt>
  3598. <dd>1.1</dd>
  3599. </dl>
  3600. </li>
  3601. </ul>
  3602. <a name="write-java.lang.CharSequence-java.io.Writer-">
  3603. <!-- -->
  3604. </a>
  3605. <ul class="blockList">
  3606. <li class="blockList">
  3607. <h4>write</h4>
  3608. <pre>public static&nbsp;void&nbsp;write(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data,
  3609. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output)
  3610. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3611. <div class="block">Writes chars from a <code>CharSequence</code> to a <code>Writer</code>.</div>
  3612. <dl>
  3613. <dt><span class="paramLabel">Parameters:</span></dt>
  3614. <dd><code>data</code> - the <code>CharSequence</code> to write, null ignored</dd>
  3615. <dd><code>output</code> - the <code>Writer</code> to write to</dd>
  3616. <dt><span class="throwsLabel">Throws:</span></dt>
  3617. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
  3618. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  3619. <dt><span class="simpleTagLabel">Since:</span></dt>
  3620. <dd>2.0</dd>
  3621. </dl>
  3622. </li>
  3623. </ul>
  3624. <a name="write-java.lang.CharSequence-java.io.OutputStream-">
  3625. <!-- -->
  3626. </a>
  3627. <ul class="blockList">
  3628. <li class="blockList">
  3629. <h4>write</h4>
  3630. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  3631. public static&nbsp;void&nbsp;write(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data,
  3632. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)
  3633. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3634. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.CharSequence-java.io.OutputStream-java.nio.charset.Charset-"><code>write(CharSequence, OutputStream, Charset)</code></a> instead</span></div>
  3635. <div class="block">Writes chars from a <code>CharSequence</code> to bytes on an
  3636. <code>OutputStream</code> using the default character encoding of the
  3637. platform.
  3638. <p>
  3639. This method uses <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes--" title="class or interface in java.lang"><code>String.getBytes()</code></a>.</div>
  3640. <dl>
  3641. <dt><span class="paramLabel">Parameters:</span></dt>
  3642. <dd><code>data</code> - the <code>CharSequence</code> to write, null ignored</dd>
  3643. <dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
  3644. <dt><span class="throwsLabel">Throws:</span></dt>
  3645. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
  3646. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  3647. <dt><span class="simpleTagLabel">Since:</span></dt>
  3648. <dd>2.0</dd>
  3649. </dl>
  3650. </li>
  3651. </ul>
  3652. <a name="write-java.lang.CharSequence-java.io.OutputStream-java.nio.charset.Charset-">
  3653. <!-- -->
  3654. </a>
  3655. <ul class="blockList">
  3656. <li class="blockList">
  3657. <h4>write</h4>
  3658. <pre>public static&nbsp;void&nbsp;write(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data,
  3659. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  3660. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)
  3661. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3662. <div class="block">Writes chars from a <code>CharSequence</code> to bytes on an
  3663. <code>OutputStream</code> using the specified character encoding.
  3664. <p>
  3665. This method uses <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.lang.String-" title="class or interface in java.lang"><code>String.getBytes(String)</code></a>.</div>
  3666. <dl>
  3667. <dt><span class="paramLabel">Parameters:</span></dt>
  3668. <dd><code>data</code> - the <code>CharSequence</code> to write, null ignored</dd>
  3669. <dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
  3670. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  3671. <dt><span class="throwsLabel">Throws:</span></dt>
  3672. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
  3673. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  3674. <dt><span class="simpleTagLabel">Since:</span></dt>
  3675. <dd>2.3</dd>
  3676. </dl>
  3677. </li>
  3678. </ul>
  3679. <a name="write-java.lang.CharSequence-java.io.OutputStream-java.lang.String-">
  3680. <!-- -->
  3681. </a>
  3682. <ul class="blockList">
  3683. <li class="blockList">
  3684. <h4>write</h4>
  3685. <pre>public static&nbsp;void&nbsp;write(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data,
  3686. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  3687. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)
  3688. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3689. <div class="block">Writes chars from a <code>CharSequence</code> to bytes on an
  3690. <code>OutputStream</code> using the specified character encoding.
  3691. <p>
  3692. Character encoding names can be found at
  3693. <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
  3694. <p>
  3695. This method uses <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.lang.String-" title="class or interface in java.lang"><code>String.getBytes(String)</code></a>.</div>
  3696. <dl>
  3697. <dt><span class="paramLabel">Parameters:</span></dt>
  3698. <dd><code>data</code> - the <code>CharSequence</code> to write, null ignored</dd>
  3699. <dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
  3700. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  3701. <dt><span class="throwsLabel">Throws:</span></dt>
  3702. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
  3703. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  3704. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the encoding is not supported.</dd>
  3705. <dt><span class="simpleTagLabel">Since:</span></dt>
  3706. <dd>2.0</dd>
  3707. </dl>
  3708. </li>
  3709. </ul>
  3710. <a name="write-java.lang.String-java.io.Writer-">
  3711. <!-- -->
  3712. </a>
  3713. <ul class="blockList">
  3714. <li class="blockList">
  3715. <h4>write</h4>
  3716. <pre>public static&nbsp;void&nbsp;write(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data,
  3717. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output)
  3718. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3719. <div class="block">Writes chars from a <code>String</code> to a <code>Writer</code>.</div>
  3720. <dl>
  3721. <dt><span class="paramLabel">Parameters:</span></dt>
  3722. <dd><code>data</code> - the <code>String</code> to write, null ignored</dd>
  3723. <dd><code>output</code> - the <code>Writer</code> to write to</dd>
  3724. <dt><span class="throwsLabel">Throws:</span></dt>
  3725. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
  3726. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  3727. <dt><span class="simpleTagLabel">Since:</span></dt>
  3728. <dd>1.1</dd>
  3729. </dl>
  3730. </li>
  3731. </ul>
  3732. <a name="write-java.lang.String-java.io.OutputStream-">
  3733. <!-- -->
  3734. </a>
  3735. <ul class="blockList">
  3736. <li class="blockList">
  3737. <h4>write</h4>
  3738. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  3739. public static&nbsp;void&nbsp;write(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data,
  3740. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)
  3741. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3742. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#write-java.lang.String-java.io.OutputStream-java.nio.charset.Charset-"><code>write(String, OutputStream, Charset)</code></a> instead</span></div>
  3743. <div class="block">Writes chars from a <code>String</code> to bytes on an
  3744. <code>OutputStream</code> using the default character encoding of the
  3745. platform.
  3746. <p>
  3747. This method uses <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes--" title="class or interface in java.lang"><code>String.getBytes()</code></a>.</div>
  3748. <dl>
  3749. <dt><span class="paramLabel">Parameters:</span></dt>
  3750. <dd><code>data</code> - the <code>String</code> to write, null ignored</dd>
  3751. <dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
  3752. <dt><span class="throwsLabel">Throws:</span></dt>
  3753. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
  3754. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  3755. <dt><span class="simpleTagLabel">Since:</span></dt>
  3756. <dd>1.1</dd>
  3757. </dl>
  3758. </li>
  3759. </ul>
  3760. <a name="write-java.lang.String-java.io.OutputStream-java.nio.charset.Charset-">
  3761. <!-- -->
  3762. </a>
  3763. <ul class="blockList">
  3764. <li class="blockList">
  3765. <h4>write</h4>
  3766. <pre>public static&nbsp;void&nbsp;write(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data,
  3767. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  3768. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)
  3769. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3770. <div class="block">Writes chars from a <code>String</code> to bytes on an
  3771. <code>OutputStream</code> using the specified character encoding.
  3772. <p>
  3773. This method uses <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.lang.String-" title="class or interface in java.lang"><code>String.getBytes(String)</code></a>.</div>
  3774. <dl>
  3775. <dt><span class="paramLabel">Parameters:</span></dt>
  3776. <dd><code>data</code> - the <code>String</code> to write, null ignored</dd>
  3777. <dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
  3778. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  3779. <dt><span class="throwsLabel">Throws:</span></dt>
  3780. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
  3781. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  3782. <dt><span class="simpleTagLabel">Since:</span></dt>
  3783. <dd>2.3</dd>
  3784. </dl>
  3785. </li>
  3786. </ul>
  3787. <a name="write-java.lang.String-java.io.OutputStream-java.lang.String-">
  3788. <!-- -->
  3789. </a>
  3790. <ul class="blockList">
  3791. <li class="blockList">
  3792. <h4>write</h4>
  3793. <pre>public static&nbsp;void&nbsp;write(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data,
  3794. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  3795. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)
  3796. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3797. <div class="block">Writes chars from a <code>String</code> to bytes on an
  3798. <code>OutputStream</code> using the specified character encoding.
  3799. <p>
  3800. Character encoding names can be found at
  3801. <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
  3802. <p>
  3803. This method uses <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.lang.String-" title="class or interface in java.lang"><code>String.getBytes(String)</code></a>.</div>
  3804. <dl>
  3805. <dt><span class="paramLabel">Parameters:</span></dt>
  3806. <dd><code>data</code> - the <code>String</code> to write, null ignored</dd>
  3807. <dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
  3808. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  3809. <dt><span class="throwsLabel">Throws:</span></dt>
  3810. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
  3811. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  3812. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the encoding is not supported.</dd>
  3813. <dt><span class="simpleTagLabel">Since:</span></dt>
  3814. <dd>1.1</dd>
  3815. </dl>
  3816. </li>
  3817. </ul>
  3818. <a name="write-java.lang.StringBuffer-java.io.Writer-">
  3819. <!-- -->
  3820. </a>
  3821. <ul class="blockList">
  3822. <li class="blockList">
  3823. <h4>write</h4>
  3824. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  3825. public static&nbsp;void&nbsp;write(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang">StringBuffer</a>&nbsp;data,
  3826. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output)
  3827. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3828. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">replaced by write(CharSequence, Writer)</span></div>
  3829. <div class="block">Writes chars from a <code>StringBuffer</code> to a <code>Writer</code>.</div>
  3830. <dl>
  3831. <dt><span class="paramLabel">Parameters:</span></dt>
  3832. <dd><code>data</code> - the <code>StringBuffer</code> to write, null ignored</dd>
  3833. <dd><code>output</code> - the <code>Writer</code> to write to</dd>
  3834. <dt><span class="throwsLabel">Throws:</span></dt>
  3835. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
  3836. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  3837. <dt><span class="simpleTagLabel">Since:</span></dt>
  3838. <dd>1.1</dd>
  3839. </dl>
  3840. </li>
  3841. </ul>
  3842. <a name="write-java.lang.StringBuffer-java.io.OutputStream-">
  3843. <!-- -->
  3844. </a>
  3845. <ul class="blockList">
  3846. <li class="blockList">
  3847. <h4>write</h4>
  3848. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  3849. public static&nbsp;void&nbsp;write(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang">StringBuffer</a>&nbsp;data,
  3850. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)
  3851. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3852. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">replaced by write(CharSequence, OutputStream)</span></div>
  3853. <div class="block">Writes chars from a <code>StringBuffer</code> to bytes on an
  3854. <code>OutputStream</code> using the default character encoding of the
  3855. platform.
  3856. <p>
  3857. This method uses <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes--" title="class or interface in java.lang"><code>String.getBytes()</code></a>.</div>
  3858. <dl>
  3859. <dt><span class="paramLabel">Parameters:</span></dt>
  3860. <dd><code>data</code> - the <code>StringBuffer</code> to write, null ignored</dd>
  3861. <dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
  3862. <dt><span class="throwsLabel">Throws:</span></dt>
  3863. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
  3864. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  3865. <dt><span class="simpleTagLabel">Since:</span></dt>
  3866. <dd>1.1</dd>
  3867. </dl>
  3868. </li>
  3869. </ul>
  3870. <a name="write-java.lang.StringBuffer-java.io.OutputStream-java.lang.String-">
  3871. <!-- -->
  3872. </a>
  3873. <ul class="blockList">
  3874. <li class="blockList">
  3875. <h4>write</h4>
  3876. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  3877. public static&nbsp;void&nbsp;write(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang">StringBuffer</a>&nbsp;data,
  3878. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  3879. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)
  3880. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3881. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">replaced by write(CharSequence, OutputStream, String)</span></div>
  3882. <div class="block">Writes chars from a <code>StringBuffer</code> to bytes on an
  3883. <code>OutputStream</code> using the specified character encoding.
  3884. <p>
  3885. Character encoding names can be found at
  3886. <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
  3887. <p>
  3888. This method uses <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.lang.String-" title="class or interface in java.lang"><code>String.getBytes(String)</code></a>.</div>
  3889. <dl>
  3890. <dt><span class="paramLabel">Parameters:</span></dt>
  3891. <dd><code>data</code> - the <code>StringBuffer</code> to write, null ignored</dd>
  3892. <dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
  3893. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  3894. <dt><span class="throwsLabel">Throws:</span></dt>
  3895. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if output is null</dd>
  3896. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  3897. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the encoding is not supported.</dd>
  3898. <dt><span class="simpleTagLabel">Since:</span></dt>
  3899. <dd>1.1</dd>
  3900. </dl>
  3901. </li>
  3902. </ul>
  3903. <a name="writeLines-java.util.Collection-java.lang.String-java.io.OutputStream-">
  3904. <!-- -->
  3905. </a>
  3906. <ul class="blockList">
  3907. <li class="blockList">
  3908. <h4>writeLines</h4>
  3909. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  3910. public static&nbsp;void&nbsp;writeLines(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
  3911. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;lineEnding,
  3912. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)
  3913. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3914. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#writeLines-java.util.Collection-java.lang.String-java.io.OutputStream-java.nio.charset.Charset-"><code>writeLines(Collection, String, OutputStream, Charset)</code></a> instead</span></div>
  3915. <div class="block">Writes the <code>toString()</code> value of each item in a collection to
  3916. an <code>OutputStream</code> line by line, using the default character
  3917. encoding of the platform and the specified line ending.</div>
  3918. <dl>
  3919. <dt><span class="paramLabel">Parameters:</span></dt>
  3920. <dd><code>lines</code> - the lines to write, null entries produce blank lines</dd>
  3921. <dd><code>lineEnding</code> - the line separator to use, null is system default</dd>
  3922. <dd><code>output</code> - the <code>OutputStream</code> to write to, not null, not closed</dd>
  3923. <dt><span class="throwsLabel">Throws:</span></dt>
  3924. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the output is null</dd>
  3925. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  3926. <dt><span class="simpleTagLabel">Since:</span></dt>
  3927. <dd>1.1</dd>
  3928. </dl>
  3929. </li>
  3930. </ul>
  3931. <a name="writeLines-java.util.Collection-java.lang.String-java.io.OutputStream-java.nio.charset.Charset-">
  3932. <!-- -->
  3933. </a>
  3934. <ul class="blockList">
  3935. <li class="blockList">
  3936. <h4>writeLines</h4>
  3937. <pre>public static&nbsp;void&nbsp;writeLines(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
  3938. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;lineEnding,
  3939. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  3940. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)
  3941. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3942. <div class="block">Writes the <code>toString()</code> value of each item in a collection to
  3943. an <code>OutputStream</code> line by line, using the specified character
  3944. encoding and the specified line ending.</div>
  3945. <dl>
  3946. <dt><span class="paramLabel">Parameters:</span></dt>
  3947. <dd><code>lines</code> - the lines to write, null entries produce blank lines</dd>
  3948. <dd><code>lineEnding</code> - the line separator to use, null is system default</dd>
  3949. <dd><code>output</code> - the <code>OutputStream</code> to write to, not null, not closed</dd>
  3950. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  3951. <dt><span class="throwsLabel">Throws:</span></dt>
  3952. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the output is null</dd>
  3953. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  3954. <dt><span class="simpleTagLabel">Since:</span></dt>
  3955. <dd>2.3</dd>
  3956. </dl>
  3957. </li>
  3958. </ul>
  3959. <a name="writeLines-java.util.Collection-java.lang.String-java.io.OutputStream-java.lang.String-">
  3960. <!-- -->
  3961. </a>
  3962. <ul class="blockList">
  3963. <li class="blockList">
  3964. <h4>writeLines</h4>
  3965. <pre>public static&nbsp;void&nbsp;writeLines(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
  3966. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;lineEnding,
  3967. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  3968. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)
  3969. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3970. <div class="block">Writes the <code>toString()</code> value of each item in a collection to
  3971. an <code>OutputStream</code> line by line, using the specified character
  3972. encoding and the specified line ending.
  3973. <p>
  3974. Character encoding names can be found at
  3975. <a href="http://www.iana.org/assignments/character-sets">IANA</a>.</div>
  3976. <dl>
  3977. <dt><span class="paramLabel">Parameters:</span></dt>
  3978. <dd><code>lines</code> - the lines to write, null entries produce blank lines</dd>
  3979. <dd><code>lineEnding</code> - the line separator to use, null is system default</dd>
  3980. <dd><code>output</code> - the <code>OutputStream</code> to write to, not null, not closed</dd>
  3981. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  3982. <dt><span class="throwsLabel">Throws:</span></dt>
  3983. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the output is null</dd>
  3984. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  3985. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the
  3986. encoding is not supported.</dd>
  3987. <dt><span class="simpleTagLabel">Since:</span></dt>
  3988. <dd>1.1</dd>
  3989. </dl>
  3990. </li>
  3991. </ul>
  3992. <a name="writeLines-java.util.Collection-java.lang.String-java.io.Writer-">
  3993. <!-- -->
  3994. </a>
  3995. <ul class="blockList">
  3996. <li class="blockList">
  3997. <h4>writeLines</h4>
  3998. <pre>public static&nbsp;void&nbsp;writeLines(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
  3999. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;lineEnding,
  4000. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer)
  4001. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4002. <div class="block">Writes the <code>toString()</code> value of each item in a collection to
  4003. a <code>Writer</code> line by line, using the specified line ending.</div>
  4004. <dl>
  4005. <dt><span class="paramLabel">Parameters:</span></dt>
  4006. <dd><code>lines</code> - the lines to write, null entries produce blank lines</dd>
  4007. <dd><code>lineEnding</code> - the line separator to use, null is system default</dd>
  4008. <dd><code>writer</code> - the <code>Writer</code> to write to, not null, not closed</dd>
  4009. <dt><span class="throwsLabel">Throws:</span></dt>
  4010. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input is null</dd>
  4011. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  4012. <dt><span class="simpleTagLabel">Since:</span></dt>
  4013. <dd>1.1</dd>
  4014. </dl>
  4015. </li>
  4016. </ul>
  4017. <a name="copy-java.io.InputStream-java.io.OutputStream-">
  4018. <!-- -->
  4019. </a>
  4020. <ul class="blockList">
  4021. <li class="blockList">
  4022. <h4>copy</h4>
  4023. <pre>public static&nbsp;int&nbsp;copy(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  4024. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)
  4025. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4026. <div class="block">Copies bytes from an <code>InputStream</code> to an
  4027. <code>OutputStream</code>.
  4028. <p>
  4029. This method buffers the input internally, so there is no need to use a
  4030. <code>BufferedInputStream</code>.
  4031. <p>
  4032. Large streams (over 2GB) will return a bytes copied value of
  4033. <code>-1</code> after the copy has completed since the correct
  4034. number of bytes cannot be returned as an int. For large streams
  4035. use the <code>copyLarge(InputStream, OutputStream)</code> method.</div>
  4036. <dl>
  4037. <dt><span class="paramLabel">Parameters:</span></dt>
  4038. <dd><code>input</code> - the <code>InputStream</code> to read from</dd>
  4039. <dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
  4040. <dt><span class="returnLabel">Returns:</span></dt>
  4041. <dd>the number of bytes copied, or -1 if &gt; Integer.MAX_VALUE</dd>
  4042. <dt><span class="throwsLabel">Throws:</span></dt>
  4043. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
  4044. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  4045. <dt><span class="simpleTagLabel">Since:</span></dt>
  4046. <dd>1.1</dd>
  4047. </dl>
  4048. </li>
  4049. </ul>
  4050. <a name="copy-java.io.InputStream-java.io.OutputStream-int-">
  4051. <!-- -->
  4052. </a>
  4053. <ul class="blockList">
  4054. <li class="blockList">
  4055. <h4>copy</h4>
  4056. <pre>public static&nbsp;long&nbsp;copy(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  4057. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  4058. int&nbsp;bufferSize)
  4059. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4060. <div class="block">Copies bytes from an <code>InputStream</code> to an <code>OutputStream</code> using an internal buffer of the
  4061. given size.
  4062. <p>
  4063. This method buffers the input internally, so there is no need to use a <code>BufferedInputStream</code>.
  4064. <p></div>
  4065. <dl>
  4066. <dt><span class="paramLabel">Parameters:</span></dt>
  4067. <dd><code>input</code> - the <code>InputStream</code> to read from</dd>
  4068. <dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
  4069. <dd><code>bufferSize</code> - the bufferSize used to copy from the input to the output</dd>
  4070. <dt><span class="returnLabel">Returns:</span></dt>
  4071. <dd>the number of bytes copied</dd>
  4072. <dt><span class="throwsLabel">Throws:</span></dt>
  4073. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
  4074. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  4075. <dt><span class="simpleTagLabel">Since:</span></dt>
  4076. <dd>2.5</dd>
  4077. </dl>
  4078. </li>
  4079. </ul>
  4080. <a name="copyLarge-java.io.InputStream-java.io.OutputStream-">
  4081. <!-- -->
  4082. </a>
  4083. <ul class="blockList">
  4084. <li class="blockList">
  4085. <h4>copyLarge</h4>
  4086. <pre>public static&nbsp;long&nbsp;copyLarge(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  4087. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)
  4088. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4089. <div class="block">Copies bytes from a large (over 2GB) <code>InputStream</code> to an
  4090. <code>OutputStream</code>.
  4091. <p>
  4092. This method buffers the input internally, so there is no need to use a
  4093. <code>BufferedInputStream</code>.
  4094. <p>
  4095. The buffer size is given by <a href="../../../../org/apache/commons/io/IOUtils.html#DEFAULT_BUFFER_SIZE"><code>DEFAULT_BUFFER_SIZE</code></a>.</div>
  4096. <dl>
  4097. <dt><span class="paramLabel">Parameters:</span></dt>
  4098. <dd><code>input</code> - the <code>InputStream</code> to read from</dd>
  4099. <dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
  4100. <dt><span class="returnLabel">Returns:</span></dt>
  4101. <dd>the number of bytes copied</dd>
  4102. <dt><span class="throwsLabel">Throws:</span></dt>
  4103. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
  4104. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  4105. <dt><span class="simpleTagLabel">Since:</span></dt>
  4106. <dd>1.3</dd>
  4107. </dl>
  4108. </li>
  4109. </ul>
  4110. <a name="copyLarge-java.io.InputStream-java.io.OutputStream-byte:A-">
  4111. <!-- -->
  4112. </a>
  4113. <ul class="blockList">
  4114. <li class="blockList">
  4115. <h4>copyLarge</h4>
  4116. <pre>public static&nbsp;long&nbsp;copyLarge(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  4117. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  4118. byte[]&nbsp;buffer)
  4119. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4120. <div class="block">Copies bytes from a large (over 2GB) <code>InputStream</code> to an
  4121. <code>OutputStream</code>.
  4122. <p>
  4123. This method uses the provided buffer, so there is no need to use a
  4124. <code>BufferedInputStream</code>.
  4125. <p></div>
  4126. <dl>
  4127. <dt><span class="paramLabel">Parameters:</span></dt>
  4128. <dd><code>input</code> - the <code>InputStream</code> to read from</dd>
  4129. <dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
  4130. <dd><code>buffer</code> - the buffer to use for the copy</dd>
  4131. <dt><span class="returnLabel">Returns:</span></dt>
  4132. <dd>the number of bytes copied</dd>
  4133. <dt><span class="throwsLabel">Throws:</span></dt>
  4134. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
  4135. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  4136. <dt><span class="simpleTagLabel">Since:</span></dt>
  4137. <dd>2.2</dd>
  4138. </dl>
  4139. </li>
  4140. </ul>
  4141. <a name="copyLarge-java.io.InputStream-java.io.OutputStream-long-long-">
  4142. <!-- -->
  4143. </a>
  4144. <ul class="blockList">
  4145. <li class="blockList">
  4146. <h4>copyLarge</h4>
  4147. <pre>public static&nbsp;long&nbsp;copyLarge(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  4148. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  4149. long&nbsp;inputOffset,
  4150. long&nbsp;length)
  4151. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4152. <div class="block">Copies some or all bytes from a large (over 2GB) <code>InputStream</code> to an
  4153. <code>OutputStream</code>, optionally skipping input bytes.
  4154. <p>
  4155. This method buffers the input internally, so there is no need to use a
  4156. <code>BufferedInputStream</code>.
  4157. </p>
  4158. <p>
  4159. Note that the implementation uses <a href="../../../../org/apache/commons/io/IOUtils.html#skip-java.io.InputStream-long-"><code>skip(InputStream, long)</code></a>.
  4160. This means that the method may be considerably less efficient than using the actual skip implementation,
  4161. this is done to guarantee that the correct number of characters are skipped.
  4162. </p>
  4163. The buffer size is given by <a href="../../../../org/apache/commons/io/IOUtils.html#DEFAULT_BUFFER_SIZE"><code>DEFAULT_BUFFER_SIZE</code></a>.</div>
  4164. <dl>
  4165. <dt><span class="paramLabel">Parameters:</span></dt>
  4166. <dd><code>input</code> - the <code>InputStream</code> to read from</dd>
  4167. <dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
  4168. <dd><code>inputOffset</code> - : number of bytes to skip from input before copying
  4169. -ve values are ignored</dd>
  4170. <dd><code>length</code> - : number of bytes to copy. -ve means all</dd>
  4171. <dt><span class="returnLabel">Returns:</span></dt>
  4172. <dd>the number of bytes copied</dd>
  4173. <dt><span class="throwsLabel">Throws:</span></dt>
  4174. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
  4175. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  4176. <dt><span class="simpleTagLabel">Since:</span></dt>
  4177. <dd>2.2</dd>
  4178. </dl>
  4179. </li>
  4180. </ul>
  4181. <a name="copyLarge-java.io.InputStream-java.io.OutputStream-long-long-byte:A-">
  4182. <!-- -->
  4183. </a>
  4184. <ul class="blockList">
  4185. <li class="blockList">
  4186. <h4>copyLarge</h4>
  4187. <pre>public static&nbsp;long&nbsp;copyLarge(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  4188. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  4189. long&nbsp;inputOffset,
  4190. long&nbsp;length,
  4191. byte[]&nbsp;buffer)
  4192. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4193. <div class="block">Copies some or all bytes from a large (over 2GB) <code>InputStream</code> to an
  4194. <code>OutputStream</code>, optionally skipping input bytes.
  4195. <p>
  4196. This method uses the provided buffer, so there is no need to use a
  4197. <code>BufferedInputStream</code>.
  4198. </p>
  4199. <p>
  4200. Note that the implementation uses <a href="../../../../org/apache/commons/io/IOUtils.html#skip-java.io.InputStream-long-"><code>skip(InputStream, long)</code></a>.
  4201. This means that the method may be considerably less efficient than using the actual skip implementation,
  4202. this is done to guarantee that the correct number of characters are skipped.
  4203. </p></div>
  4204. <dl>
  4205. <dt><span class="paramLabel">Parameters:</span></dt>
  4206. <dd><code>input</code> - the <code>InputStream</code> to read from</dd>
  4207. <dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
  4208. <dd><code>inputOffset</code> - : number of bytes to skip from input before copying
  4209. -ve values are ignored</dd>
  4210. <dd><code>length</code> - : number of bytes to copy. -ve means all</dd>
  4211. <dd><code>buffer</code> - the buffer to use for the copy</dd>
  4212. <dt><span class="returnLabel">Returns:</span></dt>
  4213. <dd>the number of bytes copied</dd>
  4214. <dt><span class="throwsLabel">Throws:</span></dt>
  4215. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
  4216. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  4217. <dt><span class="simpleTagLabel">Since:</span></dt>
  4218. <dd>2.2</dd>
  4219. </dl>
  4220. </li>
  4221. </ul>
  4222. <a name="copy-java.io.InputStream-java.io.Writer-">
  4223. <!-- -->
  4224. </a>
  4225. <ul class="blockList">
  4226. <li class="blockList">
  4227. <h4>copy</h4>
  4228. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  4229. public static&nbsp;void&nbsp;copy(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  4230. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output)
  4231. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4232. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.InputStream-java.io.Writer-java.nio.charset.Charset-"><code>copy(InputStream, Writer, Charset)</code></a> instead</span></div>
  4233. <div class="block">Copies bytes from an <code>InputStream</code> to chars on a
  4234. <code>Writer</code> using the default character encoding of the platform.
  4235. <p>
  4236. This method buffers the input internally, so there is no need to use a
  4237. <code>BufferedInputStream</code>.
  4238. <p>
  4239. This method uses <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStreamReader.html?is-external=true" title="class or interface in java.io"><code>InputStreamReader</code></a>.</div>
  4240. <dl>
  4241. <dt><span class="paramLabel">Parameters:</span></dt>
  4242. <dd><code>input</code> - the <code>InputStream</code> to read from</dd>
  4243. <dd><code>output</code> - the <code>Writer</code> to write to</dd>
  4244. <dt><span class="throwsLabel">Throws:</span></dt>
  4245. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
  4246. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  4247. <dt><span class="simpleTagLabel">Since:</span></dt>
  4248. <dd>1.1</dd>
  4249. </dl>
  4250. </li>
  4251. </ul>
  4252. <a name="copy-java.io.InputStream-java.io.Writer-java.nio.charset.Charset-">
  4253. <!-- -->
  4254. </a>
  4255. <ul class="blockList">
  4256. <li class="blockList">
  4257. <h4>copy</h4>
  4258. <pre>public static&nbsp;void&nbsp;copy(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  4259. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output,
  4260. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;inputEncoding)
  4261. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4262. <div class="block">Copies bytes from an <code>InputStream</code> to chars on a
  4263. <code>Writer</code> using the specified character encoding.
  4264. <p>
  4265. This method buffers the input internally, so there is no need to use a
  4266. <code>BufferedInputStream</code>.
  4267. <p>
  4268. This method uses <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStreamReader.html?is-external=true" title="class or interface in java.io"><code>InputStreamReader</code></a>.</div>
  4269. <dl>
  4270. <dt><span class="paramLabel">Parameters:</span></dt>
  4271. <dd><code>input</code> - the <code>InputStream</code> to read from</dd>
  4272. <dd><code>output</code> - the <code>Writer</code> to write to</dd>
  4273. <dd><code>inputEncoding</code> - the encoding to use for the input stream, null means platform default</dd>
  4274. <dt><span class="throwsLabel">Throws:</span></dt>
  4275. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
  4276. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  4277. <dt><span class="simpleTagLabel">Since:</span></dt>
  4278. <dd>2.3</dd>
  4279. </dl>
  4280. </li>
  4281. </ul>
  4282. <a name="copy-java.io.InputStream-java.io.Writer-java.lang.String-">
  4283. <!-- -->
  4284. </a>
  4285. <ul class="blockList">
  4286. <li class="blockList">
  4287. <h4>copy</h4>
  4288. <pre>public static&nbsp;void&nbsp;copy(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  4289. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output,
  4290. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;inputEncoding)
  4291. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4292. <div class="block">Copies bytes from an <code>InputStream</code> to chars on a
  4293. <code>Writer</code> using the specified character encoding.
  4294. <p>
  4295. This method buffers the input internally, so there is no need to use a
  4296. <code>BufferedInputStream</code>.
  4297. <p>
  4298. Character encoding names can be found at
  4299. <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
  4300. <p>
  4301. This method uses <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStreamReader.html?is-external=true" title="class or interface in java.io"><code>InputStreamReader</code></a>.</div>
  4302. <dl>
  4303. <dt><span class="paramLabel">Parameters:</span></dt>
  4304. <dd><code>input</code> - the <code>InputStream</code> to read from</dd>
  4305. <dd><code>output</code> - the <code>Writer</code> to write to</dd>
  4306. <dd><code>inputEncoding</code> - the encoding to use for the InputStream, null means platform default</dd>
  4307. <dt><span class="throwsLabel">Throws:</span></dt>
  4308. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
  4309. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  4310. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the
  4311. encoding is not supported.</dd>
  4312. <dt><span class="simpleTagLabel">Since:</span></dt>
  4313. <dd>1.1</dd>
  4314. </dl>
  4315. </li>
  4316. </ul>
  4317. <a name="copy-java.io.Reader-java.io.Writer-">
  4318. <!-- -->
  4319. </a>
  4320. <ul class="blockList">
  4321. <li class="blockList">
  4322. <h4>copy</h4>
  4323. <pre>public static&nbsp;int&nbsp;copy(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  4324. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output)
  4325. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4326. <div class="block">Copies chars from a <code>Reader</code> to a <code>Writer</code>.
  4327. <p>
  4328. This method buffers the input internally, so there is no need to use a
  4329. <code>BufferedReader</code>.
  4330. <p>
  4331. Large streams (over 2GB) will return a chars copied value of
  4332. <code>-1</code> after the copy has completed since the correct
  4333. number of chars cannot be returned as an int. For large streams
  4334. use the <code>copyLarge(Reader, Writer)</code> method.</div>
  4335. <dl>
  4336. <dt><span class="paramLabel">Parameters:</span></dt>
  4337. <dd><code>input</code> - the <code>Reader</code> to read from</dd>
  4338. <dd><code>output</code> - the <code>Writer</code> to write to</dd>
  4339. <dt><span class="returnLabel">Returns:</span></dt>
  4340. <dd>the number of characters copied, or -1 if &gt; Integer.MAX_VALUE</dd>
  4341. <dt><span class="throwsLabel">Throws:</span></dt>
  4342. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
  4343. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  4344. <dt><span class="simpleTagLabel">Since:</span></dt>
  4345. <dd>1.1</dd>
  4346. </dl>
  4347. </li>
  4348. </ul>
  4349. <a name="copyLarge-java.io.Reader-java.io.Writer-">
  4350. <!-- -->
  4351. </a>
  4352. <ul class="blockList">
  4353. <li class="blockList">
  4354. <h4>copyLarge</h4>
  4355. <pre>public static&nbsp;long&nbsp;copyLarge(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  4356. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output)
  4357. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4358. <div class="block">Copies chars from a large (over 2GB) <code>Reader</code> to a <code>Writer</code>.
  4359. <p>
  4360. This method buffers the input internally, so there is no need to use a
  4361. <code>BufferedReader</code>.
  4362. <p>
  4363. The buffer size is given by <a href="../../../../org/apache/commons/io/IOUtils.html#DEFAULT_BUFFER_SIZE"><code>DEFAULT_BUFFER_SIZE</code></a>.</div>
  4364. <dl>
  4365. <dt><span class="paramLabel">Parameters:</span></dt>
  4366. <dd><code>input</code> - the <code>Reader</code> to read from</dd>
  4367. <dd><code>output</code> - the <code>Writer</code> to write to</dd>
  4368. <dt><span class="returnLabel">Returns:</span></dt>
  4369. <dd>the number of characters copied</dd>
  4370. <dt><span class="throwsLabel">Throws:</span></dt>
  4371. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
  4372. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  4373. <dt><span class="simpleTagLabel">Since:</span></dt>
  4374. <dd>1.3</dd>
  4375. </dl>
  4376. </li>
  4377. </ul>
  4378. <a name="copyLarge-java.io.Reader-java.io.Writer-char:A-">
  4379. <!-- -->
  4380. </a>
  4381. <ul class="blockList">
  4382. <li class="blockList">
  4383. <h4>copyLarge</h4>
  4384. <pre>public static&nbsp;long&nbsp;copyLarge(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  4385. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output,
  4386. char[]&nbsp;buffer)
  4387. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4388. <div class="block">Copies chars from a large (over 2GB) <code>Reader</code> to a <code>Writer</code>.
  4389. <p>
  4390. This method uses the provided buffer, so there is no need to use a
  4391. <code>BufferedReader</code>.
  4392. <p></div>
  4393. <dl>
  4394. <dt><span class="paramLabel">Parameters:</span></dt>
  4395. <dd><code>input</code> - the <code>Reader</code> to read from</dd>
  4396. <dd><code>output</code> - the <code>Writer</code> to write to</dd>
  4397. <dd><code>buffer</code> - the buffer to be used for the copy</dd>
  4398. <dt><span class="returnLabel">Returns:</span></dt>
  4399. <dd>the number of characters copied</dd>
  4400. <dt><span class="throwsLabel">Throws:</span></dt>
  4401. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
  4402. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  4403. <dt><span class="simpleTagLabel">Since:</span></dt>
  4404. <dd>2.2</dd>
  4405. </dl>
  4406. </li>
  4407. </ul>
  4408. <a name="copyLarge-java.io.Reader-java.io.Writer-long-long-">
  4409. <!-- -->
  4410. </a>
  4411. <ul class="blockList">
  4412. <li class="blockList">
  4413. <h4>copyLarge</h4>
  4414. <pre>public static&nbsp;long&nbsp;copyLarge(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  4415. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output,
  4416. long&nbsp;inputOffset,
  4417. long&nbsp;length)
  4418. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4419. <div class="block">Copies some or all chars from a large (over 2GB) <code>InputStream</code> to an
  4420. <code>OutputStream</code>, optionally skipping input chars.
  4421. <p>
  4422. This method buffers the input internally, so there is no need to use a
  4423. <code>BufferedReader</code>.
  4424. <p>
  4425. The buffer size is given by <a href="../../../../org/apache/commons/io/IOUtils.html#DEFAULT_BUFFER_SIZE"><code>DEFAULT_BUFFER_SIZE</code></a>.</div>
  4426. <dl>
  4427. <dt><span class="paramLabel">Parameters:</span></dt>
  4428. <dd><code>input</code> - the <code>Reader</code> to read from</dd>
  4429. <dd><code>output</code> - the <code>Writer</code> to write to</dd>
  4430. <dd><code>inputOffset</code> - : number of chars to skip from input before copying
  4431. -ve values are ignored</dd>
  4432. <dd><code>length</code> - : number of chars to copy. -ve means all</dd>
  4433. <dt><span class="returnLabel">Returns:</span></dt>
  4434. <dd>the number of chars copied</dd>
  4435. <dt><span class="throwsLabel">Throws:</span></dt>
  4436. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
  4437. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  4438. <dt><span class="simpleTagLabel">Since:</span></dt>
  4439. <dd>2.2</dd>
  4440. </dl>
  4441. </li>
  4442. </ul>
  4443. <a name="copyLarge-java.io.Reader-java.io.Writer-long-long-char:A-">
  4444. <!-- -->
  4445. </a>
  4446. <ul class="blockList">
  4447. <li class="blockList">
  4448. <h4>copyLarge</h4>
  4449. <pre>public static&nbsp;long&nbsp;copyLarge(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  4450. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;output,
  4451. long&nbsp;inputOffset,
  4452. long&nbsp;length,
  4453. char[]&nbsp;buffer)
  4454. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4455. <div class="block">Copies some or all chars from a large (over 2GB) <code>InputStream</code> to an
  4456. <code>OutputStream</code>, optionally skipping input chars.
  4457. <p>
  4458. This method uses the provided buffer, so there is no need to use a
  4459. <code>BufferedReader</code>.
  4460. <p></div>
  4461. <dl>
  4462. <dt><span class="paramLabel">Parameters:</span></dt>
  4463. <dd><code>input</code> - the <code>Reader</code> to read from</dd>
  4464. <dd><code>output</code> - the <code>Writer</code> to write to</dd>
  4465. <dd><code>inputOffset</code> - : number of chars to skip from input before copying
  4466. -ve values are ignored</dd>
  4467. <dd><code>length</code> - : number of chars to copy. -ve means all</dd>
  4468. <dd><code>buffer</code> - the buffer to be used for the copy</dd>
  4469. <dt><span class="returnLabel">Returns:</span></dt>
  4470. <dd>the number of chars copied</dd>
  4471. <dt><span class="throwsLabel">Throws:</span></dt>
  4472. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
  4473. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  4474. <dt><span class="simpleTagLabel">Since:</span></dt>
  4475. <dd>2.2</dd>
  4476. </dl>
  4477. </li>
  4478. </ul>
  4479. <a name="copy-java.io.Reader-java.io.OutputStream-">
  4480. <!-- -->
  4481. </a>
  4482. <ul class="blockList">
  4483. <li class="blockList">
  4484. <h4>copy</h4>
  4485. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  4486. public static&nbsp;void&nbsp;copy(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  4487. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)
  4488. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4489. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/IOUtils.html#copy-java.io.Reader-java.io.OutputStream-java.nio.charset.Charset-"><code>copy(Reader, OutputStream, Charset)</code></a> instead</span></div>
  4490. <div class="block">Copies chars from a <code>Reader</code> to bytes on an
  4491. <code>OutputStream</code> using the default character encoding of the
  4492. platform, and calling flush.
  4493. <p>
  4494. This method buffers the input internally, so there is no need to use a
  4495. <code>BufferedReader</code>.
  4496. <p>
  4497. Due to the implementation of OutputStreamWriter, this method performs a
  4498. flush.
  4499. <p>
  4500. This method uses <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStreamWriter.html?is-external=true" title="class or interface in java.io"><code>OutputStreamWriter</code></a>.</div>
  4501. <dl>
  4502. <dt><span class="paramLabel">Parameters:</span></dt>
  4503. <dd><code>input</code> - the <code>Reader</code> to read from</dd>
  4504. <dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
  4505. <dt><span class="throwsLabel">Throws:</span></dt>
  4506. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
  4507. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  4508. <dt><span class="simpleTagLabel">Since:</span></dt>
  4509. <dd>1.1</dd>
  4510. </dl>
  4511. </li>
  4512. </ul>
  4513. <a name="copy-java.io.Reader-java.io.OutputStream-java.nio.charset.Charset-">
  4514. <!-- -->
  4515. </a>
  4516. <ul class="blockList">
  4517. <li class="blockList">
  4518. <h4>copy</h4>
  4519. <pre>public static&nbsp;void&nbsp;copy(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  4520. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  4521. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;outputEncoding)
  4522. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4523. <div class="block">Copies chars from a <code>Reader</code> to bytes on an
  4524. <code>OutputStream</code> using the specified character encoding, and
  4525. calling flush.
  4526. <p>
  4527. This method buffers the input internally, so there is no need to use a
  4528. <code>BufferedReader</code>.
  4529. </p>
  4530. <p>
  4531. Due to the implementation of OutputStreamWriter, this method performs a
  4532. flush.
  4533. </p>
  4534. <p>
  4535. This method uses <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStreamWriter.html?is-external=true" title="class or interface in java.io"><code>OutputStreamWriter</code></a>.
  4536. </p></div>
  4537. <dl>
  4538. <dt><span class="paramLabel">Parameters:</span></dt>
  4539. <dd><code>input</code> - the <code>Reader</code> to read from</dd>
  4540. <dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
  4541. <dd><code>outputEncoding</code> - the encoding to use for the OutputStream, null means platform default</dd>
  4542. <dt><span class="throwsLabel">Throws:</span></dt>
  4543. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
  4544. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  4545. <dt><span class="simpleTagLabel">Since:</span></dt>
  4546. <dd>2.3</dd>
  4547. </dl>
  4548. </li>
  4549. </ul>
  4550. <a name="copy-java.io.Reader-java.io.OutputStream-java.lang.String-">
  4551. <!-- -->
  4552. </a>
  4553. <ul class="blockList">
  4554. <li class="blockList">
  4555. <h4>copy</h4>
  4556. <pre>public static&nbsp;void&nbsp;copy(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  4557. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
  4558. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;outputEncoding)
  4559. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4560. <div class="block">Copies chars from a <code>Reader</code> to bytes on an
  4561. <code>OutputStream</code> using the specified character encoding, and
  4562. calling flush.
  4563. <p>
  4564. This method buffers the input internally, so there is no need to use a
  4565. <code>BufferedReader</code>.
  4566. <p>
  4567. Character encoding names can be found at
  4568. <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
  4569. <p>
  4570. Due to the implementation of OutputStreamWriter, this method performs a
  4571. flush.
  4572. <p>
  4573. This method uses <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStreamWriter.html?is-external=true" title="class or interface in java.io"><code>OutputStreamWriter</code></a>.</div>
  4574. <dl>
  4575. <dt><span class="paramLabel">Parameters:</span></dt>
  4576. <dd><code>input</code> - the <code>Reader</code> to read from</dd>
  4577. <dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
  4578. <dd><code>outputEncoding</code> - the encoding to use for the OutputStream, null means platform default</dd>
  4579. <dt><span class="throwsLabel">Throws:</span></dt>
  4580. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
  4581. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  4582. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the
  4583. encoding is not supported.</dd>
  4584. <dt><span class="simpleTagLabel">Since:</span></dt>
  4585. <dd>1.1</dd>
  4586. </dl>
  4587. </li>
  4588. </ul>
  4589. <a name="contentEquals-java.io.InputStream-java.io.InputStream-">
  4590. <!-- -->
  4591. </a>
  4592. <ul class="blockList">
  4593. <li class="blockList">
  4594. <h4>contentEquals</h4>
  4595. <pre>public static&nbsp;boolean&nbsp;contentEquals(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input1,
  4596. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input2)
  4597. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4598. <div class="block">Compares the contents of two Streams to determine if they are equal or
  4599. not.
  4600. <p>
  4601. This method buffers the input internally using
  4602. <code>BufferedInputStream</code> if they are not already buffered.</div>
  4603. <dl>
  4604. <dt><span class="paramLabel">Parameters:</span></dt>
  4605. <dd><code>input1</code> - the first stream</dd>
  4606. <dd><code>input2</code> - the second stream</dd>
  4607. <dt><span class="returnLabel">Returns:</span></dt>
  4608. <dd>true if the content of the streams are equal or they both don't
  4609. exist, false otherwise</dd>
  4610. <dt><span class="throwsLabel">Throws:</span></dt>
  4611. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if either input is null</dd>
  4612. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  4613. </dl>
  4614. </li>
  4615. </ul>
  4616. <a name="contentEquals-java.io.Reader-java.io.Reader-">
  4617. <!-- -->
  4618. </a>
  4619. <ul class="blockList">
  4620. <li class="blockList">
  4621. <h4>contentEquals</h4>
  4622. <pre>public static&nbsp;boolean&nbsp;contentEquals(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input1,
  4623. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input2)
  4624. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4625. <div class="block">Compares the contents of two Readers to determine if they are equal or
  4626. not.
  4627. <p>
  4628. This method buffers the input internally using
  4629. <code>BufferedReader</code> if they are not already buffered.</div>
  4630. <dl>
  4631. <dt><span class="paramLabel">Parameters:</span></dt>
  4632. <dd><code>input1</code> - the first reader</dd>
  4633. <dd><code>input2</code> - the second reader</dd>
  4634. <dt><span class="returnLabel">Returns:</span></dt>
  4635. <dd>true if the content of the readers are equal or they both don't
  4636. exist, false otherwise</dd>
  4637. <dt><span class="throwsLabel">Throws:</span></dt>
  4638. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if either input is null</dd>
  4639. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  4640. <dt><span class="simpleTagLabel">Since:</span></dt>
  4641. <dd>1.1</dd>
  4642. </dl>
  4643. </li>
  4644. </ul>
  4645. <a name="contentEqualsIgnoreEOL-java.io.Reader-java.io.Reader-">
  4646. <!-- -->
  4647. </a>
  4648. <ul class="blockList">
  4649. <li class="blockList">
  4650. <h4>contentEqualsIgnoreEOL</h4>
  4651. <pre>public static&nbsp;boolean&nbsp;contentEqualsIgnoreEOL(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input1,
  4652. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input2)
  4653. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4654. <div class="block">Compares the contents of two Readers to determine if they are equal or
  4655. not, ignoring EOL characters.
  4656. <p>
  4657. This method buffers the input internally using
  4658. <code>BufferedReader</code> if they are not already buffered.</div>
  4659. <dl>
  4660. <dt><span class="paramLabel">Parameters:</span></dt>
  4661. <dd><code>input1</code> - the first reader</dd>
  4662. <dd><code>input2</code> - the second reader</dd>
  4663. <dt><span class="returnLabel">Returns:</span></dt>
  4664. <dd>true if the content of the readers are equal (ignoring EOL differences), false otherwise</dd>
  4665. <dt><span class="throwsLabel">Throws:</span></dt>
  4666. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if either input is null</dd>
  4667. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  4668. <dt><span class="simpleTagLabel">Since:</span></dt>
  4669. <dd>2.2</dd>
  4670. </dl>
  4671. </li>
  4672. </ul>
  4673. <a name="skip-java.io.InputStream-long-">
  4674. <!-- -->
  4675. </a>
  4676. <ul class="blockList">
  4677. <li class="blockList">
  4678. <h4>skip</h4>
  4679. <pre>public static&nbsp;long&nbsp;skip(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  4680. long&nbsp;toSkip)
  4681. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4682. <div class="block">Skips bytes from an input byte stream.
  4683. This implementation guarantees that it will read as many bytes
  4684. as possible before giving up; this may not always be the case for
  4685. skip() implementations in subclasses of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><code>InputStream</code></a>.
  4686. <p>
  4687. Note that the implementation uses <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#read-byte:A-int-int-" title="class or interface in java.io"><code>InputStream.read(byte[], int, int)</code></a> rather
  4688. than delegating to <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#skip-long-" title="class or interface in java.io"><code>InputStream.skip(long)</code></a>.
  4689. This means that the method may be considerably less efficient than using the actual skip implementation,
  4690. this is done to guarantee that the correct number of bytes are skipped.
  4691. </p></div>
  4692. <dl>
  4693. <dt><span class="paramLabel">Parameters:</span></dt>
  4694. <dd><code>input</code> - byte stream to skip</dd>
  4695. <dd><code>toSkip</code> - number of bytes to skip.</dd>
  4696. <dt><span class="returnLabel">Returns:</span></dt>
  4697. <dd>number of bytes actually skipped.</dd>
  4698. <dt><span class="throwsLabel">Throws:</span></dt>
  4699. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is a problem reading the file</dd>
  4700. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if toSkip is negative</dd>
  4701. <dt><span class="simpleTagLabel">Since:</span></dt>
  4702. <dd>2.0</dd>
  4703. <dt><span class="seeLabel">See Also:</span></dt>
  4704. <dd><a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#skip-long-" title="class or interface in java.io"><code>InputStream.skip(long)</code></a>,
  4705. <a href="https://issues.apache.org/jira/browse/IO-203">IO-203 - Add skipFully() method for InputStreams</a></dd>
  4706. </dl>
  4707. </li>
  4708. </ul>
  4709. <a name="skip-java.nio.channels.ReadableByteChannel-long-">
  4710. <!-- -->
  4711. </a>
  4712. <ul class="blockList">
  4713. <li class="blockList">
  4714. <h4>skip</h4>
  4715. <pre>public static&nbsp;long&nbsp;skip(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/channels/ReadableByteChannel.html?is-external=true" title="class or interface in java.nio.channels">ReadableByteChannel</a>&nbsp;input,
  4716. long&nbsp;toSkip)
  4717. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4718. <div class="block">Skips bytes from a ReadableByteChannel.
  4719. This implementation guarantees that it will read as many bytes
  4720. as possible before giving up.</div>
  4721. <dl>
  4722. <dt><span class="paramLabel">Parameters:</span></dt>
  4723. <dd><code>input</code> - ReadableByteChannel to skip</dd>
  4724. <dd><code>toSkip</code> - number of bytes to skip.</dd>
  4725. <dt><span class="returnLabel">Returns:</span></dt>
  4726. <dd>number of bytes actually skipped.</dd>
  4727. <dt><span class="throwsLabel">Throws:</span></dt>
  4728. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is a problem reading the ReadableByteChannel</dd>
  4729. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if toSkip is negative</dd>
  4730. <dt><span class="simpleTagLabel">Since:</span></dt>
  4731. <dd>2.5</dd>
  4732. </dl>
  4733. </li>
  4734. </ul>
  4735. <a name="skip-java.io.Reader-long-">
  4736. <!-- -->
  4737. </a>
  4738. <ul class="blockList">
  4739. <li class="blockList">
  4740. <h4>skip</h4>
  4741. <pre>public static&nbsp;long&nbsp;skip(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  4742. long&nbsp;toSkip)
  4743. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4744. <div class="block">Skips characters from an input character stream.
  4745. This implementation guarantees that it will read as many characters
  4746. as possible before giving up; this may not always be the case for
  4747. skip() implementations in subclasses of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io"><code>Reader</code></a>.
  4748. <p>
  4749. Note that the implementation uses <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true#read-char:A-int-int-" title="class or interface in java.io"><code>Reader.read(char[], int, int)</code></a> rather
  4750. than delegating to <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true#skip-long-" title="class or interface in java.io"><code>Reader.skip(long)</code></a>.
  4751. This means that the method may be considerably less efficient than using the actual skip implementation,
  4752. this is done to guarantee that the correct number of characters are skipped.
  4753. </p></div>
  4754. <dl>
  4755. <dt><span class="paramLabel">Parameters:</span></dt>
  4756. <dd><code>input</code> - character stream to skip</dd>
  4757. <dd><code>toSkip</code> - number of characters to skip.</dd>
  4758. <dt><span class="returnLabel">Returns:</span></dt>
  4759. <dd>number of characters actually skipped.</dd>
  4760. <dt><span class="throwsLabel">Throws:</span></dt>
  4761. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is a problem reading the file</dd>
  4762. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if toSkip is negative</dd>
  4763. <dt><span class="simpleTagLabel">Since:</span></dt>
  4764. <dd>2.0</dd>
  4765. <dt><span class="seeLabel">See Also:</span></dt>
  4766. <dd><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true#skip-long-" title="class or interface in java.io"><code>Reader.skip(long)</code></a>,
  4767. <a href="https://issues.apache.org/jira/browse/IO-203">IO-203 - Add skipFully() method for InputStreams</a></dd>
  4768. </dl>
  4769. </li>
  4770. </ul>
  4771. <a name="skipFully-java.io.InputStream-long-">
  4772. <!-- -->
  4773. </a>
  4774. <ul class="blockList">
  4775. <li class="blockList">
  4776. <h4>skipFully</h4>
  4777. <pre>public static&nbsp;void&nbsp;skipFully(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  4778. long&nbsp;toSkip)
  4779. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4780. <div class="block">Skips the requested number of bytes or fail if there are not enough left.
  4781. <p>
  4782. This allows for the possibility that <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#skip-long-" title="class or interface in java.io"><code>InputStream.skip(long)</code></a> may
  4783. not skip as many bytes as requested (most likely because of reaching EOF).
  4784. <p>
  4785. Note that the implementation uses <a href="../../../../org/apache/commons/io/IOUtils.html#skip-java.io.InputStream-long-"><code>skip(InputStream, long)</code></a>.
  4786. This means that the method may be considerably less efficient than using the actual skip implementation,
  4787. this is done to guarantee that the correct number of characters are skipped.
  4788. </p></div>
  4789. <dl>
  4790. <dt><span class="paramLabel">Parameters:</span></dt>
  4791. <dd><code>input</code> - stream to skip</dd>
  4792. <dd><code>toSkip</code> - the number of bytes to skip</dd>
  4793. <dt><span class="throwsLabel">Throws:</span></dt>
  4794. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is a problem reading the file</dd>
  4795. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if toSkip is negative</dd>
  4796. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/EOFException.html?is-external=true" title="class or interface in java.io">EOFException</a></code> - if the number of bytes skipped was incorrect</dd>
  4797. <dt><span class="simpleTagLabel">Since:</span></dt>
  4798. <dd>2.0</dd>
  4799. <dt><span class="seeLabel">See Also:</span></dt>
  4800. <dd><a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#skip-long-" title="class or interface in java.io"><code>InputStream.skip(long)</code></a></dd>
  4801. </dl>
  4802. </li>
  4803. </ul>
  4804. <a name="skipFully-java.nio.channels.ReadableByteChannel-long-">
  4805. <!-- -->
  4806. </a>
  4807. <ul class="blockList">
  4808. <li class="blockList">
  4809. <h4>skipFully</h4>
  4810. <pre>public static&nbsp;void&nbsp;skipFully(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/channels/ReadableByteChannel.html?is-external=true" title="class or interface in java.nio.channels">ReadableByteChannel</a>&nbsp;input,
  4811. long&nbsp;toSkip)
  4812. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4813. <div class="block">Skips the requested number of bytes or fail if there are not enough left.</div>
  4814. <dl>
  4815. <dt><span class="paramLabel">Parameters:</span></dt>
  4816. <dd><code>input</code> - ReadableByteChannel to skip</dd>
  4817. <dd><code>toSkip</code> - the number of bytes to skip</dd>
  4818. <dt><span class="throwsLabel">Throws:</span></dt>
  4819. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is a problem reading the ReadableByteChannel</dd>
  4820. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if toSkip is negative</dd>
  4821. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/EOFException.html?is-external=true" title="class or interface in java.io">EOFException</a></code> - if the number of bytes skipped was incorrect</dd>
  4822. <dt><span class="simpleTagLabel">Since:</span></dt>
  4823. <dd>2.5</dd>
  4824. </dl>
  4825. </li>
  4826. </ul>
  4827. <a name="skipFully-java.io.Reader-long-">
  4828. <!-- -->
  4829. </a>
  4830. <ul class="blockList">
  4831. <li class="blockList">
  4832. <h4>skipFully</h4>
  4833. <pre>public static&nbsp;void&nbsp;skipFully(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  4834. long&nbsp;toSkip)
  4835. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4836. <div class="block">Skips the requested number of characters or fail if there are not enough left.
  4837. <p>
  4838. This allows for the possibility that <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true#skip-long-" title="class or interface in java.io"><code>Reader.skip(long)</code></a> may
  4839. not skip as many characters as requested (most likely because of reaching EOF).
  4840. <p>
  4841. Note that the implementation uses <a href="../../../../org/apache/commons/io/IOUtils.html#skip-java.io.Reader-long-"><code>skip(Reader, long)</code></a>.
  4842. This means that the method may be considerably less efficient than using the actual skip implementation,
  4843. this is done to guarantee that the correct number of characters are skipped.
  4844. </p></div>
  4845. <dl>
  4846. <dt><span class="paramLabel">Parameters:</span></dt>
  4847. <dd><code>input</code> - stream to skip</dd>
  4848. <dd><code>toSkip</code> - the number of characters to skip</dd>
  4849. <dt><span class="throwsLabel">Throws:</span></dt>
  4850. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is a problem reading the file</dd>
  4851. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if toSkip is negative</dd>
  4852. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/EOFException.html?is-external=true" title="class or interface in java.io">EOFException</a></code> - if the number of characters skipped was incorrect</dd>
  4853. <dt><span class="simpleTagLabel">Since:</span></dt>
  4854. <dd>2.0</dd>
  4855. <dt><span class="seeLabel">See Also:</span></dt>
  4856. <dd><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true#skip-long-" title="class or interface in java.io"><code>Reader.skip(long)</code></a></dd>
  4857. </dl>
  4858. </li>
  4859. </ul>
  4860. <a name="read-java.io.Reader-char:A-int-int-">
  4861. <!-- -->
  4862. </a>
  4863. <ul class="blockList">
  4864. <li class="blockList">
  4865. <h4>read</h4>
  4866. <pre>public static&nbsp;int&nbsp;read(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  4867. char[]&nbsp;buffer,
  4868. int&nbsp;offset,
  4869. int&nbsp;length)
  4870. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4871. <div class="block">Reads characters from an input character stream.
  4872. This implementation guarantees that it will read as many characters
  4873. as possible before giving up; this may not always be the case for
  4874. subclasses of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io"><code>Reader</code></a>.</div>
  4875. <dl>
  4876. <dt><span class="paramLabel">Parameters:</span></dt>
  4877. <dd><code>input</code> - where to read input from</dd>
  4878. <dd><code>buffer</code> - destination</dd>
  4879. <dd><code>offset</code> - initial offset into buffer</dd>
  4880. <dd><code>length</code> - length to read, must be &gt;= 0</dd>
  4881. <dt><span class="returnLabel">Returns:</span></dt>
  4882. <dd>actual length read; may be less than requested if EOF was reached</dd>
  4883. <dt><span class="throwsLabel">Throws:</span></dt>
  4884. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if a read error occurs</dd>
  4885. <dt><span class="simpleTagLabel">Since:</span></dt>
  4886. <dd>2.2</dd>
  4887. </dl>
  4888. </li>
  4889. </ul>
  4890. <a name="read-java.io.Reader-char:A-">
  4891. <!-- -->
  4892. </a>
  4893. <ul class="blockList">
  4894. <li class="blockList">
  4895. <h4>read</h4>
  4896. <pre>public static&nbsp;int&nbsp;read(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  4897. char[]&nbsp;buffer)
  4898. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4899. <div class="block">Reads characters from an input character stream.
  4900. This implementation guarantees that it will read as many characters
  4901. as possible before giving up; this may not always be the case for
  4902. subclasses of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io"><code>Reader</code></a>.</div>
  4903. <dl>
  4904. <dt><span class="paramLabel">Parameters:</span></dt>
  4905. <dd><code>input</code> - where to read input from</dd>
  4906. <dd><code>buffer</code> - destination</dd>
  4907. <dt><span class="returnLabel">Returns:</span></dt>
  4908. <dd>actual length read; may be less than requested if EOF was reached</dd>
  4909. <dt><span class="throwsLabel">Throws:</span></dt>
  4910. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if a read error occurs</dd>
  4911. <dt><span class="simpleTagLabel">Since:</span></dt>
  4912. <dd>2.2</dd>
  4913. </dl>
  4914. </li>
  4915. </ul>
  4916. <a name="read-java.io.InputStream-byte:A-int-int-">
  4917. <!-- -->
  4918. </a>
  4919. <ul class="blockList">
  4920. <li class="blockList">
  4921. <h4>read</h4>
  4922. <pre>public static&nbsp;int&nbsp;read(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  4923. byte[]&nbsp;buffer,
  4924. int&nbsp;offset,
  4925. int&nbsp;length)
  4926. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4927. <div class="block">Reads bytes from an input stream.
  4928. This implementation guarantees that it will read as many bytes
  4929. as possible before giving up; this may not always be the case for
  4930. subclasses of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><code>InputStream</code></a>.</div>
  4931. <dl>
  4932. <dt><span class="paramLabel">Parameters:</span></dt>
  4933. <dd><code>input</code> - where to read input from</dd>
  4934. <dd><code>buffer</code> - destination</dd>
  4935. <dd><code>offset</code> - initial offset into buffer</dd>
  4936. <dd><code>length</code> - length to read, must be &gt;= 0</dd>
  4937. <dt><span class="returnLabel">Returns:</span></dt>
  4938. <dd>actual length read; may be less than requested if EOF was reached</dd>
  4939. <dt><span class="throwsLabel">Throws:</span></dt>
  4940. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if a read error occurs</dd>
  4941. <dt><span class="simpleTagLabel">Since:</span></dt>
  4942. <dd>2.2</dd>
  4943. </dl>
  4944. </li>
  4945. </ul>
  4946. <a name="read-java.io.InputStream-byte:A-">
  4947. <!-- -->
  4948. </a>
  4949. <ul class="blockList">
  4950. <li class="blockList">
  4951. <h4>read</h4>
  4952. <pre>public static&nbsp;int&nbsp;read(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  4953. byte[]&nbsp;buffer)
  4954. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4955. <div class="block">Reads bytes from an input stream.
  4956. This implementation guarantees that it will read as many bytes
  4957. as possible before giving up; this may not always be the case for
  4958. subclasses of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><code>InputStream</code></a>.</div>
  4959. <dl>
  4960. <dt><span class="paramLabel">Parameters:</span></dt>
  4961. <dd><code>input</code> - where to read input from</dd>
  4962. <dd><code>buffer</code> - destination</dd>
  4963. <dt><span class="returnLabel">Returns:</span></dt>
  4964. <dd>actual length read; may be less than requested if EOF was reached</dd>
  4965. <dt><span class="throwsLabel">Throws:</span></dt>
  4966. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if a read error occurs</dd>
  4967. <dt><span class="simpleTagLabel">Since:</span></dt>
  4968. <dd>2.2</dd>
  4969. </dl>
  4970. </li>
  4971. </ul>
  4972. <a name="read-java.nio.channels.ReadableByteChannel-java.nio.ByteBuffer-">
  4973. <!-- -->
  4974. </a>
  4975. <ul class="blockList">
  4976. <li class="blockList">
  4977. <h4>read</h4>
  4978. <pre>public static&nbsp;int&nbsp;read(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/channels/ReadableByteChannel.html?is-external=true" title="class or interface in java.nio.channels">ReadableByteChannel</a>&nbsp;input,
  4979. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buffer)
  4980. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4981. <div class="block">Reads bytes from a ReadableByteChannel.
  4982. <p>
  4983. This implementation guarantees that it will read as many bytes
  4984. as possible before giving up; this may not always be the case for
  4985. subclasses of <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/channels/ReadableByteChannel.html?is-external=true" title="class or interface in java.nio.channels"><code>ReadableByteChannel</code></a>.</div>
  4986. <dl>
  4987. <dt><span class="paramLabel">Parameters:</span></dt>
  4988. <dd><code>input</code> - the byte channel to read</dd>
  4989. <dd><code>buffer</code> - byte buffer destination</dd>
  4990. <dt><span class="returnLabel">Returns:</span></dt>
  4991. <dd>the actual length read; may be less than requested if EOF was reached</dd>
  4992. <dt><span class="throwsLabel">Throws:</span></dt>
  4993. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if a read error occurs</dd>
  4994. <dt><span class="simpleTagLabel">Since:</span></dt>
  4995. <dd>2.5</dd>
  4996. </dl>
  4997. </li>
  4998. </ul>
  4999. <a name="readFully-java.io.Reader-char:A-int-int-">
  5000. <!-- -->
  5001. </a>
  5002. <ul class="blockList">
  5003. <li class="blockList">
  5004. <h4>readFully</h4>
  5005. <pre>public static&nbsp;void&nbsp;readFully(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  5006. char[]&nbsp;buffer,
  5007. int&nbsp;offset,
  5008. int&nbsp;length)
  5009. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  5010. <div class="block">Reads the requested number of characters or fail if there are not enough left.
  5011. <p>
  5012. This allows for the possibility that <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true#read-char:A-int-int-" title="class or interface in java.io"><code>Reader.read(char[], int, int)</code></a> may
  5013. not read as many characters as requested (most likely because of reaching EOF).</div>
  5014. <dl>
  5015. <dt><span class="paramLabel">Parameters:</span></dt>
  5016. <dd><code>input</code> - where to read input from</dd>
  5017. <dd><code>buffer</code> - destination</dd>
  5018. <dd><code>offset</code> - initial offset into buffer</dd>
  5019. <dd><code>length</code> - length to read, must be &gt;= 0</dd>
  5020. <dt><span class="throwsLabel">Throws:</span></dt>
  5021. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is a problem reading the file</dd>
  5022. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if length is negative</dd>
  5023. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/EOFException.html?is-external=true" title="class or interface in java.io">EOFException</a></code> - if the number of characters read was incorrect</dd>
  5024. <dt><span class="simpleTagLabel">Since:</span></dt>
  5025. <dd>2.2</dd>
  5026. </dl>
  5027. </li>
  5028. </ul>
  5029. <a name="readFully-java.io.Reader-char:A-">
  5030. <!-- -->
  5031. </a>
  5032. <ul class="blockList">
  5033. <li class="blockList">
  5034. <h4>readFully</h4>
  5035. <pre>public static&nbsp;void&nbsp;readFully(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;input,
  5036. char[]&nbsp;buffer)
  5037. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  5038. <div class="block">Reads the requested number of characters or fail if there are not enough left.
  5039. <p>
  5040. This allows for the possibility that <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true#read-char:A-int-int-" title="class or interface in java.io"><code>Reader.read(char[], int, int)</code></a> may
  5041. not read as many characters as requested (most likely because of reaching EOF).</div>
  5042. <dl>
  5043. <dt><span class="paramLabel">Parameters:</span></dt>
  5044. <dd><code>input</code> - where to read input from</dd>
  5045. <dd><code>buffer</code> - destination</dd>
  5046. <dt><span class="throwsLabel">Throws:</span></dt>
  5047. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is a problem reading the file</dd>
  5048. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if length is negative</dd>
  5049. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/EOFException.html?is-external=true" title="class or interface in java.io">EOFException</a></code> - if the number of characters read was incorrect</dd>
  5050. <dt><span class="simpleTagLabel">Since:</span></dt>
  5051. <dd>2.2</dd>
  5052. </dl>
  5053. </li>
  5054. </ul>
  5055. <a name="readFully-java.io.InputStream-byte:A-int-int-">
  5056. <!-- -->
  5057. </a>
  5058. <ul class="blockList">
  5059. <li class="blockList">
  5060. <h4>readFully</h4>
  5061. <pre>public static&nbsp;void&nbsp;readFully(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  5062. byte[]&nbsp;buffer,
  5063. int&nbsp;offset,
  5064. int&nbsp;length)
  5065. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  5066. <div class="block">Reads the requested number of bytes or fail if there are not enough left.
  5067. <p>
  5068. This allows for the possibility that <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#read-byte:A-int-int-" title="class or interface in java.io"><code>InputStream.read(byte[], int, int)</code></a> may
  5069. not read as many bytes as requested (most likely because of reaching EOF).</div>
  5070. <dl>
  5071. <dt><span class="paramLabel">Parameters:</span></dt>
  5072. <dd><code>input</code> - where to read input from</dd>
  5073. <dd><code>buffer</code> - destination</dd>
  5074. <dd><code>offset</code> - initial offset into buffer</dd>
  5075. <dd><code>length</code> - length to read, must be &gt;= 0</dd>
  5076. <dt><span class="throwsLabel">Throws:</span></dt>
  5077. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is a problem reading the file</dd>
  5078. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if length is negative</dd>
  5079. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/EOFException.html?is-external=true" title="class or interface in java.io">EOFException</a></code> - if the number of bytes read was incorrect</dd>
  5080. <dt><span class="simpleTagLabel">Since:</span></dt>
  5081. <dd>2.2</dd>
  5082. </dl>
  5083. </li>
  5084. </ul>
  5085. <a name="readFully-java.io.InputStream-byte:A-">
  5086. <!-- -->
  5087. </a>
  5088. <ul class="blockList">
  5089. <li class="blockList">
  5090. <h4>readFully</h4>
  5091. <pre>public static&nbsp;void&nbsp;readFully(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  5092. byte[]&nbsp;buffer)
  5093. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  5094. <div class="block">Reads the requested number of bytes or fail if there are not enough left.
  5095. <p>
  5096. This allows for the possibility that <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#read-byte:A-int-int-" title="class or interface in java.io"><code>InputStream.read(byte[], int, int)</code></a> may
  5097. not read as many bytes as requested (most likely because of reaching EOF).</div>
  5098. <dl>
  5099. <dt><span class="paramLabel">Parameters:</span></dt>
  5100. <dd><code>input</code> - where to read input from</dd>
  5101. <dd><code>buffer</code> - destination</dd>
  5102. <dt><span class="throwsLabel">Throws:</span></dt>
  5103. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is a problem reading the file</dd>
  5104. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if length is negative</dd>
  5105. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/EOFException.html?is-external=true" title="class or interface in java.io">EOFException</a></code> - if the number of bytes read was incorrect</dd>
  5106. <dt><span class="simpleTagLabel">Since:</span></dt>
  5107. <dd>2.2</dd>
  5108. </dl>
  5109. </li>
  5110. </ul>
  5111. <a name="readFully-java.io.InputStream-int-">
  5112. <!-- -->
  5113. </a>
  5114. <ul class="blockList">
  5115. <li class="blockList">
  5116. <h4>readFully</h4>
  5117. <pre>public static&nbsp;byte[]&nbsp;readFully(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
  5118. int&nbsp;length)
  5119. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  5120. <div class="block">Reads the requested number of bytes or fail if there are not enough left.
  5121. <p>
  5122. This allows for the possibility that <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#read-byte:A-int-int-" title="class or interface in java.io"><code>InputStream.read(byte[], int, int)</code></a> may
  5123. not read as many bytes as requested (most likely because of reaching EOF).</div>
  5124. <dl>
  5125. <dt><span class="paramLabel">Parameters:</span></dt>
  5126. <dd><code>input</code> - where to read input from</dd>
  5127. <dd><code>length</code> - length to read, must be &gt;= 0</dd>
  5128. <dt><span class="returnLabel">Returns:</span></dt>
  5129. <dd>the bytes read from input</dd>
  5130. <dt><span class="throwsLabel">Throws:</span></dt>
  5131. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is a problem reading the file</dd>
  5132. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if length is negative</dd>
  5133. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/EOFException.html?is-external=true" title="class or interface in java.io">EOFException</a></code> - if the number of bytes read was incorrect</dd>
  5134. <dt><span class="simpleTagLabel">Since:</span></dt>
  5135. <dd>2.5</dd>
  5136. </dl>
  5137. </li>
  5138. </ul>
  5139. <a name="readFully-java.nio.channels.ReadableByteChannel-java.nio.ByteBuffer-">
  5140. <!-- -->
  5141. </a>
  5142. <ul class="blockListLast">
  5143. <li class="blockList">
  5144. <h4>readFully</h4>
  5145. <pre>public static&nbsp;void&nbsp;readFully(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/channels/ReadableByteChannel.html?is-external=true" title="class or interface in java.nio.channels">ReadableByteChannel</a>&nbsp;input,
  5146. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buffer)
  5147. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  5148. <div class="block">Reads the requested number of bytes or fail if there are not enough left.
  5149. <p>
  5150. This allows for the possibility that <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/channels/ReadableByteChannel.html?is-external=true#read-java.nio.ByteBuffer-" title="class or interface in java.nio.channels"><code>ReadableByteChannel.read(ByteBuffer)</code></a> may
  5151. not read as many bytes as requested (most likely because of reaching EOF).</div>
  5152. <dl>
  5153. <dt><span class="paramLabel">Parameters:</span></dt>
  5154. <dd><code>input</code> - the byte channel to read</dd>
  5155. <dd><code>buffer</code> - byte buffer destination</dd>
  5156. <dt><span class="throwsLabel">Throws:</span></dt>
  5157. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is a problem reading the file</dd>
  5158. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/EOFException.html?is-external=true" title="class or interface in java.io">EOFException</a></code> - if the number of bytes read was incorrect</dd>
  5159. <dt><span class="simpleTagLabel">Since:</span></dt>
  5160. <dd>2.5</dd>
  5161. </dl>
  5162. </li>
  5163. </ul>
  5164. </li>
  5165. </ul>
  5166. </li>
  5167. </ul>
  5168. </div>
  5169. </div>
  5170. <!-- ========= END OF CLASS DATA ========= -->
  5171. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  5172. <div class="bottomNav"><a name="navbar.bottom">
  5173. <!-- -->
  5174. </a>
  5175. <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  5176. <a name="navbar.bottom.firstrow">
  5177. <!-- -->
  5178. </a>
  5179. <ul class="navList" title="Navigation">
  5180. <li><a href="../../../../overview-summary.html">Overview</a></li>
  5181. <li><a href="package-summary.html">Package</a></li>
  5182. <li class="navBarCell1Rev">Class</li>
  5183. <li><a href="class-use/IOUtils.html">Use</a></li>
  5184. <li><a href="package-tree.html">Tree</a></li>
  5185. <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
  5186. <li><a href="../../../../index-all.html">Index</a></li>
  5187. <li><a href="../../../../help-doc.html">Help</a></li>
  5188. </ul>
  5189. </div>
  5190. <div class="subNav">
  5191. <ul class="navList">
  5192. <li><a href="../../../../org/apache/commons/io/IOExceptionWithCause.html" title="class in org.apache.commons.io"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  5193. <li><a href="../../../../org/apache/commons/io/LineIterator.html" title="class in org.apache.commons.io"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  5194. </ul>
  5195. <ul class="navList">
  5196. <li><a href="../../../../index.html?org/apache/commons/io/IOUtils.html" target="_top">Frames</a></li>
  5197. <li><a href="IOUtils.html" target="_top">No&nbsp;Frames</a></li>
  5198. </ul>
  5199. <ul class="navList" id="allclasses_navbar_bottom">
  5200. <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  5201. </ul>
  5202. <div>
  5203. <script type="text/javascript"><!--
  5204. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  5205. if(window==top) {
  5206. allClassesLink.style.display = "block";
  5207. }
  5208. else {
  5209. allClassesLink.style.display = "none";
  5210. }
  5211. //-->
  5212. </script>
  5213. </div>
  5214. <div>
  5215. <ul class="subNavList">
  5216. <li>Summary:&nbsp;</li>
  5217. <li>Nested&nbsp;|&nbsp;</li>
  5218. <li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
  5219. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  5220. <li><a href="#method.summary">Method</a></li>
  5221. </ul>
  5222. <ul class="subNavList">
  5223. <li>Detail:&nbsp;</li>
  5224. <li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
  5225. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  5226. <li><a href="#method.detail">Method</a></li>
  5227. </ul>
  5228. </div>
  5229. <a name="skip.navbar.bottom">
  5230. <!-- -->
  5231. </a></div>
  5232. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  5233. <p class="legalCopy"><small>Copyright &#169; 2002&#x2013;2017 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
  5234. </body>
  5235. </html>