LockableFileWriter.html 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769
  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>LockableFileWriter (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="LockableFileWriter (Apache Commons IO 2.6 API)";
  16. }
  17. }
  18. catch(err) {
  19. }
  20. //-->
  21. var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10};
  22. var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete 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/LockableFileWriter.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/output/FileWriterWithEncoding.html" title="class in org.apache.commons.io.output"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  53. <li><a href="../../../../../org/apache/commons/io/output/NullOutputStream.html" title="class in org.apache.commons.io.output"><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/output/LockableFileWriter.html" target="_top">Frames</a></li>
  57. <li><a href="LockableFileWriter.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="#fields.inherited.from.class.java.io.Writer">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>Field&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.output</div>
  96. <h2 title="Class LockableFileWriter" class="title">Class LockableFileWriter</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><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">java.io.Writer</a></li>
  104. <li>
  105. <ul class="inheritance">
  106. <li>org.apache.commons.io.output.LockableFileWriter</li>
  107. </ul>
  108. </li>
  109. </ul>
  110. </li>
  111. </ul>
  112. <div class="description">
  113. <ul class="blockList">
  114. <li class="blockList">
  115. <dl>
  116. <dt>All Implemented Interfaces:</dt>
  117. <dd><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>, <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Flushable.html?is-external=true" title="class or interface in java.io">Flushable</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></dd>
  118. </dl>
  119. <hr>
  120. <br>
  121. <pre>public class <span class="typeNameLabel">LockableFileWriter</span>
  122. extends <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></pre>
  123. <div class="block">FileWriter that will create and honor lock files to allow simple
  124. cross thread file lock handling.
  125. <p>
  126. This class provides a simple alternative to <code>FileWriter</code>
  127. that will use a lock file to prevent duplicate writes.
  128. <p>
  129. <b>N.B.</b> the lock file is deleted when <a href="../../../../../org/apache/commons/io/output/LockableFileWriter.html#close--"><code>close()</code></a> is called
  130. - or if the main file cannot be opened initially.
  131. In the (unlikely) event that the lockfile cannot be deleted,
  132. this is not reported, and subsequent requests using
  133. the same lockfile will fail.
  134. <p>
  135. By default, the file will be overwritten, but this may be changed to append.
  136. The lock directory may be specified, but defaults to the system property
  137. <code>java.io.tmpdir</code>.
  138. The encoding may also be specified, and defaults to the platform default.</div>
  139. </li>
  140. </ul>
  141. </div>
  142. <div class="summary">
  143. <ul class="blockList">
  144. <li class="blockList">
  145. <!-- =========== FIELD SUMMARY =========== -->
  146. <ul class="blockList">
  147. <li class="blockList"><a name="field.summary">
  148. <!-- -->
  149. </a>
  150. <h3>Field Summary</h3>
  151. <ul class="blockList">
  152. <li class="blockList"><a name="fields.inherited.from.class.java.io.Writer">
  153. <!-- -->
  154. </a>
  155. <h3>Fields inherited from class&nbsp;java.io.<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></h3>
  156. <code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true#lock" title="class or interface in java.io">lock</a></code></li>
  157. </ul>
  158. </li>
  159. </ul>
  160. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  161. <ul class="blockList">
  162. <li class="blockList"><a name="constructor.summary">
  163. <!-- -->
  164. </a>
  165. <h3>Constructor Summary</h3>
  166. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
  167. <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
  168. <tr>
  169. <th class="colOne" scope="col">Constructor and Description</th>
  170. </tr>
  171. <tr class="altColor">
  172. <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/output/LockableFileWriter.html#LockableFileWriter-java.io.File-">LockableFileWriter</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)</code>
  173. <div class="block">Constructs a LockableFileWriter.</div>
  174. </td>
  175. </tr>
  176. <tr class="rowColor">
  177. <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/output/LockableFileWriter.html#LockableFileWriter-java.io.File-boolean-">LockableFileWriter</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  178. boolean&nbsp;append)</code>
  179. <div class="block">Constructs a LockableFileWriter.</div>
  180. </td>
  181. </tr>
  182. <tr class="altColor">
  183. <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/output/LockableFileWriter.html#LockableFileWriter-java.io.File-boolean-java.lang.String-">LockableFileWriter</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  184. boolean&nbsp;append,
  185. <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;lockDir)</code>
  186. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  187. <div class="block"><span class="deprecationComment">2.5 use <a href="../../../../../org/apache/commons/io/output/LockableFileWriter.html#LockableFileWriter-java.io.File-java.nio.charset.Charset-boolean-java.lang.String-"><code>LockableFileWriter(File, Charset, boolean, String)</code></a> instead</span></div>
  188. </div>
  189. </td>
  190. </tr>
  191. <tr class="rowColor">
  192. <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/output/LockableFileWriter.html#LockableFileWriter-java.io.File-java.nio.charset.Charset-">LockableFileWriter</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  193. <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>
  194. <div class="block">Constructs a LockableFileWriter with a file encoding.</div>
  195. </td>
  196. </tr>
  197. <tr class="altColor">
  198. <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/output/LockableFileWriter.html#LockableFileWriter-java.io.File-java.nio.charset.Charset-boolean-java.lang.String-">LockableFileWriter</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  199. <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,
  200. boolean&nbsp;append,
  201. <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;lockDir)</code>
  202. <div class="block">Constructs a LockableFileWriter with a file encoding.</div>
  203. </td>
  204. </tr>
  205. <tr class="rowColor">
  206. <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/output/LockableFileWriter.html#LockableFileWriter-java.io.File-java.lang.String-">LockableFileWriter</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  207. <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>
  208. <div class="block">Constructs a LockableFileWriter with a file encoding.</div>
  209. </td>
  210. </tr>
  211. <tr class="altColor">
  212. <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/output/LockableFileWriter.html#LockableFileWriter-java.io.File-java.lang.String-boolean-java.lang.String-">LockableFileWriter</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  213. <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,
  214. boolean&nbsp;append,
  215. <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;lockDir)</code>
  216. <div class="block">Constructs a LockableFileWriter with a file encoding.</div>
  217. </td>
  218. </tr>
  219. <tr class="rowColor">
  220. <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/output/LockableFileWriter.html#LockableFileWriter-java.lang.String-">LockableFileWriter</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;fileName)</code>
  221. <div class="block">Constructs a LockableFileWriter.</div>
  222. </td>
  223. </tr>
  224. <tr class="altColor">
  225. <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/output/LockableFileWriter.html#LockableFileWriter-java.lang.String-boolean-">LockableFileWriter</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;fileName,
  226. boolean&nbsp;append)</code>
  227. <div class="block">Constructs a LockableFileWriter.</div>
  228. </td>
  229. </tr>
  230. <tr class="rowColor">
  231. <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/output/LockableFileWriter.html#LockableFileWriter-java.lang.String-boolean-java.lang.String-">LockableFileWriter</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;fileName,
  232. boolean&nbsp;append,
  233. <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;lockDir)</code>
  234. <div class="block">Constructs a LockableFileWriter.</div>
  235. </td>
  236. </tr>
  237. </table>
  238. </li>
  239. </ul>
  240. <!-- ========== METHOD SUMMARY =========== -->
  241. <ul class="blockList">
  242. <li class="blockList"><a name="method.summary">
  243. <!-- -->
  244. </a>
  245. <h3>Method Summary</h3>
  246. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  247. <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance 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></caption>
  248. <tr>
  249. <th class="colFirst" scope="col">Modifier and Type</th>
  250. <th class="colLast" scope="col">Method and Description</th>
  251. </tr>
  252. <tr id="i0" class="altColor">
  253. <td class="colFirst"><code>void</code></td>
  254. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/output/LockableFileWriter.html#close--">close</a></span>()</code>
  255. <div class="block">Closes the file writer and deletes the lockfile (if possible).</div>
  256. </td>
  257. </tr>
  258. <tr id="i1" class="rowColor">
  259. <td class="colFirst"><code>void</code></td>
  260. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/output/LockableFileWriter.html#flush--">flush</a></span>()</code>
  261. <div class="block">Flush the stream.</div>
  262. </td>
  263. </tr>
  264. <tr id="i2" class="altColor">
  265. <td class="colFirst"><code>void</code></td>
  266. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/output/LockableFileWriter.html#write-char:A-">write</a></span>(char[]&nbsp;chr)</code>
  267. <div class="block">Write the characters from an array.</div>
  268. </td>
  269. </tr>
  270. <tr id="i3" class="rowColor">
  271. <td class="colFirst"><code>void</code></td>
  272. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/output/LockableFileWriter.html#write-char:A-int-int-">write</a></span>(char[]&nbsp;chr,
  273. int&nbsp;st,
  274. int&nbsp;end)</code>
  275. <div class="block">Write the specified characters from an array.</div>
  276. </td>
  277. </tr>
  278. <tr id="i4" class="altColor">
  279. <td class="colFirst"><code>void</code></td>
  280. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/output/LockableFileWriter.html#write-int-">write</a></span>(int&nbsp;idx)</code>
  281. <div class="block">Write a character.</div>
  282. </td>
  283. </tr>
  284. <tr id="i5" class="rowColor">
  285. <td class="colFirst"><code>void</code></td>
  286. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/output/LockableFileWriter.html#write-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;str)</code>
  287. <div class="block">Write the characters from a string.</div>
  288. </td>
  289. </tr>
  290. <tr id="i6" class="altColor">
  291. <td class="colFirst"><code>void</code></td>
  292. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/output/LockableFileWriter.html#write-java.lang.String-int-int-">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;str,
  293. int&nbsp;st,
  294. int&nbsp;end)</code>
  295. <div class="block">Write the specified characters from a string.</div>
  296. </td>
  297. </tr>
  298. </table>
  299. <ul class="blockList">
  300. <li class="blockList"><a name="methods.inherited.from.class.java.io.Writer">
  301. <!-- -->
  302. </a>
  303. <h3>Methods inherited from class&nbsp;java.io.<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></h3>
  304. <code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true#append-char-" title="class or interface in java.io">append</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true#append-java.lang.CharSequence-" title="class or interface in java.io">append</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true#append-java.lang.CharSequence-int-int-" title="class or interface in java.io">append</a></code></li>
  305. </ul>
  306. <ul class="blockList">
  307. <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
  308. <!-- -->
  309. </a>
  310. <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>
  311. <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>
  312. </ul>
  313. </li>
  314. </ul>
  315. </li>
  316. </ul>
  317. </div>
  318. <div class="details">
  319. <ul class="blockList">
  320. <li class="blockList">
  321. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  322. <ul class="blockList">
  323. <li class="blockList"><a name="constructor.detail">
  324. <!-- -->
  325. </a>
  326. <h3>Constructor Detail</h3>
  327. <a name="LockableFileWriter-java.lang.String-">
  328. <!-- -->
  329. </a>
  330. <ul class="blockList">
  331. <li class="blockList">
  332. <h4>LockableFileWriter</h4>
  333. <pre>public&nbsp;LockableFileWriter(<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;fileName)
  334. 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>
  335. <div class="block">Constructs a LockableFileWriter.
  336. If the file exists, it is overwritten.</div>
  337. <dl>
  338. <dt><span class="paramLabel">Parameters:</span></dt>
  339. <dd><code>fileName</code> - the file to write to, not null</dd>
  340. <dt><span class="throwsLabel">Throws:</span></dt>
  341. <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 file is null</dd>
  342. <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> - in case of an I/O error</dd>
  343. </dl>
  344. </li>
  345. </ul>
  346. <a name="LockableFileWriter-java.lang.String-boolean-">
  347. <!-- -->
  348. </a>
  349. <ul class="blockList">
  350. <li class="blockList">
  351. <h4>LockableFileWriter</h4>
  352. <pre>public&nbsp;LockableFileWriter(<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;fileName,
  353. boolean&nbsp;append)
  354. 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>
  355. <div class="block">Constructs a LockableFileWriter.</div>
  356. <dl>
  357. <dt><span class="paramLabel">Parameters:</span></dt>
  358. <dd><code>fileName</code> - file to write to, not null</dd>
  359. <dd><code>append</code> - true if content should be appended, false to overwrite</dd>
  360. <dt><span class="throwsLabel">Throws:</span></dt>
  361. <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 file is null</dd>
  362. <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> - in case of an I/O error</dd>
  363. </dl>
  364. </li>
  365. </ul>
  366. <a name="LockableFileWriter-java.lang.String-boolean-java.lang.String-">
  367. <!-- -->
  368. </a>
  369. <ul class="blockList">
  370. <li class="blockList">
  371. <h4>LockableFileWriter</h4>
  372. <pre>public&nbsp;LockableFileWriter(<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;fileName,
  373. boolean&nbsp;append,
  374. <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;lockDir)
  375. 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>
  376. <div class="block">Constructs a LockableFileWriter.</div>
  377. <dl>
  378. <dt><span class="paramLabel">Parameters:</span></dt>
  379. <dd><code>fileName</code> - the file to write to, not null</dd>
  380. <dd><code>append</code> - true if content should be appended, false to overwrite</dd>
  381. <dd><code>lockDir</code> - the directory in which the lock file should be held</dd>
  382. <dt><span class="throwsLabel">Throws:</span></dt>
  383. <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 file is null</dd>
  384. <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> - in case of an I/O error</dd>
  385. </dl>
  386. </li>
  387. </ul>
  388. <a name="LockableFileWriter-java.io.File-">
  389. <!-- -->
  390. </a>
  391. <ul class="blockList">
  392. <li class="blockList">
  393. <h4>LockableFileWriter</h4>
  394. <pre>public&nbsp;LockableFileWriter(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)
  395. 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>
  396. <div class="block">Constructs a LockableFileWriter.
  397. If the file exists, it is overwritten.</div>
  398. <dl>
  399. <dt><span class="paramLabel">Parameters:</span></dt>
  400. <dd><code>file</code> - the file to write to, not null</dd>
  401. <dt><span class="throwsLabel">Throws:</span></dt>
  402. <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 file is null</dd>
  403. <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> - in case of an I/O error</dd>
  404. </dl>
  405. </li>
  406. </ul>
  407. <a name="LockableFileWriter-java.io.File-boolean-">
  408. <!-- -->
  409. </a>
  410. <ul class="blockList">
  411. <li class="blockList">
  412. <h4>LockableFileWriter</h4>
  413. <pre>public&nbsp;LockableFileWriter(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  414. boolean&nbsp;append)
  415. 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>
  416. <div class="block">Constructs a LockableFileWriter.</div>
  417. <dl>
  418. <dt><span class="paramLabel">Parameters:</span></dt>
  419. <dd><code>file</code> - the file to write to, not null</dd>
  420. <dd><code>append</code> - true if content should be appended, false to overwrite</dd>
  421. <dt><span class="throwsLabel">Throws:</span></dt>
  422. <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 file is null</dd>
  423. <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> - in case of an I/O error</dd>
  424. </dl>
  425. </li>
  426. </ul>
  427. <a name="LockableFileWriter-java.io.File-boolean-java.lang.String-">
  428. <!-- -->
  429. </a>
  430. <ul class="blockList">
  431. <li class="blockList">
  432. <h4>LockableFileWriter</h4>
  433. <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>
  434. public&nbsp;LockableFileWriter(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  435. boolean&nbsp;append,
  436. <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;lockDir)
  437. 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>
  438. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../../org/apache/commons/io/output/LockableFileWriter.html#LockableFileWriter-java.io.File-java.nio.charset.Charset-boolean-java.lang.String-"><code>LockableFileWriter(File, Charset, boolean, String)</code></a> instead</span></div>
  439. <div class="block">Constructs a LockableFileWriter.</div>
  440. <dl>
  441. <dt><span class="paramLabel">Parameters:</span></dt>
  442. <dd><code>file</code> - the file to write to, not null</dd>
  443. <dd><code>append</code> - true if content should be appended, false to overwrite</dd>
  444. <dd><code>lockDir</code> - the directory in which the lock file should be held</dd>
  445. <dt><span class="throwsLabel">Throws:</span></dt>
  446. <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 file is null</dd>
  447. <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> - in case of an I/O error</dd>
  448. </dl>
  449. </li>
  450. </ul>
  451. <a name="LockableFileWriter-java.io.File-java.nio.charset.Charset-">
  452. <!-- -->
  453. </a>
  454. <ul class="blockList">
  455. <li class="blockList">
  456. <h4>LockableFileWriter</h4>
  457. <pre>public&nbsp;LockableFileWriter(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  458. <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)
  459. 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>
  460. <div class="block">Constructs a LockableFileWriter with a file encoding.</div>
  461. <dl>
  462. <dt><span class="paramLabel">Parameters:</span></dt>
  463. <dd><code>file</code> - the file to write to, not null</dd>
  464. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  465. <dt><span class="throwsLabel">Throws:</span></dt>
  466. <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 file is null</dd>
  467. <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> - in case of an I/O error</dd>
  468. <dt><span class="simpleTagLabel">Since:</span></dt>
  469. <dd>2.3</dd>
  470. </dl>
  471. </li>
  472. </ul>
  473. <a name="LockableFileWriter-java.io.File-java.lang.String-">
  474. <!-- -->
  475. </a>
  476. <ul class="blockList">
  477. <li class="blockList">
  478. <h4>LockableFileWriter</h4>
  479. <pre>public&nbsp;LockableFileWriter(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  480. <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)
  481. 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>
  482. <div class="block">Constructs a LockableFileWriter with a file encoding.</div>
  483. <dl>
  484. <dt><span class="paramLabel">Parameters:</span></dt>
  485. <dd><code>file</code> - the file to write to, not null</dd>
  486. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  487. <dt><span class="throwsLabel">Throws:</span></dt>
  488. <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 file is null</dd>
  489. <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> - in case of an I/O error</dd>
  490. <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/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io"><code>UnsupportedEncodingException</code></a> in version 2.2 if the encoding is not
  491. supported.</dd>
  492. </dl>
  493. </li>
  494. </ul>
  495. <a name="LockableFileWriter-java.io.File-java.nio.charset.Charset-boolean-java.lang.String-">
  496. <!-- -->
  497. </a>
  498. <ul class="blockList">
  499. <li class="blockList">
  500. <h4>LockableFileWriter</h4>
  501. <pre>public&nbsp;LockableFileWriter(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  502. <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,
  503. boolean&nbsp;append,
  504. <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;lockDir)
  505. 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>
  506. <div class="block">Constructs a LockableFileWriter with a file encoding.</div>
  507. <dl>
  508. <dt><span class="paramLabel">Parameters:</span></dt>
  509. <dd><code>file</code> - the file to write to, not null</dd>
  510. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  511. <dd><code>append</code> - true if content should be appended, false to overwrite</dd>
  512. <dd><code>lockDir</code> - the directory in which the lock file should be held</dd>
  513. <dt><span class="throwsLabel">Throws:</span></dt>
  514. <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 file is null</dd>
  515. <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> - in case of an I/O error</dd>
  516. <dt><span class="simpleTagLabel">Since:</span></dt>
  517. <dd>2.3</dd>
  518. </dl>
  519. </li>
  520. </ul>
  521. <a name="LockableFileWriter-java.io.File-java.lang.String-boolean-java.lang.String-">
  522. <!-- -->
  523. </a>
  524. <ul class="blockListLast">
  525. <li class="blockList">
  526. <h4>LockableFileWriter</h4>
  527. <pre>public&nbsp;LockableFileWriter(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  528. <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,
  529. boolean&nbsp;append,
  530. <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;lockDir)
  531. 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>
  532. <div class="block">Constructs a LockableFileWriter with a file encoding.</div>
  533. <dl>
  534. <dt><span class="paramLabel">Parameters:</span></dt>
  535. <dd><code>file</code> - the file to write to, not null</dd>
  536. <dd><code>encoding</code> - the encoding to use, null means platform default</dd>
  537. <dd><code>append</code> - true if content should be appended, false to overwrite</dd>
  538. <dd><code>lockDir</code> - the directory in which the lock file should be held</dd>
  539. <dt><span class="throwsLabel">Throws:</span></dt>
  540. <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 file is null</dd>
  541. <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> - in case of an I/O error</dd>
  542. <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/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io"><code>UnsupportedEncodingException</code></a> in version 2.2 if the encoding is not
  543. supported.</dd>
  544. </dl>
  545. </li>
  546. </ul>
  547. </li>
  548. </ul>
  549. <!-- ============ METHOD DETAIL ========== -->
  550. <ul class="blockList">
  551. <li class="blockList"><a name="method.detail">
  552. <!-- -->
  553. </a>
  554. <h3>Method Detail</h3>
  555. <a name="close--">
  556. <!-- -->
  557. </a>
  558. <ul class="blockList">
  559. <li class="blockList">
  560. <h4>close</h4>
  561. <pre>public&nbsp;void&nbsp;close()
  562. 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>
  563. <div class="block">Closes the file writer and deletes the lockfile (if possible).</div>
  564. <dl>
  565. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  566. <dd><code><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">close</a></code>&nbsp;in interface&nbsp;<code><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></code></dd>
  567. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  568. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true#close--" title="class or interface in java.lang">close</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></code></dd>
  569. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  570. <dd><code><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">close</a></code>&nbsp;in class&nbsp;<code><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></code></dd>
  571. <dt><span class="throwsLabel">Throws:</span></dt>
  572. <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>
  573. </dl>
  574. </li>
  575. </ul>
  576. <a name="write-int-">
  577. <!-- -->
  578. </a>
  579. <ul class="blockList">
  580. <li class="blockList">
  581. <h4>write</h4>
  582. <pre>public&nbsp;void&nbsp;write(int&nbsp;idx)
  583. 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>
  584. <div class="block">Write a character.</div>
  585. <dl>
  586. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  587. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true#write-int-" title="class or interface in java.io">write</a></code>&nbsp;in class&nbsp;<code><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></code></dd>
  588. <dt><span class="paramLabel">Parameters:</span></dt>
  589. <dd><code>idx</code> - the character to write</dd>
  590. <dt><span class="throwsLabel">Throws:</span></dt>
  591. <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>
  592. </dl>
  593. </li>
  594. </ul>
  595. <a name="write-char:A-">
  596. <!-- -->
  597. </a>
  598. <ul class="blockList">
  599. <li class="blockList">
  600. <h4>write</h4>
  601. <pre>public&nbsp;void&nbsp;write(char[]&nbsp;chr)
  602. 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>
  603. <div class="block">Write the characters from an array.</div>
  604. <dl>
  605. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  606. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true#write-char:A-" title="class or interface in java.io">write</a></code>&nbsp;in class&nbsp;<code><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></code></dd>
  607. <dt><span class="paramLabel">Parameters:</span></dt>
  608. <dd><code>chr</code> - the characters to write</dd>
  609. <dt><span class="throwsLabel">Throws:</span></dt>
  610. <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>
  611. </dl>
  612. </li>
  613. </ul>
  614. <a name="write-char:A-int-int-">
  615. <!-- -->
  616. </a>
  617. <ul class="blockList">
  618. <li class="blockList">
  619. <h4>write</h4>
  620. <pre>public&nbsp;void&nbsp;write(char[]&nbsp;chr,
  621. int&nbsp;st,
  622. int&nbsp;end)
  623. 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>
  624. <div class="block">Write the specified characters from an array.</div>
  625. <dl>
  626. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  627. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true#write-char:A-int-int-" title="class or interface in java.io">write</a></code>&nbsp;in class&nbsp;<code><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></code></dd>
  628. <dt><span class="paramLabel">Parameters:</span></dt>
  629. <dd><code>chr</code> - the characters to write</dd>
  630. <dd><code>st</code> - The start offset</dd>
  631. <dd><code>end</code> - The number of characters to write</dd>
  632. <dt><span class="throwsLabel">Throws:</span></dt>
  633. <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>
  634. </dl>
  635. </li>
  636. </ul>
  637. <a name="write-java.lang.String-">
  638. <!-- -->
  639. </a>
  640. <ul class="blockList">
  641. <li class="blockList">
  642. <h4>write</h4>
  643. <pre>public&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;str)
  644. 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>
  645. <div class="block">Write the characters from a string.</div>
  646. <dl>
  647. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  648. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true#write-java.lang.String-" title="class or interface in java.io">write</a></code>&nbsp;in class&nbsp;<code><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></code></dd>
  649. <dt><span class="paramLabel">Parameters:</span></dt>
  650. <dd><code>str</code> - the string to write</dd>
  651. <dt><span class="throwsLabel">Throws:</span></dt>
  652. <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>
  653. </dl>
  654. </li>
  655. </ul>
  656. <a name="write-java.lang.String-int-int-">
  657. <!-- -->
  658. </a>
  659. <ul class="blockList">
  660. <li class="blockList">
  661. <h4>write</h4>
  662. <pre>public&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;str,
  663. int&nbsp;st,
  664. int&nbsp;end)
  665. 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>
  666. <div class="block">Write the specified characters from a string.</div>
  667. <dl>
  668. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  669. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true#write-java.lang.String-int-int-" title="class or interface in java.io">write</a></code>&nbsp;in class&nbsp;<code><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></code></dd>
  670. <dt><span class="paramLabel">Parameters:</span></dt>
  671. <dd><code>str</code> - the string to write</dd>
  672. <dd><code>st</code> - The start offset</dd>
  673. <dd><code>end</code> - The number of characters to write</dd>
  674. <dt><span class="throwsLabel">Throws:</span></dt>
  675. <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>
  676. </dl>
  677. </li>
  678. </ul>
  679. <a name="flush--">
  680. <!-- -->
  681. </a>
  682. <ul class="blockListLast">
  683. <li class="blockList">
  684. <h4>flush</h4>
  685. <pre>public&nbsp;void&nbsp;flush()
  686. 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>
  687. <div class="block">Flush the stream.</div>
  688. <dl>
  689. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  690. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Flushable.html?is-external=true#flush--" title="class or interface in java.io">flush</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Flushable.html?is-external=true" title="class or interface in java.io">Flushable</a></code></dd>
  691. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  692. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true#flush--" title="class or interface in java.io">flush</a></code>&nbsp;in class&nbsp;<code><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></code></dd>
  693. <dt><span class="throwsLabel">Throws:</span></dt>
  694. <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>
  695. </dl>
  696. </li>
  697. </ul>
  698. </li>
  699. </ul>
  700. </li>
  701. </ul>
  702. </div>
  703. </div>
  704. <!-- ========= END OF CLASS DATA ========= -->
  705. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  706. <div class="bottomNav"><a name="navbar.bottom">
  707. <!-- -->
  708. </a>
  709. <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  710. <a name="navbar.bottom.firstrow">
  711. <!-- -->
  712. </a>
  713. <ul class="navList" title="Navigation">
  714. <li><a href="../../../../../overview-summary.html">Overview</a></li>
  715. <li><a href="package-summary.html">Package</a></li>
  716. <li class="navBarCell1Rev">Class</li>
  717. <li><a href="class-use/LockableFileWriter.html">Use</a></li>
  718. <li><a href="package-tree.html">Tree</a></li>
  719. <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
  720. <li><a href="../../../../../index-all.html">Index</a></li>
  721. <li><a href="../../../../../help-doc.html">Help</a></li>
  722. </ul>
  723. </div>
  724. <div class="subNav">
  725. <ul class="navList">
  726. <li><a href="../../../../../org/apache/commons/io/output/FileWriterWithEncoding.html" title="class in org.apache.commons.io.output"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  727. <li><a href="../../../../../org/apache/commons/io/output/NullOutputStream.html" title="class in org.apache.commons.io.output"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  728. </ul>
  729. <ul class="navList">
  730. <li><a href="../../../../../index.html?org/apache/commons/io/output/LockableFileWriter.html" target="_top">Frames</a></li>
  731. <li><a href="LockableFileWriter.html" target="_top">No&nbsp;Frames</a></li>
  732. </ul>
  733. <ul class="navList" id="allclasses_navbar_bottom">
  734. <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  735. </ul>
  736. <div>
  737. <script type="text/javascript"><!--
  738. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  739. if(window==top) {
  740. allClassesLink.style.display = "block";
  741. }
  742. else {
  743. allClassesLink.style.display = "none";
  744. }
  745. //-->
  746. </script>
  747. </div>
  748. <div>
  749. <ul class="subNavList">
  750. <li>Summary:&nbsp;</li>
  751. <li>Nested&nbsp;|&nbsp;</li>
  752. <li><a href="#fields.inherited.from.class.java.io.Writer">Field</a>&nbsp;|&nbsp;</li>
  753. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  754. <li><a href="#method.summary">Method</a></li>
  755. </ul>
  756. <ul class="subNavList">
  757. <li>Detail:&nbsp;</li>
  758. <li>Field&nbsp;|&nbsp;</li>
  759. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  760. <li><a href="#method.detail">Method</a></li>
  761. </ul>
  762. </div>
  763. <a name="skip.navbar.bottom">
  764. <!-- -->
  765. </a></div>
  766. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  767. <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>
  768. </body>
  769. </html>