diff --git a/WebContent/WEB-INF/lib/commons-fileupload-1.3.2.jar b/WebContent/WEB-INF/lib/commons-fileupload-1.3.2.jar new file mode 100644 index 0000000..4975590 Binary files /dev/null and b/WebContent/WEB-INF/lib/commons-fileupload-1.3.2.jar differ diff --git a/WebContent/WEB-INF/lib/commons-io-2.5-javadoc.jar b/WebContent/WEB-INF/lib/commons-io-2.5-javadoc.jar new file mode 100644 index 0000000..b957529 Binary files /dev/null and b/WebContent/WEB-INF/lib/commons-io-2.5-javadoc.jar differ diff --git a/WebContent/WEB-INF/lib/commons-io-2.5.jar b/WebContent/WEB-INF/lib/commons-io-2.5.jar new file mode 100644 index 0000000..1234918 Binary files /dev/null and b/WebContent/WEB-INF/lib/commons-io-2.5.jar differ diff --git a/docs/licenses/Apache Commons/LICENSE.txt b/docs/licenses/Apache Commons/LICENSE.txt new file mode 100644 index 0000000..6b0b127 --- /dev/null +++ b/docs/licenses/Apache Commons/LICENSE.txt @@ -0,0 +1,203 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/docs/licenses/Apache Commons/NOTICE.txt b/docs/licenses/Apache Commons/NOTICE.txt new file mode 100644 index 0000000..18053bb --- /dev/null +++ b/docs/licenses/Apache Commons/NOTICE.txt @@ -0,0 +1,5 @@ +Apache Commons IO +Copyright 2002-2016 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). diff --git a/docs/licenses/Apache Commons/RELEASE-NOTES.txt b/docs/licenses/Apache Commons/RELEASE-NOTES.txt new file mode 100644 index 0000000..5c0b936 --- /dev/null +++ b/docs/licenses/Apache Commons/RELEASE-NOTES.txt @@ -0,0 +1,993 @@ + +Apache Commons IO +Version 2.5 +Release Notes + +INTRODUCTION: + +Commons IO is a package of Java utility classes like java.io. +Classes in this package are considered to be so standard and of such high +reuse as to justify existence in java.io. + +The Apache Commons IO library contains utility classes, stream implementations, file filters, +file comparators, endian transformation classes, and much more. + +============================================================================== +Apache Commons IO Version 2.5 +============================================================================== +New features and bug fixes. + +Changes in this version include: + +New features: +o IO-487: Add ValidatingObjectInputStream for controlled deserialization +o IO-471: Support for additional encodings in ReversedLinesFileReader Thanks to Leandro Reis. +o IO-425: Setter method for threshold on ThresholdingOutputStream Thanks to Craig Swank. +o IO-406: Introduce new class AppendableOutputStream Thanks to Niall Pemberton. +o IO-459: Add WindowsLineEndingInputStream and UnixLineEndingInputStream. Thanks to Kristian Rosenvold. +o IO-457: Add a BoundedReader, a wrapper that can be used to constrain access + to an underlying stream when used with mark/reset - + to avoid overflowing the mark limit of the underlying buffer. Thanks to Kristian Rosenvold. +o IO-426: Add API IOUtils.closeQuietly(Closeable...) +o IO-410: Readfully() That Returns A Byte Array Thanks to Beluga Behr. +o IO-395: Overload IOUtils buffer methods to accept buffer size Thanks to Beluga Behr. +o IO-382: Chunked IO for large arrays. + Added writeChunked(byte[], OutputStream) and writeChunked(char[] Writer) + Added ChunkedOutputStream, ChunkedWriter +o IO-233: Add Methods for Buffering Streams/Writers To IOUtils + Added overloaded buffer() methods - see also IO-330 +o IO-330: IOUtils#toBufferedOutputStream/toBufferedWriter to conditionally wrap the output + Added overloaded buffer() methods - see also IO-233 +o IO-381: Add FileUtils.copyInputStreamToFile API with option to leave the source open. + See copyInputStreamToFile(final InputStream source, final File destination, boolean closeSource) +o IO-379: CharSequenceInputStream - add tests for available() + Fix code so it really does reflect a minimum available. +o IO-346: Add ByteArrayOutputStream.toInputStream() +o IO-341: A constant for holding the BOM character (U+FEFF) +o IO-361: Add API FileUtils.forceMkdirsParent(). +o IO-360: Add API Charsets.requiredCharsets(). +o IO-359: Add IOUtils.skip and skipFully(ReadableByteChannel, long). Thanks to yukoba. +o IO-358: Add IOUtils.read and readFully(ReadableByteChannel, ByteBuffer buffer). Thanks to yukoba. +o IO-353: Add API IOUtils.copy(InputStream, OutputStream, int) Thanks to ggregory. +o IO-349: Add API with array offset and length argument to FileUtils.writeByteArrayToFile. Thanks to scop. +o IO-348: Missing information in IllegalArgumentException thrown by org.apache.commons.io.FileUtils#validateListFilesParameters. Thanks to plcstpierre. +o IO-345: Supply a hook method allowing Tailer actively determining stop condition. Thanks to mkresse. +o IO-437: Make IOUtils.EOF public and reuse it in various classes. + +Fixed Bugs: +o IO-446: adds an endOfFileReached method to the TailerListener Thanks to Jeffrey Barrus. +o IO-484: FilenameUtils should handle embedded null bytes Thanks to Philippe Arteau. +o IO-481: Changed/Corrected algorithm for waitFor +o IO-428: BOMInputStream.skip returns wrong count if stream contains no BOM Thanks to Stefan Gmeiner. +o IO-488: FileUtils.waitFor(...) swallows thread interrupted status Thanks to Björn Buchner. +o IO-452: Support for symlinks with missing target. Added support for JDK7 symlink features when present Thanks to David Standish. +o IO-453: Regression in FileUtils.readFileToString from 2.0.1 Thanks to Steven Christou. +o IO-451: ant test fails - resources missing from test classpath Thanks to David Standish. +o IO-435: Document that FileUtils.deleteDirectory, directoryContains and cleanDirectory + may throw an IllegalArgumentException in case the passed directory does not + exist or is not a directory. Thanks to Dominik Stadler. +o IO-424: Javadoc fixes, mostly to appease 1.8.0 Thanks to Ville Skyttä. +o IO-389: FileUtils.sizeOfDirectory can throw IllegalArgumentException Thanks to Austin Doupnik. +o IO-390: FileUtils.sizeOfDirectoryAsBigInteger can overflow. + Ensure that recursive calls all use BigInteger +o IO-385: FileUtils.doCopyFile can potentially loop for ever + Exit loop if no data to copy +o IO-383: FileUtils.doCopyFile caches the file size; needs to be documented + Added Javadoc; show file lengths in exception message +o IO-380: FileUtils.copyInputStreamToFile should document it closes the input source Thanks to claudio_ch. +o IO-279: Tailer erroneously considers file as new. + Fix to use file.lastModified() rather than System.currentTimeMillis() +o IO-356: CharSequenceInputStream#reset() behaves incorrectly in case when buffer size is not dividable by data size. + Fix code so skip relates to the encoded bytes; reset now re-encodes the data up to the point of the mark +o IO-368: ClassLoaderObjectInputStream does not handle primitive typed members +o IO-314: Deprecate all methods that use the default encoding +o IO-338: When a file is rotated, finish reading previous file prior to starting new one +o IO-354: Commons IO Tailer does not respect UTF-8 Charset. +o IO-323: What should happen in FileUtils.sizeOf[Directory] when an overflow takes place? + Added Javadoc. +o IO-372: FileUtils.moveDirectory can produce misleading error message on failiure +o IO-362: IOUtils.contentEquals* methods returns false if input1 == input2, should return true. Thanks to mmadson, ggregory. +o IO-357: [Tailer] InterruptedException while the thread is sleeping is silently ignored Thanks to mortenh. +o IO-352: Spelling fixes. Thanks to scop. +o IO-436: Improper JavaDoc comment for FilenameUtils.indexOfExtension. Thanks to christoph.schneegans. + +Changes: +o IO-433: Converted all testcases to JUnit 4 +o IO-466: Added testcase to show this was fixed with IO-423 +o IO-479: Correct exception message in FileUtils.getFile(File, String...) Thanks to Zhouce Chen. +o IO-465: Update to JUnit 4.12 Thanks to based2. +o IO-462: IOExceptionWithCause no longer needed +o IO-422: Deprecate Charsets Charset constants in favor of Java 7's java.nio.charset.StandardCharsets +o IO-239: Convert IOCase to a Java 1.5+ Enumeration + [N.B. this is binary compatible] +o IO-328: getPrefixLength returns null if filename has leading slashes + Javadoc: add examples to show correct behaviour; add unit tests +o IO-299: FileUtils.listFilesAndDirs includes original dir in results even when it doesn't match filter + Javadoc: clarify that original dir is included in the results +o IO-375: FilenameUtils.splitOnTokens(String text) check for '**' could be simplified +o IO-374: WildcardFileFilter ctors should not use null to mean IOCase.SENSITIVE when delegating to other ctors + +Compatibility with 2.4: +Binary compatible: Yes. +Source compatible: Yes. +Semantic compatible: Yes. + +Compatibility with 2.2 and 1.4: +Binary compatible: Yes. +Source compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318. +Semantic compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318. + +Commons IO 2.5 requires JDK 1.6 or later. +Commons IO 2.4 requires JDK 1.6 or later. +Commons IO 2.3 requires JDK 1.6 or later. +Commons IO 2.2 requires JDK 1.5 or later. +Commons IO 1.4 requires JDK 1.3 or later. + +============================================================================== +Apache Commons IO Version 2.4 +============================================================================== + +Changes in this version include: + +New features: +o IO-269: Tailer locks file from deletion/rename on Windows. Thanks to +sebb. +o IO-333: Export OSGi packages at version 1.x in addition to 2.x. Thanks +to fmeschbe. +o IO-320: Add XmlStreamReader support for UTF-32. Thanks to ggregory. +o IO-331: BOMInputStream wrongly detects UTF-32LE_BOM files as +UTF-16LE_BOM files in method getBOM(). Thanks to ggregory. +o IO-327: Add byteCountToDisplaySize(BigInteger). Thanks to ggregory. +o IO-326: Add new FileUtils.sizeOf[Directory] APIs to return BigInteger. +Thanks to ggregory. +o IO-325: Add IOUtils.toByteArray methods to work with URL and URI. Thanks +to raviprak. +o IO-324: Add missing Charset sister APIs to method that take a String +charset name. Thanks to raviprak. + +Fixed Bugs: +o IO-336: Yottabyte (YB) incorrectly defined in FileUtils. Thanks to +rleavelle. +o IO-279: Tailer erroneously considers file as new. Thanks to Sergio +Bossa, Chris Baron. +o IO-335: Tailer#readLines - incorrect CR handling. +o IO-334: FileUtils.toURLs throws NPE for null parameter; document the +behavior. +o IO-332: Improve tailer's reading performance. Thanks to liangly. +o IO-279: Improve Tailer performance with buffered reads (see IO-332). +o IO-329: FileUtils.writeLines uses unbuffered IO. Thanks to tivv. +o IO-319: FileUtils.sizeOfDirectory follows symbolic links. Thanks to +raviprak. + + +Compatibility with 2.3: +Binary compatible: Yes. +Source compatible: Yes. +Semantic compatible: Yes. + +Compatibility with 2.2 and 1.4: +Binary compatible: Yes. +Source compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318. +Semantic compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318. + +Commons IO 2.4 requires JDK 1.6 or later. +Commons IO 2.3 requires JDK 1.6 or later. +Commons IO 2.2 requires JDK 1.5 or later. +Commons IO 1.4 requires JDK 1.3 or later. + +============================================================================== +Apache Commons IO Version 2.3 +============================================================================== + +Changes in this version include: + +New features: +o IO-322: Add and use class Charsets. Thanks to ggregory. +o IO-321: ByteOrderMark UTF_32LE is incorrect. Thanks to ggregory. +o IO-318: Add Charset sister APIs to method that take a String charset name. Thanks to ggregory. + +Compatibility with 2.2 and 1.4: +Binary compatible: Yes. +Source compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318. +Semantic compatible: No, see the rare case in https://issues.apache.org/jira/browse/IO-318. + +Commons IO 2.3 requires JDK 1.6 or later. +Commons IO 2.2 requires JDK 1.5 or later. +Commons IO 1.4 requires JDK 1.3 or later. + +============================================================================== +Apache Commons IO Version 2.2 +============================================================================== + +Changes in this version include: + +New features: +o Add IOUTils.toBufferedReader(Reader) Issue: IO-313. Thanks to ggregory. +o Allow applications to provide buffer (or size) for copyLarge methods. Issue: IO-308. Thanks to Manoj Mokashi. +o New copyLarge() method in IOUtils that takes additional offset, length arguments Issue: IO-305. Thanks to Manoj Mokashi. +o Use terabyte (TB), petabyte (PB) and exabyte (EB) in FileUtils.byteCountToDisplaySize(long size) Issue: IO-287. Thanks to Ron Kuris, Gary Gregory. +o FileUtils.listFiles() doesn't return directories Issue: IO-173. Thanks to Marcos Vinícius da Silva. +o CharSequenceInputStream to efficiently stream content of a CharSequence Issue: IO-297. Thanks to Oleg Kalnichevski. +o The second constructor of Tailer class does not pass 'delay' to the third one Issue: IO-304. Thanks to liangly. +o TeeOutputStream does not call branch.close() when main.close() throws an exception Issue: IO-303. Thanks to fabian.barney. +o ArrayIndexOutOfBoundsException in BOMInputStream when reading a file without BOM multiple times Issue: IO-302. Thanks to jsteuerwald, detinho. +o Add IOUtils.closeQuietly(Selector) necessary Issue: IO-301. Thanks to kaykay.unique. +o IOUtils.closeQuietly() should take a ServerSocket as a parameter Issue: IO-292. Thanks to sebb. +o Add read/readFully methods to IOUtils Issue: IO-290. Thanks to sebb. +o Supply a ReversedLinesFileReader Issue: IO-288. Thanks to Georg Henzler. +o Add new function FileUtils.directoryContains. Issue: IO-291. Thanks to ggregory. +o FileUtils.contentEquals and IOUtils.contentEquals - Add option to ignore "line endings" + Added contentEqualsIgnoreEOL methods to both classes Issue: IO-275. Thanks to CJ Aspromgos. + +Fixed Bugs: +o IOUtils.read(InputStream/Reader) ignores the offset parameter Issue: IO-311. Thanks to Robert Muir. +o CharSequenceInputStream(CharSequence s, Charset charset, int bufferSize) ignores bufferSize Issue: IO-312. +o FileUtils.moveDirectoryToDirectory removes source directory if destination is a subdirectory Issue: IO-300. +o ReaderInputStream#read(byte[] b, int off, int len) should check for valid parameters Issue: IO-307. +o ReaderInputStream#read(byte[] b, int off, int len) should always return 0 for length == 0 Issue: IO-306. +o "FileUtils#deleteDirectoryOnExit(File)" does not work Issue: IO-276. Thanks to nkami. +o BoundedInputStream.read() treats max differently from BoundedInputStream.read(byte[]...) Issue: IO-273. Thanks to sebb. +o Various methods of class 'org.apache.commons.io.FileUtils' incorrectly suppress 'java.io.IOException' Issue: IO-298. Thanks to Christian Schulte. + +Changes: +o ReaderInputStream optimization: more efficient reading of small chunks of data Issue: IO-296. Thanks to Oleg Kalnichevski. + + +Compatibility with 2.1 and 1.4: +Binary compatible: Yes +Source compatible: Yes +Semantic compatible: Yes. Check the bug fixes section for semantic bug fixes + +Commons IO 2.2 requires a minimum of JDK 1.5. +Commons IO 1.4 requires a minimum of JDK 1.3. + +============================================================================== +Apache Commons IO Version 2.1 +============================================================================== + +New features: +o Use standard Maven directory layout Issue: IO-285. Thanks to ggregory. +o Add IOUtils API toString for URL and URI to get contents Issue: IO-284. Thanks to ggregory. +o Add API FileUtils.copyFile(File input, OutputStream output) Issue: IO-282. Thanks to ggregory. +o FileAlterationObserver has no getter for FileFilter Issue: IO-262. +o Add FileUtils.getFile API with varargs parameter Issue: IO-261. +o Add new APPEND parameter for writing string into files Issue: IO-182. +o Add new read method "toByteArray" to handle InputStream with known size. Issue: IO-251. Thanks to Marco Albini. + +Fixed Bugs: +o Dubious use of mkdirs() return code Issue: IO-280. Thanks to sebb. +o ReaderInputStream enters infinite loop when it encounters an unmappable character Issue: IO-277. +o FileUtils.moveFile() JavaDoc should specify FileExistsException thrown Issue: IO-264. +o ClassLoaderObjectInputStream does not handle Proxy classes Issue: IO-260. +o Tailer returning partial lines when reaching EOF before EOL Issue: IO-274. Thanks to Frank Grimes. +o FileUtils.copyFile() throws IOException when copying large files to a shared directory (on Windows) Issue: IO-266. Thanks to Igor Smereka. +o FileSystemUtils.freeSpaceKb throws exception for Windows volumes with no visible files. + Improve coverage by also looking for hidden files. Issue: IO-263. Thanks to Gil Adam. + +Changes: +o FileAlterationMonitor.stop(boolean allowIntervalToFinish) Issue: IO-259. + +============================================================================== +Apache Commons IO Package 2.0.1 +============================================================================== + +Compatibility with 2.0 and 1.4 +------------------------------ +Binary compatible - Yes + +Source compatible - Yes + +Semantic compatible - Yes + Check the bug fixes section for semantic bug fixes + +Commons IO 2.0.1 requires a minimum of JDK 1.5 + (Commons IO 1.4 had a minimum of JDK 1.3) + +Enhancements from 2.0 +--------------------- + + * [IO-256] - Provide thread factory for FileAlternationMonitor + +Bug fixes from 2.0 +------------------ + + * [IO-257] - BOMInputStream.read(byte[]) can return 0 which it should not + * [IO-258] - XmlStreamReader consumes the stream during encoding detection + +============================================================================== +Apache Commons IO Package 2.0 +============================================================================== + +Compatibility with 1.4 +---------------------- +Binary compatible - Yes + +Source compatible - Yes + +Semantic compatible - Yes + Check the bug fixes section for semantic bug fixes + +Commons IO 2.0 requires a minimum of JDK 1.5 + (Commons IO 1.4 had a minimum of JDK 1.3) + +Deprecations from 1.4 +--------------------- + +- IOUtils + - write(StringBuffer, Writer) in favour of write(CharSequence, Writer) + - write(StringBuffer, OutputStream) in favour of write(CharSequence, OutputStream) + - write(StringBuffer, OutputStream, String) in favour of write(CharSequence, OutputStream, String) + +- FileFilterUtils + - andFileFilter(IOFileFilter, IOFileFilter) in favour of and(IOFileFilter...) + - orFileFilter(IOFileFilter, IOFileFilter) in favour of or(IOFileFilter...) + +Enhancements from 1.4 +--------------------- + + * [IO-140] Move minimum Java requirement from JDK 1.3 to JDK 1.5 + - use Generics + - add new CharSequence write() flavour methods to IOUtils and FileUtils + - replace StringBuffer with StringBuilder, where appropriate + - add new Reader/Writer methods to ProxyReader and ProxyWriter + - Annotate with @Override and @Deprecated + + * [IO-178] New BOMInputStream and ByteOrderMark implementations - to detect and optionally exclude an initial Byte Order mark (BOM) + * [IO-197] New BoundedInputStream (copied from from Apache JackRabbit) + * [IO-193] New Broken Input and Output streams + * [IO-132] New File Listener/Monitor facility + * [IO-158] New ReaderInputStream and WriterOutputStream implementations + * [IO-139] New StringBuilder Writer implementation + * [IO-192] New Tagged Input and Output streams + * [IO-177] New Tailer class - simple implementation of the Unix "tail -f" functionality + * [IO-162] New XML Stream Reader/Writer implementations (from ROME via plexus-utils) + + * [IO-142] Comparators - add facility to sort file lists/arrays + * [IO-186] Comparators - new Composite and Directory File Comparator implementations + * [IO-176] DirectoryWalker - add filterDirectoryContents() callback method for filtering directory contents + * [IO-210] FileFilter - new Magic Number FileFilter + * [IO-221] FileFilterUtils - add methods for suffix and prefix filters which take an IOCase object + * [IO-232] FileFilterUtils - add method for name filters which take an IOCase object + * [IO-229] FileFilterUtils - add varargs and() and or() methods + * [IO-198] FileFilterUtils - add ability to apply file filters to collections and arrays + * [IO-156] FilenameUtils - add normalize() and normalizeNoEndSeparator() methods which allow the separator character to be specified + * [IO-194] FileSystemUtils - add freeSpaceKb() method with no input arguments + * [IO-185] FileSystemUtils - add freeSpaceKb() methods that take a timeout parameter - fixes freeSpaceWindows() blocks + * [IO-155] FileUtils - use NIO to copy files + * [IO-168] FileUtils - add new isSymlink() method + * [IO-219] FileUtils - throw FileExistsException when moving a file or directory if the destination already exists + * [IO-234] FileUtils - add Methods for retrieving System User/Temp directories/paths + * [IO-208] FileUtils - add timeout (connection and read) support for copyURLToFile() method + * [IO-238] FileUtils - add sizeOf(File) method + * [IO-181] LineIterator now implements Iterable + * [IO-224] IOUtils - add closeQuietly(Closeable) and closeQuietly(Socket) methods + * [IO-203] IOUtils - add skipFully() method for InputStreams + * [IO-137] IOUtils and ByteArrayOutputStream - add toBufferedInputStream() method to avoid unnecessary array allocation/copy + * [IO-195] Proxy streams/Reader/Writer - provide exception handling methods + * [IO-211] Proxy Input/Output streams - add pre/post processing support + * [IO-242] Proxy Reader/Writer - add pre/post processing support + +Bug fixes from 1.4 +------------------ + * [IO-214] ByteArrayOutputStream - fix inconsistent synchronization of fields + * [IO-201] Counting Input/Output streams - fix inconsistent synchronization + * [IO-159] FileCleaningTracker - fix remove() never returns null + * [IO-220] FileCleaningTracker - fix Vector performs badly under load + * [IO-167] FilenameUtils - fix case-insensitive string handling in FilenameUtils and FilesystemUtils + * [IO-179] FilenameUtils - fix StringIndexOutOfBounds exception in getPathNoEndSeparator() + * [IO-248] FilenameUtils - fix getFullPathNoEndSeparator() returns empty while path is a one level directory + * [IO-246] FilenameUtils - fix wildcardMatch gives incorrect results + * [IO-187] FileSystemUtils - fix freeSpaceKb() doesn't work with relative paths on Linux + * [IO-160] FileSystemUtils - fix freeSpace() fails on solaris + * [IO-209] FileSystemUtils - fix freeSpaceKb() fails to return correct size for a windows mount point + * [IO-163] FileUtils - fix toURLs() using deprecated method of conversion to URL + * [IO-168] FileUtils - fix Symbolic links followed when deleting directory + * [IO-231] FileUtils - fix wrong exception message generated in isFileNewer() method + * [IO-207] FileUtils - fix race condition in forceMkdir() method + * [IO-217] FileUtils - fix copyDirectoryToDirectory() makes infinite loops + * [IO-166] FileUtils - fix URL decoding in toFile(URL) + * [IO-190] FileUtils - fix copyDirectory not preserving lastmodified date on sub-directories + * [IO-240] FileFilterUtils - ensure cvsFilter and svnFilter are only created once. + * [IO-175] IOUtils - fix copyFile() issues with very large files + * [IO-191] Improvements from static analysis + * [IO-216] LockableFileWriter - delete files quietly when an exception is thrown during initialization + * [IO-243] SwappedDataInputStream - fix readBoolean is inverted + * [IO-235] Tests - remove unused YellOnFlushAndCloseOutputStream from CopyUtilsTest + * [IO-161] Tests - fix FileCleaningTrackerTestCase hanging + +Documentation changes from 1.4 +------------------------------ + * [IO-183 FilenameUtils.getExtension() method documentation improvements + * [IO-226 FileUtils.byteCountToDisplaySize() documentation corrections + * [IO-205 FileUtils.forceMkdir() documentation improvements + * [IO-215 FileUtils copy file/directory improve documentation regarding preserving the last modified date + * [IO-189 HexDump.dump() method documentation improvements + * [IO-171 IOCase document that it assumes there are only two OSes: Windows and Unix + * [IO-223 IOUtils.copy() documentation corrections + * [IO-247 IOUtils.closeQuietly() improve documentation with examples + * [IO-202 NotFileFilter documentation corrections + * [IO-206 ProxyInputStream - fix misleading parameter names + * [IO-212 ProxyInputStream.skip() documentation corrections + +============================================================================== +Apache Commons IO Version 1.4 +============================================================================== + +Compatibility with 1.3.2 +------------------------ +Binary compatible - Yes + +Source compatible - Yes + +Semantic compatible - Yes + Check the bug fixes section for semantic bug fixes + +Commons IO 1.4 introduces four new implementations which depend on JDK 1.4 features +(CharSequenceReader, FileWriterWithEncoding, IOExceptionWithCause and RegexFileFilter). +It has been built with the JDK source and target options set to JDK 1.3 and, except for +those implementations, can be used with JDK 1.3 (see IO IO-127). + +Deprecations from 1.3.2 +----------------------- +- FileCleaner deprecated in favour of FileCleaningTracker [see IO-116] + +Bug fixes from 1.3.2 +-------------------- +- FileUtils + - forceDelete of orphaned Softlinks does not work [IO-147] + - Infinite loop on FileUtils.copyDirectory when the destination directory is within + the source directory [IO-141] + - Add a copyDirectory() method that makes use of FileFilter [IO-105] + - Add moveDirectory() and moveFile() methods [IO-77] + +- HexDump + - HexDump's use of static StringBuffers isn't thread-safe [IO-136] + +Enhancements from 1.3.2 +----------------------- +- FileUtils + - Add a deleteQuietly method [IO-135] + +- FilenameUtils + - Add file name extension separator constants[IO-149] + +- IOExceptionWithCause [IO-148] + - Add a new IOException implementation with constructors which take a cause + +- TeeInputStream [IO-129] + - Add new Tee input stream implementation + +- FileWriterWithEncoding [IO-153] + - Add new File Writer implementation that accepts an encoding + +- CharSequenceReader [IO-138] + - Add new Reader implementation that handles any CharSequence (String, + StringBuffer, StringBuilder or CharBuffer) + +- ThesholdingOuputStream [IO-121] + - Add a reset() method which sets the count of the bytes written back to zero. + +- DeferredFileOutputStream [IO-130] + - Add support for temporary files + +- ByteArrayOutputStream + - Add a new write(InputStream) method [IO-152] + +- New Closed Input/Output stream implementations [IO-122] + - AutoCloseInputStream - automatically closes and discards the underlying input stream + - ClosedInputStream - returns -1 for any read attempts + - ClosedOutputStream - throws an IOException for any write attempts + - CloseShieldInputStream - prevents the underlying input stream from being closed. + - CloseShieldOutputStream - prevents the underlying output stream from being closed. + +- Add Singleton Constants to several stream classes [IO-143] + +- PrefixFileFilter [IO-126] + - Add faciltiy to specify case sensitivity on prefix matching + +- SuffixFileFilter [IO-126] + - Add faciltiy to specify case sensitivity on suffix matching + +- RegexFileFilter [IO-74] + - Add new regular expression file filter implementation + +- Make IOFileFilter implementations Serializable [IO-131] + +- Improve IOFileFilter toString() methods [IO-120] + +- Make fields final so classes are immutable/threadsafe [IO-133] + - changes to Age, Delegate, Name, Not, Prefix, Regex, Size, Suffix and Wildcard IOFileFilter + implementations. + +- IOCase + - Add a compare method to IOCase [IO-144] + +- Add a package of java.util.Comparator implementations for files [IO-145] + - DefaultFileComparator - compare files using the default File.compareTo(File) method. + - ExtensionFileComparator - compares files using file name extensions. + - LastModifiedFileComparator - compares files using the last modified date/time. + - NameFileComparator - compares files using file names. + - PathFileComparator - compares files using file paths. + - SizeFileComparator - compares files using file sizes. + +============================================================================== +Apache Commons IO Version 1.3.2 +============================================================================== + +Compatibility with 1.3.1 +---------------------- +Binary compatible - Yes + +Source compatible - Yes + +Semantic compatible - Yes + +Compatibility with 1.3 +---------------------- +Binary compatible - No + See [IO-113] + +Source compatible - No + See [IO-113] + +Semantic compatible - Yes + +Enhancements since 1.3.1 +------------------------ + +- Created the FileCleaningTracker, basically a non-static version of the + FileCleaner, which can be controlled by the user. [IO-116] +- The FileCleaner is deprecated. + +Bug fixes from 1.3.1 +-------------------- + +- Some tests, which are implicitly assuming a Unix-like file system, are + now skipped on Windows. [IO-115] +- EndianUtils + - Both readSwappedUnsignedInteger(...) methods could return negative + numbers due to int/long casting. [IO-117] + +Bug fixes from 1.3 +------------------ + +- FileUtils + - NPE in openOutputStream(File) when file has no parent in path [IO-112] + - readFileToString(File) is not static [IO-113] + +============================================================================== +Apache Commons IO Version 1.3.1 +============================================================================== + +Compatibility with 1.3 +---------------------- +Binary compatible - No + See [IO-113] + +Source compatible - No + See [IO-113] + +Semantic compatible - Yes + +Bug fixes from 1.3 +------------------ + +- FileUtils + - NPE in openOutputStream(File) when file has no parent in path [IO-112] + - readFileToString(File) is not static [IO-113] + +============================================================================== +Apache Commons IO Version 1.3 +============================================================================== + +Compatibility with 1.2 +---------------------- +Binary compatible - Yes + +Source compatible - Yes + +Semantic compatible - Yes + Check the bug fixes section for semantic bug fixes + +Deprecations from 1.2 +--------------------- +- WildcardFilter deprecated, replaced by WildcardFileFilter + - old class only accepted files, thus had a confusing dual purpose + +- FileSystemUtils.freeSpace deprecated, replaced by freeSpaceKb + - freeSpace returns a result that varies by operating system and + thus isn't that useful + - freeSpaceKb returns much better and more consistent results + - freeSpaceKb existed in v1.2, so this is a gentle cutover + +Bug fixes from 1.2 +------------------ +- LineIterator now implements Iterator + - It was always supposed to... + +- FileSystemUtils.freeSpace/freeSpaceKb [IO-83] + - These should now work on AIX and HP-UX + +- FileSystemUtils.freeSpace/freeSpaceKb [IO-90] + - Avoid infinite looping in Windows + - Catch more errors with nice messages + +- FileSystemUtils.freeSpace [IO-91] + - This is now documented not to work on SunOS 5 + +- FileSystemUtils [IO-93] + - Fixed resource leak leading to 'Too many open files' error + - Previously did not destroy Process instances (as JDK Javadoc is so poor) + - http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4801027 + +- FileUtils.touch [IO-100] + - The touch method previously gave no indication when the file could not + be touched successfully (such as due to access restrictions) - it now + throws an IOException if the last modified date cannot be changed + +- FileCleaner + - This now handles the situation where an error occurs when deleting the file + +- IOUtils.copy [IO-84] + - Copy methods could return inaccurate byte/char count for large streams + - The copy(InputStream, OutputStream) method now returns -1 if the count is greater than an int + - The copy(Reader, Writer) method now throws now returns -1 if the count is greater than an int + - Added a new copyLarge(InputStream, OutputStream) method that returns a long + - Added a new copyLarge(Reader, Writer) method that returns a long + +- CountingInputStream/CountingOutputStream [IO-84] + - Methods were declared as int thus the count was innacurate for large streams + - new long based methods getByteCount()/resetByteCount() added + - existing methods changed to throw an exception if the count is greater than an int + +- FileBasedTestCase + - Fixed bug in compare content methods identified by GNU classpath + +- EndianUtils.writeSwappedLong(byte[], int) [IO-101] + - An int overrun in the bit shifting when it should have been a long + +- EndianUtils.writeSwappedLong(InputStream) [IO-102] + - The return of input.read(byte[]) was not being checked to ensure all 8 bytes were read + +Enhancements from 1.2 +--------------------- +- DirectoryWalker [IO-86] + - New class designed for subclassing to walk through a set of files. + DirectoryWalker provides the walk of the directories, filtering of + directories and files, and cancellation support. The subclass must provide + the specific behaviour, such as text searching or image processing. + +- IOCase + - New class/enumeration for case-sensitivity control + +- FilenameUtils + - New methods to handle case-sensitivity + - wildcardMatch - new method that has IOCase as a parameter + - equals - new method that has IOCase as a parameter + +- FileUtils [IO-108] - new default encoding methods for: + - readFileToString(File) + - readLines(File) + - lineIterator(File) + - writeStringToFile(File, String) + - writeLines(File, Collection) + - writeLines(File, Collection, String) + +- FileUtils.openOutputStream [IO-107] + - new method to open a FileOutputStream, creating parent directories if required +- FileUtils.touch +- FileUtils.copyURLToFile +- FileUtils.writeStringToFile +- FileUtils.writeByteArrayToFile +- FileUtils.writeLines + - enhanced to create parent directories if required +- FileUtils.openInputStream [IO-107] + - new method to open a FileInputStream, providing better error messages than the JDK + +- FileUtils.isFileOlder + - new methods to check if a file is older (i.e. isFileOlder()) - counterparts + to the existing isFileNewer() methods. + +- FileUtils.checksum, FileUtils.checksumCRC32 + - new methods to create a checksum of a file + +- FileUtils.copyFileToDirectory [IO-104] + - new variant that optionally retains the file date + +- FileDeleteStrategy +- FileCleaner [IO-56,IO-70] + - FileDeleteStrategy is a strategy for handling file deletion + - This can be used as a calback in FileCleaner + - Together these allow FileCleaner to do a forceDelete to kill directories + +- FileCleaner.exitWhenFinished [IO-99] + - A new method that allows the internal cleaner thread to be cleanly terminated + +- WildcardFileFilter + - Replacement for WildcardFilter + - Accepts both files and directories + - Ability to control case-sensitivity + +- NameFileFilter + - Ability to control case-sensitivity + +- FileFileFilter + - New IOFileFilter implementation + - Accepts files where File.isFile() is true + - In other words it filters out directories + - Singleton instance provided (FILE) + +- CanReadFileFilter + - New IOFileFilter implementation + - Accepts files where File.canRead() is true + - Singleton instances provided (CAN_READ/CANNOT_READ/READ_ONLY) + +- CanWriteFileFilter + - New IOFileFilter implementation + - Accepts files where File.canWrite() is true + - Singleton instances provided (CAN_WRITE/CANNOT_WRITE) + +- HiddenFileFilter + - New IOFileFilter implementation + - Accepts files where File.isHidden() is true + - Singleton instances provided (HIDDEN/VISIBLE) + +- EmptyFileFilter + - New IOFileFilter implementation + - Accepts files or directories that are empty + - Singleton instances provided (EMPTY/NOT_EMPTY) + +- TrueFileFilter/FalseFileFilter/DirectoryFileFilter + - New singleton instance constants (TRUE/FALSE/DIRECTORY) + - The new constants are more JDK 1.5 friendly with regards to static imports + (whereas if everything uses INSTANCE, then they just clash) + - The old INSTANCE constants are still present and have not been deprecated + +- FileFilterUtils.sizeRangeFileFilter + - new sizeRangeFileFilter(long minimumSize, long maximumSize) method which + creates a filter that accepts files within the specified size range. + +- FileFilterUtils.makeDirectoryOnly/makeFileOnly + - two new methods that decorate a file filter to make it apply to + directories only or files only + +- NullWriter + - New writer that acts as a sink for all data, as per /dev/null + +- NullInputStream + - New input stream that emulates a stream of a specified size + +- NullReader + - New reader that emulates a reader of a specified size + +- ByteArrayOutputStream [IO-97] + - Performance enhancements + +============================================================================== +Apache Commons IO Version 1.2 +============================================================================== + +Compatibility with 1.1 +---------------------- +Binary compatible - Yes + +Source compatible - Yes + +Semantic compatible - Yes + +Deprecations from 1.1 +--------------------- + +Bug fixes from 1.1 +------------------ +- FileSystemUtils.freeSpace(drive) + Fix to allow Windows based command to function in French locale + +- FileUtils.read* + Increase certainty that files are closed in case of error + +- LockableFileWriter + Locking mechanism was broken and only provided limited protection [38942] + File deletion and locking in case of constructor error was broken + +Enhancements from 1.1 +--------------------- +- AgeFileFilter/SizeFileFilter + New file filters that compares against the age and size of the file + +- FileSystemUtils.freeSpaceKb(drive) + New method that unifies result to be in kilobytes [38574] + +- FileUtils.contentEquals(File,File) + Performance improved by adding length and file location checking + +- FileUtils.iterateFiles + Two new method to provide direct access to iterators over files + +- FileUtils.lineIterator + IOUtils.lineIterator + New methods to provide an iterator over the lines in a file [38083] + +- FileUtils.copyDirectoryToDirectory + New method to copy a directory to within another directory [36315] + +============================================================================== +Apache Commons IO Version 1.1 +============================================================================== + +Incompatible changes from 1.0 +----------------------------- +Binary compatible - Yes + +Source compatible - Yes + +Semantic compatible - Yes, except: +- FileUtils.writeStringToFile() + A null encoding previously used 'ISO-8859-1', now it uses the platform default + Generally this will make no difference + +- LockableFileWriter + Improved validation and now create directories if necesssary + +plus these bug fixes may affect you semantically: +- FileUtils.touch() (Bug fix 29821) + Now creates the file if it did not previously exist + +- FileUtils.toFile(URL) (Bug fix 32575) + Now handles escape syntax such as %20 + +- FileUtils.sizeOfDirectory() (Bug fix 36801) + May now return a size of 0 if the directory is security restricted + +Deprecations from 1.0 +--------------------- +- CopyUtils has been deprecated. + Its methods have been moved to IOUtils. + The new IOUtils methods handle nulls better, and have clearer names. + +- IOUtils.toByteArray(String) - Use {@link String#getBytes()} +- IOUtils.toString(byte[]) - Use {@link String#String(byte[])} +- IOUtils.toString(byte[],String) - Use {@link String#String(byte[],String)} + +Bug fixes from 1.0 +------------------ +- FileUtils - touch() [29821] + Now creates the file if it did not previously exist + +- FileUtils - toFile(URL) [32575] + Now handles escape syntax such as %20 + +- FileFilterUtils - makeCVSAware(IOFileFilter) [33023] + Fixed bug that caused method to be completely broken + +- CountingInputStream [33336] + Fixed bug that caused the count to reduce by one at the end of the stream + +- CountingInputStream - skip(long) [34311] + Bytes from calls to this method were not previously counted + +- NullOutputStream [33481] + Remove unnecessary synchronization + +- AbstractFileFilter - accept(File, String) [30992] + Fixed broken implementation + +- FileUtils [36801] + Previously threw NPE when listing files in a security restricted directory + Now throw IOException with a better message + +- FileUtils - writeStringToFile() + Null encoding now correctly uses the platform default + +Enhancements from 1.0 +--------------------- +- FilenameUtils - new class [33303,29351] + A static utility class for working with filenames + Seeks to ease the pain of developing on Windows and deploying on Unix + +- FileSystemUtils - new class [32982,36325] + A static utility class for working with file systems + Provides one method at present, to get the free space on the filing system + +- IOUtils - new public constants + Constants for directory and line separators on Windows and Unix + +- IOUtils - toByteArray(Reader,encoding) + Handles encodings when reading to a byte array + +- IOUtils - toCharArray(InputStream) [28979] + - toCharArray(InputStream,encoding) + - toCharArray(Reader) + Reads a stream/reader into a charatcter array + +- IOUtils - readLines(InputStream) [36214] + - readLines(InputStream,encoding) + - readLines(Reader) + Reads a stream/reader line by line into a List of Strings + +- IOUtils - toInputStream(String) [32958] + - toInputStream(String,encoding) + Creates an input stream that uses the string as a source of data + +- IOUtils - writeLines(Collection,lineEnding,OutputStream) [36214] + - writeLines(Collection,lineEnding,OutputStream,encoding) + - writeLines(Collection,lineEnding,Writer) + Writes a collection to a stream/writer line by line + +- IOUtils - write(...) + Write data to a stream/writer (moved from CopyUtils with better null handling) + +- IOUtils - copy(...) + Copy data between streams (moved from CopyUtils with better null handling) + +- IOUtils - contentEquals(Reader,Reader) + Method to compare the contents of two readers + +- FileUtils - toFiles(URL[]) + Converts an array of URLs to an array of Files + +- FileUtils - copyDirectory() [32944] + New methods to copy a directory + +- FileUtils - readFileToByteArray(File) + Reads an entire file into a byte array + +- FileUtils - writeByteArrayToFile(File,byte[]) + Writes a byte array to a file + +- FileUtils - readLines(File,encoding) [36214] + Reads a file line by line into a List of Strings + +- FileUtils - writeLines(File,encoding,List) + writeLines(File,encoding,List,lineEnding) + Writes a collection to a file line by line + +- FileUtils - EMPTY_FILE_ARRAY + Constant for an empty array of File objects + +- ConditionalFileFilter - new interface [30705] + Defines the behaviour of list based filters + +- AndFileFilter, OrFileFilter [30705] + Now support a list of filters to and/or + +- WildcardFilter [31115] + New filter that can match using wildcard file names + +- FileFilterUtils - makeSVNAware(IOFileFilter) + New method, like makeCVSAware, that ignores Subversion source control directories + +- ClassLoaderObjectInputStream + An ObjectInputStream that supports a ClassLoader + +- CountingInputStream,CountingOutputStream - resetCount() [28976] + Adds the ability to reset the count part way through reading/writing the stream + +- DeferredFileOutputStream - writeTo(OutputStream) [34173] + New method to allow current contents to be written to a stream + +- DeferredFileOutputStream [34142] + Performance optimizations avoiding double buffering + +- LockableFileWriter - encoding support [36825] + Add support for character encodings to LockableFileWriter + Improve the validation + Create directories if necesssary + +- IOUtils and EndianUtils are no longer final [28978] + Allows developers to have subclasses if desired + +============================================================================== +Feedback +============================================================================== + +Open source works best when you give feedback: +http://commons.apache.org/io/ + +Please direct all bug reports to JIRA +http://issues.apache.org/jira/browse/IO + +Or subscribe to the commons-user mailing list (prefix emails by [io]) +http://commons.apache.org/mail-lists.html + +The Commons-IO Team diff --git a/docs/licenses/Apache Commons/docs/allclasses-frame.html b/docs/licenses/Apache Commons/docs/allclasses-frame.html new file mode 100644 index 0000000..0061da0 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/allclasses-frame.html @@ -0,0 +1,125 @@ + + + +
+ +Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final char |
+UTF_BOM |
+65279 |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final char |
+EXTENSION_SEPARATOR |
+46 |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final long |
+ONE_EB |
+1152921504606846976L |
+
+
+public static final long |
+ONE_GB |
+1073741824L |
+
+
+public static final long |
+ONE_KB |
+1024L |
+
+
+public static final long |
+ONE_MB |
+1048576L |
+
+
+public static final long |
+ONE_PB |
+1125899906842624L |
+
+
+public static final long |
+ONE_TB |
+1099511627776L |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final char |
+DIR_SEPARATOR_UNIX |
+47 |
+
+
+public static final char |
+DIR_SEPARATOR_WINDOWS |
+92 |
+
+
+public static final int |
+EOF |
+-1 |
+
+
+public static final String |
+LINE_SEPARATOR_UNIX |
+"\n" |
+
+
+public static final String |
+LINE_SEPARATOR_WINDOWS |
+"\r\n" |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/deprecated-list.html b/docs/licenses/Apache Commons/docs/deprecated-list.html new file mode 100644 index 0000000..59b8118 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/deprecated-list.html @@ -0,0 +1,473 @@ + + + + + +Class and Description | +
---|
org.apache.commons.io.CopyUtils
+ Use IOUtils. Will be removed in 2.0.
+ Methods renamed to IOUtils.write() or IOUtils.copy().
+ Null handling behaviour changed in IOUtils (null data does not
+ throw NullPointerException).
+ |
+
org.apache.commons.io.FileCleaner + + | +
org.apache.commons.io.filefilter.WildcardFilter
+ Use WilcardFileFilter. Deprecated as this class performs directory
+ filtering which it shouldn't do, but that can't be removed due to compatability.
+ |
+
Exceptions and Description | +
---|
org.apache.commons.io.IOExceptionWithCause
+ (since 2.5) use
+IOException instead |
+
Field and Description | +
---|
org.apache.commons.io.Charsets.ISO_8859_1
+ Use Java 7's
+StandardCharsets |
+
org.apache.commons.io.Charsets.US_ASCII
+ Use Java 7's
+StandardCharsets |
+
org.apache.commons.io.Charsets.UTF_16
+ Use Java 7's
+StandardCharsets |
+
org.apache.commons.io.Charsets.UTF_16BE
+ Use Java 7's
+StandardCharsets |
+
org.apache.commons.io.Charsets.UTF_16LE
+ Use Java 7's
+StandardCharsets |
+
org.apache.commons.io.Charsets.UTF_8
+ Use Java 7's
+StandardCharsets |
+
Constructor and Description | +
---|
org.apache.commons.io.output.LockableFileWriter(File, boolean, String) + + | +
org.apache.commons.io.input.ReaderInputStream(Reader)
+ 2.5 use
+ReaderInputStream.ReaderInputStream(Reader, Charset) instead |
+
org.apache.commons.io.input.ReversedLinesFileReader(File)
+ 2.5 use
+ReversedLinesFileReader.ReversedLinesFileReader(File, Charset) instead |
+
org.apache.commons.io.output.WriterOutputStream(Writer)
+ 2.5 use
+WriterOutputStream.WriterOutputStream(Writer, Charset) instead |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/help-doc.html b/docs/licenses/Apache Commons/docs/help-doc.html new file mode 100644 index 0000000..dbcecf3 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/help-doc.html @@ -0,0 +1,220 @@ + + + + + +The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
+Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+Each annotation type has its own separate page with the following sections:
+Each enum has its own separate page with the following sections:
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object
. The interfaces do not inherit from java.lang.Object
.
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+These links take you to the next or previous class, interface, package, or related page.
+These links show and hide the HTML frames. All pages are available with or without frames.
+The All Classes link shows all classes and interfaces except non-static nested types.
+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
+The Constant Field Values page lists the static final fields and their values.
+Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/index-all.html b/docs/licenses/Apache Commons/docs/index-all.html new file mode 100644 index 0000000..8252b9c --- /dev/null +++ b/docs/licenses/Apache Commons/docs/index-all.html @@ -0,0 +1,5802 @@ + + + + + +FileFilter
providing conditional AND logic across a list of
+ file filters.AndFileFilter
.AndFileFilter
+ with the specified list of filters./dev/null
./dev/null
./dev/null
.append(char)
method.append(CharSequence, int, int)
method.append(CharSequence)
method.StringBuilder
.Appendable
+ Object.IOFileFilter
that wraps the
+ FileFilter
instance.IOFileFilter
that wraps the
+ FilenameFilter
instance.available()
method.ByteOrderMark
as its first bytes.ByteOrderMark.UTF_8
BOM.ByteOrderMark.UTF_8
and optionally includes it.BoundedInputStream
that wraps the given input
+ stream and limits it to a certain size.BoundedInputStream
that wraps the given input
+ stream and is unlimited.IOException
IOException
BufferedReader
, otherwise creates a BufferedReader from
+ the given reader.BufferedReader
, otherwise creates a BufferedReader from the
+ given reader.BufferedWriter
, otherwise creates a BufferedWriter from the
+ given Writer.BufferedWriter
, otherwise creates a BufferedWriter from the
+ given Writer.BufferedOutputStream
, otherwise creates a
+ BufferedOutputStream from the given OutputStream.BufferedOutputStream
, otherwise creates a
+ BufferedOutputStream from the given OutputStream.BufferedInputStream
, otherwise creates a
+ BufferedInputStream from the given InputStream.BufferedInputStream
, otherwise creates a
+ BufferedInputStream from the given InputStream.BOMInputStream
.File
s that can be read.File
s that can be written to.InputStream
implementation that can read from String, StringBuffer,
+ StringBuilder or CharBuffer.CharSequenceInputStream.CharSequenceInputStream(CharSequence, Charset, int)
.CharSequenceInputStream.CharSequenceInputStream(CharSequence, Charset, int)
+ with a buffer size of 2048.CharSequenceInputStream.CharSequenceInputStream(CharSequence, String, int)
+ with a buffer size of 2048.Reader
implementation that can read from String, StringBuffer,
+ StringBuilder or CharBuffer.DirectoryWalker.handleIsCancelled(java.io.File, int, java.util.Collection<T>)
,
+ throwing a CancelException
if it has.DEFAULT_CHUNK_SIZE
.ChunkedWriter.DEFAULT_CHUNK_SIZE
ClassLoader
rather than the system default.ClosedInputStream
instance.ClosedInputStream
+ sentinel.close()
method.close()
method.Reader
quietly.ByteArrayOutputStream
has no effect.ClosedOutputStream
+ sentinel.close()
method.close()
method.Reader
unconditionally.Writer
unconditionally.InputStream
unconditionally.OutputStream
unconditionally.Closeable
unconditionally.Closeable
unconditionally.Socket
unconditionally.Selector
unconditionally.ServerSocket
unconditionally.File.compareTo(File)
method.File.isDirectory()
method.Comparator
.byte[]
to an OutputStream
.CopyUtils.copy(byte[], Writer, String)
insteadbyte[]
to chars on a
+ Writer
, using the specified encoding.InputStream
to an
+ OutputStream
.Reader
to a Writer
.CopyUtils.copy(InputStream, Writer, String)
insteadInputStream
to chars on a
+ Writer
, using the specified encoding.CopyUtils.copy(Reader, OutputStream, String)
insteadReader
to bytes on an
+ OutputStream
, and flush the OutputStream
.CopyUtils.copy(String, OutputStream, String)
insteadString
to bytes on an
+ OutputStream
, and
+ flush the OutputStream
.String
to a Writer
.InputStream
to an
+ OutputStream
.InputStream
to an OutputStream
using an internal buffer of the
+ given size.IOUtils.copy(InputStream, Writer, Charset)
insteadInputStream
to chars on a
+ Writer
using the specified character encoding.InputStream
to chars on a
+ Writer
using the specified character encoding.Reader
to a Writer
.IOUtils.copy(Reader, OutputStream, Charset)
insteadReader
to bytes on an
+ OutputStream
using the specified character encoding, and
+ calling flush.Reader
to bytes on an
+ OutputStream
using the specified character encoding, and
+ calling flush.File
to an OutputStream
.InputStream
to an
+ OutputStream
.InputStream
to an
+ OutputStream
.InputStream
to an
+ OutputStream
, optionally skipping input bytes.InputStream
to an
+ OutputStream
, optionally skipping input bytes.Reader
to a Writer
.Reader
to a Writer
.InputStream
to an
+ OutputStream
, optionally skipping input chars.InputStream
to an
+ OutputStream
, optionally skipping input chars.source
to a file
+ destination
.source
to a file
+ destination
.File.compareTo(File)
method.parent
directory contains the child
element (a file or directory).parent
directory contains the child
element (a file or directory).File.isDirectory()
method.File
s that are directories.CancelException
with
+ the file and depth when cancellation occurred.CancelException
with
+ an appropriate message and the file and depth when
+ cancellation occurred.File
.IOCase.SENSITIVE
)IOCase.INSENSITIVE
)IOCase.INSENSITIVE
)IOCase.SENSITIVE
)IOCase.SYSTEM
)IOCase.SYSTEM
)FilenameUtils.getExtension(String)
).FileAlterationListener
implementation that does nothing.FileAlterationObserver
at a specified interval.File
attributes at a point in time.File
.File
.File
s that are files (not directories).IOFileFilter
to the provided File
+ objects.IOFileFilter
to the provided File
+ objects.IOFileFilter
to the provided File
+ objects.IOFileFilter
to the provided File
+ objects.IOFileFilter
to the provided File
+ objects.IOFileFilter
to the provided File
+ objects.flush()
method.flush()
method.ByteOrderMark.getCharsetName()
.Charset
the BOM represents.FileAlterationObserver
registered with
+ this monitor.C:/
+ or ~/
.C:/
or ~/
.InputStream
emulates.Reader
emulates.OutputStream
methods in this class will ultimately delegate.File
representing the system temporary directory.File
representing the user's home directory.Reader
has more lines.File
s that are hidden.InvalidClassException
if an invalid
+ class name is found during deserialization.IOException
insteadFile
is newer than the reference
+ File
.File
is newer than the specified
+ Date
.File
is newer than the specified
+ time reference.File
is older than the reference
+ File
.File
is older than the specified
+ Date
.File
is older than the specified
+ time reference.StandardCharsets
BoundedInputStream.close()
method
+ should propagate to the underling InputStream
.File.lastModified()
).File
.File
using the default encoding for the VM.Reader
.InputStream
, using
+ the character encoding specified (or default encoding if null).InputStream
, using
+ the character encoding specified (or default encoding if null).Reader
.Reader
.mark(int)
method.mark(int)
method.mark(int)
method.mark(int)
method.markSupported()
method.markSupported()
method.markSupported()
method.true
if the supplied class name matches this object's condition.IOCase.SENSITIVE
)IOCase.INSENSITIVE
)IOCase.INSENSITIVE
)IOCase.SENSITIVE
)IOCase.SYSTEM
)IOCase.SYSTEM
)File.getName()
).Reader
.Reader
.InputStream
that emulates
+ a stream of a specified size.InputStream
that emulates a specified size
+ which supports marking and does not throw EOFException.InputStream
that emulates a specified
+ size with option settings.Reader
that emulates
+ a reader of a specified size.Reader
that emulates a specified size
+ which supports marking and does not throw EOFException.Reader
that emulates a specified
+ size with option settings.Writer
writes all data to the famous /dev/null.FileInputStream
for the specified file, providing better
+ error messages than simply calling new FileInputStream(file)
.FileOutputStream
for the specified file, checking and
+ creating the parent directory if it does not exist.FileOutputStream
for the specified file, checking and
+ creating the parent directory if it does not exist.FileFilter
providing conditional OR logic across a list of
+ file filters.OrFileFilter
.OrFileFilter
+ with the specified filters.Comparator
implementations
+for File
s.FileFilter
and FilenameFilter
.InputStream
and Reader
.OutputStream
and Writer
.IOCase.SENSITIVE
)IOCase.INSENSITIVE
)IOCase.INSENSITIVE
)IOCase.SENSITIVE
)IOCase.SYSTEM
)IOCase.SYSTEM
)File.getPath()
).read()
method.read(byte[], offset, length)
+ method.read()
method.read(char[], offset, length)
+ method.read()
method, detecting and optionally skipping BOM.read(byte[], int, int)
method, detecting and optionally skipping BOM.read(byte[])
method, detecting and optionally skipping BOM.read()
method if
+ the current position is less than the limit.read(byte[])
method.read(byte[], int, int)
method.read()
method.read(byte[])
method.read(byte[], int, int)
method.read()
method.read(char[])
method.read(char[], int, int)
method.read(CharBuffer)
method.read(char[], int, int)
method.SwappedDataInputStream.readByte()
!= 0
read()
method.SwappedDataInputStream.readShort()
.EndianUtils.readSwappedDouble(InputStream)
.InputStream
implementation that reads a character stream from a Reader
+ and transforms it to a byte stream using a specified charset encoding.ReaderInputStream
.ReaderInputStream
.ReaderInputStream
.ReaderInputStream
with a default input buffer size of
+ 1024 characters.ReaderInputStream
.ReaderInputStream
with a default input buffer size of
+ 1024 characters.ReaderInputStream.ReaderInputStream(Reader, Charset)
insteadFileUtils.readFileToString(File, Charset)
insteadEndianUtils.readSwappedFloat(InputStream)
.read(byte[] data, int, int)
method.read(byte[] data, int, int)
method.EndianUtils.readSwappedInteger(InputStream)
.UnsupportedOperationException
.FileUtils.readLines(File, Charset)
insteadIOUtils.readLines(InputStream, Charset)
insteadInputStream
as a list of Strings,
+ one entry per line, using the specified character encoding.InputStream
as a list of Strings,
+ one entry per line, using the specified character encoding.Reader
as a list of Strings,
+ one entry per line.EndianUtils.readSwappedLong(InputStream)
.EndianUtils.readSwappedShort(InputStream)
.read()
method.EndianUtils.readSwappedUnsignedShort(InputStream)
.UnsupportedOperationException
.ready()
method.File
, indicating
+ whether the file has changed.reset()
method.reset()
method.reset()
method.reset()
method.ReversedLinesFileReader.ReversedLinesFileReader(File, Charset)
insteadBoundedInputStream.close()
method
+ should propagate to the underling InputStream
.FileUtils.sizeOfDirectory(File)
FileUtils.sizeOfDirectory(File)
File.length()
and FileUtils.sizeOfDirectory(File)
).skip(long)
method, detecting and optionallyskipping BOM.skip(long)
method.skip(long)
method.skip(long)
method.skip(int)
method.Writer
implementation that outputs to a StringBuilder
.StringBuilder
instance with default capacity.StringBuilder
instance with the specified capacity.StringBuilder
.IOException
decorator that adds a serializable tag to the
+ wrapped exception.Tailer
.TailerListener
Adapter.InputStream
+ and copies all read bytes to the given OutputStream
.InputStream
+ and copies all read bytes to the given OutputStream
.IOException
if the given throwable is
+ a TaggedIOException
decorator the given tag.InputStream
and represent
+ same data as result InputStream.InputStream
and represent
+ same data as result InputStream.InputStream
and represent
+ same data as result InputStream.InputStream
and represent
+ same data as result InputStream.BufferedReader
, otherwise creates a BufferedReader from the given
+ reader.BufferedReader
, otherwise creates a BufferedReader from the given
+ reader.InputStream
as a byte[]
.InputStream
as a byte[]
.InputStream
as a byte[]
.IOUtils.toByteArray(Reader, Charset)
insteadReader
as a byte[]
+ using the specified character encoding.Reader
as a byte[]
+ using the specified character encoding.String.getBytes()
insteadURI
as a byte[]
.URL
as a byte[]
.URLConnection
as a byte[]
.IOUtils.toCharArray(InputStream, Charset)
insteadInputStream
as a character array
+ using the specified character encoding.InputStream
as a character array
+ using the specified character encoding.Reader
as a character array.URL
to a File
.URL
to a File
.IOUtils.toInputStream(CharSequence, Charset)
insteadIOUtils.toInputStream(String, Charset)
insteadtoString()
method.IOUtils.toString(InputStream, Charset)
insteadInputStream
as a String
+ using the specified character encoding.InputStream
as a String
+ using the specified character encoding.Reader
as a String.IOUtils.toString(URI, Charset)
insteadIOUtils.toString(URL, Charset)
insteadString.String(byte[])
insteadbyte[]
as a String
+ using the specified character encoding.ByteArrayOutputStream.toString(String)
insteadStringBuilder.toString()
.File
to a URL
.StandardCharsets
StandardCharsets
StandardCharsets
StandardCharsets
StandardCharsets
ObjectInputStream
that's restricted to deserialize
+ a limited set of classes.FileUtils.write(File, CharSequence, Charset)
insteadFileUtils.write(File, CharSequence, Charset, boolean)
insteadbyte[]
to an OutputStream
.IOUtils.write(byte[], Writer, Charset)
insteadbyte[]
to chars on a Writer
+ using the specified character encoding.byte[]
to chars on a Writer
+ using the specified character encoding.char[]
to a Writer
IOUtils.write(char[], OutputStream, Charset)
insteadchar[]
to bytes on an
+ OutputStream
using the specified character encoding.char[]
to bytes on an
+ OutputStream
using the specified character encoding.CharSequence
to a Writer
.IOUtils.write(CharSequence, OutputStream, Charset)
insteadCharSequence
to bytes on an
+ OutputStream
using the specified character encoding.CharSequence
to bytes on an
+ OutputStream
using the specified character encoding.String
to a Writer
.IOUtils.write(String, OutputStream, Charset)
insteadString
to bytes on an
+ OutputStream
using the specified character encoding.String
to bytes on an
+ OutputStream
using the specified character encoding.IOException
to indicate that the stream is closed./dev/null
./dev/null
./dev/null
./dev/null
./dev/null
./dev/null
./dev/null
./dev/null
.write(int)
method.write(byte[])
method.write(byte[])
method.write(int)
method.write(char[])
method.write(char[], int, int)
method.write(String)
method.write(String)
method.StringBuilder
.StringBuilder
.b.length
bytes from the specified byte array to this
+ output stream.len
bytes from the specified byte array starting at
+ offset off
to this output stream.len
bytes from the specified byte array starting
+ at offset off
to a file, creating the file if it does
+ not exist.len
bytes from the specified byte array starting
+ at offset off
to a file, creating the file if it does
+ not exist.byte[]
to an OutputStream
using chunked writes.char[]
to a Writer
using chunked writes.toString()
value of each item in a collection to
+ the specified File
line by line.toString()
value of each item in a collection to
+ the specified File
line by line, optionally appending.toString()
value of each item in a collection to
+ the specified File
line by line.toString()
value of each item in a collection to
+ the specified File
line by line.toString()
value of each item in a collection to
+ the specified File
line by line.toString()
value of each item in a collection to
+ the specified File
line by line.toString()
value of each item in a collection to
+ the specified File
line by line.toString()
value of each item in a collection to
+ the specified File
line by line.IOUtils.writeLines(Collection, String, OutputStream, Charset)
insteadtoString()
value of each item in a collection to
+ an OutputStream
line by line, using the specified character
+ encoding and the specified line ending.toString()
value of each item in a collection to
+ an OutputStream
line by line, using the specified character
+ encoding and the specified line ending.toString()
value of each item in a collection to
+ a Writer
line by line, using the specified line ending.OutputStream
implementation that transforms a byte stream to a
+ character stream using a specified charset encoding and writes the resulting
+ stream to a Writer
.WriterOutputStream
with a default output buffer size of
+ 1024 characters.WriterOutputStream
.WriterOutputStream
.WriterOutputStream
with a default output buffer size of
+ 1024 characters.WriterOutputStream
.WriterOutputStream
with a default output buffer size of
+ 1024 characters.WriterOutputStream.WriterOutputStream(Writer, Charset)
insteadFileUtils.writeStringToFile(File, String, Charset)
insteadFileUtils.writeStringToFile(File, String, Charset, boolean)
insteadCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/index.html b/docs/licenses/Apache Commons/docs/index.html new file mode 100644 index 0000000..5129b83 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/index.html @@ -0,0 +1,74 @@ + + + + + +public class ByteOrderMark +extends Object +implements Serializable+
BOMInputStream
.BOMInputStream
,
+Wikipedia: Byte Order Mark,
+W3C: Autodetection of Character Encodings
+ (Non-Normative),
+Serialized FormModifier and Type | +Field and Description | +
---|---|
static ByteOrderMark |
+UTF_16BE
+UTF-16BE BOM (Big-Endian)
+ |
+
static ByteOrderMark |
+UTF_16LE
+UTF-16LE BOM (Little-Endian)
+ |
+
static ByteOrderMark |
+UTF_32BE
+UTF-32BE BOM (Big-Endian)
+ |
+
static ByteOrderMark |
+UTF_32LE
+UTF-32LE BOM (Little-Endian)
+ |
+
static ByteOrderMark |
+UTF_8
+UTF-8 BOM
+ |
+
static char |
+UTF_BOM
+Unicode BOM character; external form depends on the encoding.
+ |
+
Constructor and Description | +
---|
ByteOrderMark(String charsetName,
+ int... bytes)
+Construct a new BOM.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+equals(Object obj)
+Indicates if this BOM's bytes equals another.
+ |
+
int |
+get(int pos)
+The byte at the specified position.
+ |
+
byte[] |
+getBytes()
+Return a copy of the BOM's bytes.
+ |
+
String |
+getCharsetName()
+Return the name of the
+Charset the BOM represents. |
+
int |
+hashCode()
+Return the hashcode for this BOM.
+ |
+
int |
+length()
+Return the length of the BOM's bytes.
+ |
+
String |
+toString()
+Provide a String representation of the BOM.
+ |
+
public static final ByteOrderMark UTF_8+
public static final ByteOrderMark UTF_16BE+
public static final ByteOrderMark UTF_16LE+
public static final ByteOrderMark UTF_32BE+
public static final ByteOrderMark UTF_32LE+
public static final char UTF_BOM+
public ByteOrderMark(String charsetName, + int... bytes)+
charsetName
- The name of the charset the BOM representsbytes
- The BOM's bytesIllegalArgumentException
- if the charsetName is null or
+ zero lengthIllegalArgumentException
- if the bytes are null or zero
+ lengthpublic String getCharsetName()+
Charset
the BOM represents.public int length()+
public int get(int pos)+
pos
- The positionpublic byte[] getBytes()+
public boolean equals(Object obj)+
public int hashCode()+
hashCode
in class Object
Object.hashCode()
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/Charsets.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/Charsets.html new file mode 100644 index 0000000..6fb92d4 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/Charsets.html @@ -0,0 +1,514 @@ + + + + + +public class Charsets +extends Object+
+ Every implementation of the Java platform is required to support the following character encodings. Consult + the release documentation for your implementation to see if any other encodings are supported. Consult the release + documentation for your implementation to see if any other encodings are supported. +
+ +US-ASCII
ISO-8859-1
UTF-8
UTF-16BE
UTF-16LE
UTF-16
Modifier and Type | +Field and Description | +
---|---|
static Charset |
+ISO_8859_1
+Deprecated.
+
+Use Java 7's
+StandardCharsets |
+
static Charset |
+US_ASCII
+Deprecated.
+
+Use Java 7's
+StandardCharsets |
+
static Charset |
+UTF_16
+Deprecated.
+
+Use Java 7's
+StandardCharsets |
+
static Charset |
+UTF_16BE
+Deprecated.
+
+Use Java 7's
+StandardCharsets |
+
static Charset |
+UTF_16LE
+Deprecated.
+
+Use Java 7's
+StandardCharsets |
+
static Charset |
+UTF_8
+Deprecated.
+
+Use Java 7's
+StandardCharsets |
+
Modifier and Type | +Method and Description | +
---|---|
static SortedMap<String,Charset> |
+requiredCharsets()
+Constructs a sorted map from canonical charset names to charset objects required of every implementation of the
+ Java platform.
+ |
+
static Charset |
+toCharset(Charset charset)
+Returns the given Charset or the default Charset if the given Charset is null.
+ |
+
static Charset |
+toCharset(String charset)
+Returns a Charset for the named charset.
+ |
+
@Deprecated +public static final Charset ISO_8859_1+
StandardCharsets
+ Every implementation of the Java platform is required to support this character encoding. +
@Deprecated +public static final Charset US_ASCII+
StandardCharsets
+ Seven-bit ASCII, also known as ISO646-US, also known as the Basic Latin block of the Unicode character set. +
++ Every implementation of the Java platform is required to support this character encoding. +
@Deprecated +public static final Charset UTF_16+
StandardCharsets
+ Sixteen-bit Unicode Transformation Format, The byte order specified by a mandatory initial byte-order mark + (either order accepted on input, big-endian used on output) +
++ Every implementation of the Java platform is required to support this character encoding. +
@Deprecated +public static final Charset UTF_16BE+
StandardCharsets
+ Sixteen-bit Unicode Transformation Format, big-endian byte order. +
++ Every implementation of the Java platform is required to support this character encoding. +
@Deprecated +public static final Charset UTF_16LE+
StandardCharsets
+ Sixteen-bit Unicode Transformation Format, little-endian byte order. +
++ Every implementation of the Java platform is required to support this character encoding. +
@Deprecated +public static final Charset UTF_8+
StandardCharsets
+ Eight-bit Unicode Transformation Format. +
++ Every implementation of the Java platform is required to support this character encoding. +
public static SortedMap<String,Charset> requiredCharsets()+
+ From the Java documentation + Standard charsets: +
Charset.availableCharsets()
public static Charset toCharset(Charset charset)+
charset
- A charset or null.public static Charset toCharset(String charset)+
charset
- The name of the requested charset, may be null.UnsupportedCharsetException
- If the named charset is unavailableCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/CopyUtils.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/CopyUtils.html new file mode 100644 index 0000000..0790a26 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/CopyUtils.html @@ -0,0 +1,668 @@ + + + + + +@Deprecated +public class CopyUtils +extends Object+
InputStream
, Reader
,
+ String
and byte[]
) and destinations
+ (OutputStream
, Writer
, String
and
+ byte[]
).
+
+ Unless otherwise noted, these copy
methods do not
+ flush or close the streams. Often doing so would require making non-portable
+ assumptions about the streams' origin and further use. This means that both
+ streams' close()
methods must be called after copying. if one
+ omits this step, then the stream resources (sockets, file descriptors) are
+ released when the associated Stream is garbage-collected. It is not a good
+ idea to rely on this mechanism. For a good overview of the distinction
+ between "memory management" and "resource management", see
+ this
+ UnixReview article.
+
+ For byte-to-char methods, a copy
variant allows the encoding
+ to be selected (otherwise the platform default is used). We would like to
+ encourage you to always specify the encoding because relying on the platform
+ default can lead to unexpected results.
+
+ We don't provide special variants for the copy
methods that
+ let you specify the buffer size because in modern VMs the impact on speed
+ seems to be minimal. We're using a default buffer size of 4 KB.
+
+ The copy
methods use an internal buffer when copying. It is
+ therefore advisable not to deliberately wrap the stream arguments
+ to the copy
methods in Buffered*
streams. For
+ example, don't do the following:
+
+ copy( new BufferedInputStream( in ), new BufferedOutputStream( out ) ); ++ The rationale is as follows: +
+ Imagine that an InputStream's read() is a very expensive operation, which
+ would usually suggest wrapping in a BufferedInputStream. The
+ BufferedInputStream works by issuing infrequent
+ InputStream.read(byte[] b, int off, int len)
requests on the
+ underlying InputStream, to fill an internal buffer, from which further
+ read
requests can inexpensively get their data (until the buffer
+ runs out).
+
+ However, the copy
methods do the same thing, keeping an
+ internal buffer, populated by
+ InputStream.read(byte[] b, int off, int len)
requests. Having two
+ buffers (or three if the destination stream is also buffered) is pointless,
+ and the unnecessary buffer management hurts performance slightly (about 3%,
+ according to some simple experiments).
+
+ Behold, intrepid explorers; a map of this class: +
+ Method Input Output Dependency + ------ ----- ------ ------- + 1 copy InputStream OutputStream (primitive) + 2 copy Reader Writer (primitive) + + 3 copy InputStream Writer 2 + + 4 copy Reader OutputStream 2 + + 5 copy String OutputStream 2 + 6 copy String Writer (trivial) + + 7 copy byte[] Writer 3 + 8 copy byte[] OutputStream (trivial) ++
+ Note that only the first two methods shuffle bytes; the rest use these + two, or (if possible) copy using native Java copy methods. As there are + method variants to specify the encoding, each row may + correspond to up to 2 methods. +
+ Origin of code: Excalibur.
Constructor and Description | +
---|
CopyUtils()
+Deprecated.
+Instances should NOT be constructed in standard programming.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static void |
+copy(byte[] input,
+ OutputStream output)
+Deprecated.
+Copy bytes from a
+byte[] to an OutputStream . |
+
static void |
+copy(byte[] input,
+ Writer output)
+Deprecated.
+
+2.5 use
+copy(byte[], Writer, String) instead |
+
static void |
+copy(byte[] input,
+ Writer output,
+ String encoding)
+Deprecated.
+Copy and convert bytes from a
+byte[] to chars on a
+ Writer , using the specified encoding. |
+
static int |
+copy(InputStream input,
+ OutputStream output)
+Deprecated.
+Copy bytes from an
+InputStream to an
+ OutputStream . |
+
static void |
+copy(InputStream input,
+ Writer output)
+Deprecated.
+
+2.5 use
+copy(InputStream, Writer, String) instead |
+
static void |
+copy(InputStream input,
+ Writer output,
+ String encoding)
+Deprecated.
+Copy and convert bytes from an
+InputStream to chars on a
+ Writer , using the specified encoding. |
+
static void |
+copy(Reader input,
+ OutputStream output)
+Deprecated.
+
+2.5 use
+copy(Reader, OutputStream, String) instead |
+
static void |
+copy(Reader input,
+ OutputStream output,
+ String encoding)
+Deprecated.
+Serialize chars from a
+Reader to bytes on an
+ OutputStream , and flush the OutputStream . |
+
static int |
+copy(Reader input,
+ Writer output)
+Deprecated.
+Copy chars from a
+Reader to a Writer . |
+
static void |
+copy(String input,
+ OutputStream output)
+Deprecated.
+
+2.5 use
+copy(String, OutputStream, String) instead |
+
static void |
+copy(String input,
+ OutputStream output,
+ String encoding)
+Deprecated.
+Serialize chars from a
+String to bytes on an
+ OutputStream , and
+ flush the OutputStream . |
+
static void |
+copy(String input,
+ Writer output)
+Deprecated.
+Copy chars from a
+String to a Writer . |
+
public CopyUtils()+
public static void copy(byte[] input, + OutputStream output) + throws IOException+
byte[]
to an OutputStream
.input
- the byte array to read fromoutput
- the OutputStream
to write toIOException
- In case of an I/O problem@Deprecated +public static void copy(byte[] input, + Writer output) + throws IOException+
copy(byte[], Writer, String)
insteadbyte[]
to chars on a
+ Writer
.
+ The platform's default encoding is used for the byte-to-char conversion.input
- the byte array to read fromoutput
- the Writer
to write toIOException
- In case of an I/O problempublic static void copy(byte[] input, + Writer output, + String encoding) + throws IOException+
byte[]
to chars on a
+ Writer
, using the specified encoding.input
- the byte array to read fromoutput
- the Writer
to write toencoding
- The name of a supported character encoding. See the
+ IANA
+ Charset Registry for a list of valid encoding types.IOException
- In case of an I/O problempublic static int copy(InputStream input, + OutputStream output) + throws IOException+
InputStream
to an
+ OutputStream
.input
- the InputStream
to read fromoutput
- the OutputStream
to write toIOException
- In case of an I/O problempublic static int copy(Reader input, + Writer output) + throws IOException+
Reader
to a Writer
.input
- the Reader
to read fromoutput
- the Writer
to write toIOException
- In case of an I/O problem@Deprecated +public static void copy(InputStream input, + Writer output) + throws IOException+
copy(InputStream, Writer, String)
insteadInputStream
to chars on a
+ Writer
.
+ The platform's default encoding is used for the byte-to-char conversion.input
- the InputStream
to read fromoutput
- the Writer
to write toIOException
- In case of an I/O problempublic static void copy(InputStream input, + Writer output, + String encoding) + throws IOException+
InputStream
to chars on a
+ Writer
, using the specified encoding.input
- the InputStream
to read fromoutput
- the Writer
to write toencoding
- The name of a supported character encoding. See the
+ IANA
+ Charset Registry for a list of valid encoding types.IOException
- In case of an I/O problem@Deprecated +public static void copy(Reader input, + OutputStream output) + throws IOException+
copy(Reader, OutputStream, String)
insteadReader
to bytes on an
+ OutputStream
, and flush the OutputStream
.
+ Uses the default platform encoding.input
- the Reader
to read fromoutput
- the OutputStream
to write toIOException
- In case of an I/O problempublic static void copy(Reader input, + OutputStream output, + String encoding) + throws IOException+
Reader
to bytes on an
+ OutputStream
, and flush the OutputStream
.input
- the Reader
to read fromoutput
- the OutputStream
to write toencoding
- The name of a supported character encoding. See the
+ IANA
+ Charset Registry for a list of valid encoding types.IOException
- In case of an I/O problem@Deprecated +public static void copy(String input, + OutputStream output) + throws IOException+
copy(String, OutputStream, String)
insteadString
to bytes on an
+ OutputStream
, and
+ flush the OutputStream
.
+ Uses the platform default encoding.input
- the String
to read fromoutput
- the OutputStream
to write toIOException
- In case of an I/O problempublic static void copy(String input, + OutputStream output, + String encoding) + throws IOException+
String
to bytes on an
+ OutputStream
, and
+ flush the OutputStream
.input
- the String
to read fromoutput
- the OutputStream
to write toencoding
- The name of a supported character encoding. See the
+ IANA
+ Charset Registry for a list of valid encoding types.IOException
- In case of an I/O problempublic static void copy(String input, + Writer output) + throws IOException+
String
to a Writer
.input
- the String
to read fromoutput
- the Writer
to write toIOException
- In case of an I/O problemCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/DirectoryWalker.CancelException.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/DirectoryWalker.CancelException.html new file mode 100644 index 0000000..65fe06a --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/DirectoryWalker.CancelException.html @@ -0,0 +1,342 @@ + + + + + +public static class DirectoryWalker.CancelException +extends IOException+
Constructor and Description | +
---|
DirectoryWalker.CancelException(File file,
+ int depth)
+Constructs a
+CancelException with
+ the file and depth when cancellation occurred. |
+
DirectoryWalker.CancelException(String message,
+ File file,
+ int depth)
+Constructs a
+CancelException with
+ an appropriate message and the file and depth when
+ cancellation occurred. |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+getDepth()
+Return the depth when the operation was cancelled.
+ |
+
File |
+getFile()
+Return the file when the operation was cancelled.
+ |
+
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public DirectoryWalker.CancelException(File file, + int depth)+
CancelException
with
+ the file and depth when cancellation occurred.file
- the file when the operation was cancelled, may be nulldepth
- the depth when the operation was cancelled, may be nullpublic DirectoryWalker.CancelException(String message, + File file, + int depth)+
CancelException
with
+ an appropriate message and the file and depth when
+ cancellation occurred.message
- the detail messagefile
- the file when the operation was cancelleddepth
- the depth when the operation was cancelledpublic File getFile()+
public int getDepth()+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/DirectoryWalker.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/DirectoryWalker.html new file mode 100644 index 0000000..a288132 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/DirectoryWalker.html @@ -0,0 +1,897 @@ + + + + + +public abstract class DirectoryWalker<T> +extends Object+
+ This class operates with a FileFilter
and maximum depth to
+ limit the files and direcories visited.
+ Commons IO supplies many common filter implementations in the
+ filefilter package.
+
+ The following sections describe: +
FileCleaner
implementation.FileFilter
(s) with DirectoryWalker
.+ public class FileCleaner extends DirectoryWalker { + + public FileCleaner() { + super(); + } + + public List clean(File startDirectory) { + List results = new ArrayList(); + walk(startDirectory, results); + return results; + } + + protected boolean handleDirectory(File directory, int depth, Collection results) { + // delete svn directories and then skip + if (".svn".equals(directory.getName())) { + directory.delete(); + return false; + } else { + return true; + } + + } + + protected void handleFile(File file, int depth, Collection results) { + // delete file and add to list of deleted + file.delete(); + results.add(file); + } + } ++ + +
+ The first option is to visit all directories and files. + This is achieved via the no-args constructor. +
+ The second constructor option is to supply a single FileFilter
+ that describes the files and directories to visit. Care must be taken
+ with this option as the same filter is used for both directories
+ and files.
+
+ For example, if you wanted all directories which are not hidden + and files which end in ".txt": +
+ public class FooDirectoryWalker extends DirectoryWalker { + public FooDirectoryWalker(FileFilter filter) { + super(filter, -1); + } + } + + // Build up the filters and create the walker + // Create a filter for Non-hidden directories + IOFileFilter fooDirFilter = + FileFilterUtils.andFileFilter(FileFilterUtils.directoryFileFilter, + HiddenFileFilter.VISIBLE); + + // Create a filter for Files ending in ".txt" + IOFileFilter fooFileFilter = + FileFilterUtils.andFileFilter(FileFilterUtils.fileFileFilter, + FileFilterUtils.suffixFileFilter(".txt")); + + // Combine the directory and file filters using an OR condition + java.io.FileFilter fooFilter = + FileFilterUtils.orFileFilter(fooDirFilter, fooFileFilter); + + // Use the filter to construct a DirectoryWalker implementation + FooDirectoryWalker walker = new FooDirectoryWalker(fooFilter); ++
+ The third constructor option is to specify separate filters, one for
+ directories and one for files. These are combined internally to form
+ the correct FileFilter
, something which is very easy to
+ get wrong when attempted manually, particularly when trying to
+ express constructs like 'any file in directories named docs'.
+
+ For example, if you wanted all directories which are not hidden + and files which end in ".txt": +
+ public class FooDirectoryWalker extends DirectoryWalker { + public FooDirectoryWalker(IOFileFilter dirFilter, IOFileFilter fileFilter) { + super(dirFilter, fileFilter, -1); + } + } + + // Use the filters to construct the walker + FooDirectoryWalker walker = new FooDirectoryWalker( + HiddenFileFilter.VISIBLE, + FileFilterUtils.suffixFileFilter(".txt"), + ); ++ This is much simpler than the previous example, and is why it is the preferred + option for filtering. + + +
+ What DirectoryWalker
does provide for cancellation is:
+
DirectoryWalker.CancelException
which can be thrown in any of the
+ lifecycle methods to stop processing.walk()
method traps thrown DirectoryWalker.CancelException
+ and calls the handleCancelled()
method, providing
+ a place for custom cancel processing.+ Implementations need to provide: +
DirectoryWalker.CancelException
.handleCancelled()
method.
+ + Two possible scenarios are envisaged for cancellation: +
+ The following sections provide example implementations for these two different + scenarios. + + +
cancel()
method that can be
+ called by another thread to stop the processing. A typical example use-case
+ would be a cancel button on a GUI. Calling this method sets a
+
+ volatile flag to ensure it will work properly in a multi-threaded environment.
+ The flag is returned by the handleIsCancelled()
method, which
+ will cause the walk to stop immediately. The handleCancelled()
+ method will be the next, and last, callback method received once cancellation
+ has occurred.
+
+ + public class FooDirectoryWalker extends DirectoryWalker { + + private volatile boolean cancelled = false; + + public void cancel() { + cancelled = true; + } + + protected boolean handleIsCancelled(File file, int depth, Collection results) { + return cancelled; + } + + protected void handleCancelled(File startDirectory, Collection results, CancelException cancel) { + // implement processing required when a cancellation occurs + } + } ++ + +
DirectoryWalker.CancelException
could be implemented
+ in any of the lifecycle methods.
+
+ + public class BarDirectoryWalker extends DirectoryWalker { + + protected boolean handleDirectory(File directory, int depth, Collection results) throws IOException { + // cancel if hidden directory + if (directory.isHidden()) { + throw new CancelException(file, depth); + } + return true; + } + + protected void handleFile(File file, int depth, Collection results) throws IOException { + // cancel if read-only file + if (!file.canWrite()) { + throw new CancelException(file, depth); + } + results.add(file); + } + + protected void handleCancelled(File startDirectory, Collection results, CancelException cancel) { + // implement processing required when a cancellation occurs + } + } +
Modifier and Type | +Class and Description | +
---|---|
static class |
+DirectoryWalker.CancelException
+CancelException is thrown in DirectoryWalker to cancel the current
+ processing.
+ |
+
Modifier | +Constructor and Description | +
---|---|
protected |
+DirectoryWalker()
+Construct an instance with no filtering and unlimited depth.
+ |
+
protected |
+DirectoryWalker(FileFilter filter,
+ int depthLimit)
+Construct an instance with a filter and limit the depth navigated to.
+ |
+
protected |
+DirectoryWalker(IOFileFilter directoryFilter,
+ IOFileFilter fileFilter,
+ int depthLimit)
+Construct an instance with a directory and a file filter and an optional
+ limit on the depth navigated to.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+checkIfCancelled(File file,
+ int depth,
+ Collection<T> results)
+Checks whether the walk has been cancelled by calling
+handleIsCancelled(java.io.File, int, java.util.Collection<T>) ,
+ throwing a CancelException if it has. |
+
protected File[] |
+filterDirectoryContents(File directory,
+ int depth,
+ File[] files)
+Overridable callback method invoked with the contents of each directory.
+ |
+
protected void |
+handleCancelled(File startDirectory,
+ Collection<T> results,
+ DirectoryWalker.CancelException cancel)
+Overridable callback method invoked when the operation is cancelled.
+ |
+
protected boolean |
+handleDirectory(File directory,
+ int depth,
+ Collection<T> results)
+Overridable callback method invoked to determine if a directory should be processed.
+ |
+
protected void |
+handleDirectoryEnd(File directory,
+ int depth,
+ Collection<T> results)
+Overridable callback method invoked at the end of processing each directory.
+ |
+
protected void |
+handleDirectoryStart(File directory,
+ int depth,
+ Collection<T> results)
+Overridable callback method invoked at the start of processing each directory.
+ |
+
protected void |
+handleEnd(Collection<T> results)
+Overridable callback method invoked at the end of processing.
+ |
+
protected void |
+handleFile(File file,
+ int depth,
+ Collection<T> results)
+Overridable callback method invoked for each (non-directory) file.
+ |
+
protected boolean |
+handleIsCancelled(File file,
+ int depth,
+ Collection<T> results)
+Overridable callback method invoked to determine if the entire walk
+ operation should be immediately cancelled.
+ |
+
protected void |
+handleRestricted(File directory,
+ int depth,
+ Collection<T> results)
+Overridable callback method invoked for each restricted directory.
+ |
+
protected void |
+handleStart(File startDirectory,
+ Collection<T> results)
+Overridable callback method invoked at the start of processing.
+ |
+
protected void |
+walk(File startDirectory,
+ Collection<T> results)
+Internal method that walks the directory hierarchy in a depth-first manner.
+ |
+
protected DirectoryWalker()+
protected DirectoryWalker(FileFilter filter, + int depthLimit)+
+ The filter controls which files and directories will be navigated to as
+ part of the walk. The FileFilterUtils
class is useful for combining
+ various filters together. A null
filter means that no
+ filtering should occur and all files and directories will be visited.
filter
- the filter to apply, null means visit all filesdepthLimit
- controls how deep the hierarchy is
+ navigated to (less than 0 means unlimited)protected DirectoryWalker(IOFileFilter directoryFilter, + IOFileFilter fileFilter, + int depthLimit)+
+ The filters control which files and directories will be navigated to as part
+ of the walk. This constructor uses FileFilterUtils.makeDirectoryOnly(IOFileFilter)
+ and FileFilterUtils.makeFileOnly(IOFileFilter)
internally to combine the filters.
+ A null
filter means that no filtering should occur.
directoryFilter
- the filter to apply to directories, null means visit all directoriesfileFilter
- the filter to apply to files, null means visit all filesdepthLimit
- controls how deep the hierarchy is
+ navigated to (less than 0 means unlimited)protected final void walk(File startDirectory, + Collection<T> results) + throws IOException+
+ Users of this class do not need to call this method. This method will + be called automatically by another (public) method on the specific subclass. +
+ Writers of subclasses should call this method to start the directory walk.
+ Once called, this method will emit events as it walks the hierarchy.
+ The event methods have the prefix handle
.
startDirectory
- the directory to start from, not nullresults
- the collection of result objects, may be updatedNullPointerException
- if the start directory is nullIOException
- if an I/O Error occursprotected final void checkIfCancelled(File file, + int depth, + Collection<T> results) + throws IOException+
handleIsCancelled(java.io.File, int, java.util.Collection<T>)
,
+ throwing a CancelException
if it has.
+
+ Writers of subclasses should not normally call this method as it is called
+ automatically by the walk of the tree. However, sometimes a single method,
+ typically handleFile(java.io.File, int, java.util.Collection<T>)
, may take a long time to run. In that case,
+ you may wish to check for cancellation by calling this method.
file
- the current file being processeddepth
- the current file level (starting directory = 0)results
- the collection of result objects, may be updatedIOException
- if an I/O Error occursprotected boolean handleIsCancelled(File file, + int depth, + Collection<T> results) + throws IOException+
+ This method should be implemented by those subclasses that want to
+ provide a public cancel()
method available from another
+ thread. The design pattern for the subclass should be as follows:
+
+ public class FooDirectoryWalker extends DirectoryWalker { + private volatile boolean cancelled = false; + + public void cancel() { + cancelled = true; + } + private void handleIsCancelled(File file, int depth, Collection results) { + return cancelled; + } + protected void handleCancelled(File startDirectory, + Collection results, CancelException cancel) { + // implement processing required when a cancellation occurs + } + } ++
+ If this method returns true, then the directory walk is immediately
+ cancelled. The next callback method will be handleCancelled(java.io.File, java.util.Collection<T>, org.apache.commons.io.DirectoryWalker.CancelException)
.
+
+ This implementation returns false.
file
- the file or directory being processeddepth
- the current directory level (starting directory = 0)results
- the collection of result objects, may be updatedIOException
- if an I/O Error occursprotected void handleCancelled(File startDirectory, + Collection<T> results, + DirectoryWalker.CancelException cancel) + throws IOException+
+ This implementation just re-throws the DirectoryWalker.CancelException
.
startDirectory
- the directory that the walk started fromresults
- the collection of result objects, may be updatedcancel
- the exception throw to cancel further processing
+ containing details at the point of cancellation.IOException
- if an I/O Error occursprotected void handleStart(File startDirectory, + Collection<T> results) + throws IOException+
+ This implementation does nothing.
startDirectory
- the directory to start fromresults
- the collection of result objects, may be updatedIOException
- if an I/O Error occursprotected boolean handleDirectory(File directory, + int depth, + Collection<T> results) + throws IOException+
+ This method returns a boolean to indicate if the directory should be examined or not. + If you return false, the entire directory and any subdirectories will be skipped. + Note that this functionality is in addition to the filtering by file filter. +
+ This implementation does nothing and returns true.
directory
- the current directory being processeddepth
- the current directory level (starting directory = 0)results
- the collection of result objects, may be updatedIOException
- if an I/O Error occursprotected void handleDirectoryStart(File directory, + int depth, + Collection<T> results) + throws IOException+
+ This implementation does nothing.
directory
- the current directory being processeddepth
- the current directory level (starting directory = 0)results
- the collection of result objects, may be updatedIOException
- if an I/O Error occursprotected File[] filterDirectoryContents(File directory, + int depth, + File[] files) + throws IOException+
+ This implementation returns the files unchanged
directory
- the current directory being processeddepth
- the current directory level (starting directory = 0)files
- the files (possibly filtered) in the directory, may be null
IOException
- if an I/O Error occursprotected void handleFile(File file, + int depth, + Collection<T> results) + throws IOException+
+ This implementation does nothing.
file
- the current file being processeddepth
- the current directory level (starting directory = 0)results
- the collection of result objects, may be updatedIOException
- if an I/O Error occursprotected void handleRestricted(File directory, + int depth, + Collection<T> results) + throws IOException+
+ This implementation does nothing.
directory
- the restricted directorydepth
- the current directory level (starting directory = 0)results
- the collection of result objects, may be updatedIOException
- if an I/O Error occursprotected void handleDirectoryEnd(File directory, + int depth, + Collection<T> results) + throws IOException+
+ This implementation does nothing.
directory
- the directory being processeddepth
- the current directory level (starting directory = 0)results
- the collection of result objects, may be updatedIOException
- if an I/O Error occursprotected void handleEnd(Collection<T> results) + throws IOException+
+ This implementation does nothing.
results
- the collection of result objects, may be updatedIOException
- if an I/O Error occursCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/EndianUtils.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/EndianUtils.html new file mode 100644 index 0000000..33dd4e5 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/EndianUtils.html @@ -0,0 +1,879 @@ + + + + + +public class EndianUtils +extends Object+
+ Different computer architectures adopt different conventions for + byte ordering. In so-called "Little Endian" architectures (eg Intel), + the low-order byte is stored in memory at the lowest address, and + subsequent bytes at higher addresses. For "Big Endian" architectures + (eg Motorola), the situation is reversed. + This class helps you solve this incompatibility. +
+ Origin of code: Excalibur
SwappedDataInputStream
Constructor and Description | +
---|
EndianUtils()
+Instances should NOT be constructed in standard programming.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static double |
+readSwappedDouble(byte[] data,
+ int offset)
+Reads a "double" value from a byte array at a given offset.
+ |
+
static double |
+readSwappedDouble(InputStream input)
+Reads a "double" value from an InputStream.
+ |
+
static float |
+readSwappedFloat(byte[] data,
+ int offset)
+Reads a "float" value from a byte array at a given offset.
+ |
+
static float |
+readSwappedFloat(InputStream input)
+Reads a "float" value from an InputStream.
+ |
+
static int |
+readSwappedInteger(byte[] data,
+ int offset)
+Reads a "int" value from a byte array at a given offset.
+ |
+
static int |
+readSwappedInteger(InputStream input)
+Reads a "int" value from an InputStream.
+ |
+
static long |
+readSwappedLong(byte[] data,
+ int offset)
+Reads a "long" value from a byte array at a given offset.
+ |
+
static long |
+readSwappedLong(InputStream input)
+Reads a "long" value from an InputStream.
+ |
+
static short |
+readSwappedShort(byte[] data,
+ int offset)
+Reads a "short" value from a byte array at a given offset.
+ |
+
static short |
+readSwappedShort(InputStream input)
+Reads a "short" value from an InputStream.
+ |
+
static long |
+readSwappedUnsignedInteger(byte[] data,
+ int offset)
+Reads an unsigned integer (32-bit) value from a byte array at a given
+ offset.
+ |
+
static long |
+readSwappedUnsignedInteger(InputStream input)
+Reads a unsigned integer (32-bit) from an InputStream.
+ |
+
static int |
+readSwappedUnsignedShort(byte[] data,
+ int offset)
+Reads an unsigned short (16-bit) value from a byte array at a given
+ offset.
+ |
+
static int |
+readSwappedUnsignedShort(InputStream input)
+Reads a unsigned short (16-bit) from an InputStream.
+ |
+
static double |
+swapDouble(double value)
+Converts a "double" value between endian systems.
+ |
+
static float |
+swapFloat(float value)
+Converts a "float" value between endian systems.
+ |
+
static int |
+swapInteger(int value)
+Converts a "int" value between endian systems.
+ |
+
static long |
+swapLong(long value)
+Converts a "long" value between endian systems.
+ |
+
static short |
+swapShort(short value)
+Converts a "short" value between endian systems.
+ |
+
static void |
+writeSwappedDouble(byte[] data,
+ int offset,
+ double value)
+Writes a "double" value to a byte array at a given offset.
+ |
+
static void |
+writeSwappedDouble(OutputStream output,
+ double value)
+Writes a "double" value to an OutputStream.
+ |
+
static void |
+writeSwappedFloat(byte[] data,
+ int offset,
+ float value)
+Writes a "float" value to a byte array at a given offset.
+ |
+
static void |
+writeSwappedFloat(OutputStream output,
+ float value)
+Writes a "float" value to an OutputStream.
+ |
+
static void |
+writeSwappedInteger(byte[] data,
+ int offset,
+ int value)
+Writes a "int" value to a byte array at a given offset.
+ |
+
static void |
+writeSwappedInteger(OutputStream output,
+ int value)
+Writes a "int" value to an OutputStream.
+ |
+
static void |
+writeSwappedLong(byte[] data,
+ int offset,
+ long value)
+Writes a "long" value to a byte array at a given offset.
+ |
+
static void |
+writeSwappedLong(OutputStream output,
+ long value)
+Writes a "long" value to an OutputStream.
+ |
+
static void |
+writeSwappedShort(byte[] data,
+ int offset,
+ short value)
+Writes a "short" value to a byte array at a given offset.
+ |
+
static void |
+writeSwappedShort(OutputStream output,
+ short value)
+Writes a "short" value to an OutputStream.
+ |
+
public EndianUtils()+
public static short swapShort(short value)+
value
- value to convertpublic static int swapInteger(int value)+
value
- value to convertpublic static long swapLong(long value)+
value
- value to convertpublic static float swapFloat(float value)+
value
- value to convertpublic static double swapDouble(double value)+
value
- value to convertpublic static void writeSwappedShort(byte[] data, + int offset, + short value)+
data
- target byte arrayoffset
- starting offset in the byte arrayvalue
- value to writepublic static short readSwappedShort(byte[] data, + int offset)+
data
- source byte arrayoffset
- starting offset in the byte arraypublic static int readSwappedUnsignedShort(byte[] data, + int offset)+
data
- source byte arrayoffset
- starting offset in the byte arraypublic static void writeSwappedInteger(byte[] data, + int offset, + int value)+
data
- target byte arrayoffset
- starting offset in the byte arrayvalue
- value to writepublic static int readSwappedInteger(byte[] data, + int offset)+
data
- source byte arrayoffset
- starting offset in the byte arraypublic static long readSwappedUnsignedInteger(byte[] data, + int offset)+
data
- source byte arrayoffset
- starting offset in the byte arraypublic static void writeSwappedLong(byte[] data, + int offset, + long value)+
data
- target byte arrayoffset
- starting offset in the byte arrayvalue
- value to writepublic static long readSwappedLong(byte[] data, + int offset)+
data
- source byte arrayoffset
- starting offset in the byte arraypublic static void writeSwappedFloat(byte[] data, + int offset, + float value)+
data
- target byte arrayoffset
- starting offset in the byte arrayvalue
- value to writepublic static float readSwappedFloat(byte[] data, + int offset)+
data
- source byte arrayoffset
- starting offset in the byte arraypublic static void writeSwappedDouble(byte[] data, + int offset, + double value)+
data
- target byte arrayoffset
- starting offset in the byte arrayvalue
- value to writepublic static double readSwappedDouble(byte[] data, + int offset)+
data
- source byte arrayoffset
- starting offset in the byte arraypublic static void writeSwappedShort(OutputStream output, + short value) + throws IOException+
output
- target OutputStreamvalue
- value to writeIOException
- in case of an I/O problempublic static short readSwappedShort(InputStream input) + throws IOException+
input
- source InputStreamIOException
- in case of an I/O problempublic static int readSwappedUnsignedShort(InputStream input) + throws IOException+
input
- source InputStreamIOException
- in case of an I/O problempublic static void writeSwappedInteger(OutputStream output, + int value) + throws IOException+
output
- target OutputStreamvalue
- value to writeIOException
- in case of an I/O problempublic static int readSwappedInteger(InputStream input) + throws IOException+
input
- source InputStreamIOException
- in case of an I/O problempublic static long readSwappedUnsignedInteger(InputStream input) + throws IOException+
input
- source InputStreamIOException
- in case of an I/O problempublic static void writeSwappedLong(OutputStream output, + long value) + throws IOException+
output
- target OutputStreamvalue
- value to writeIOException
- in case of an I/O problempublic static long readSwappedLong(InputStream input) + throws IOException+
input
- source InputStreamIOException
- in case of an I/O problempublic static void writeSwappedFloat(OutputStream output, + float value) + throws IOException+
output
- target OutputStreamvalue
- value to writeIOException
- in case of an I/O problempublic static float readSwappedFloat(InputStream input) + throws IOException+
input
- source InputStreamIOException
- in case of an I/O problempublic static void writeSwappedDouble(OutputStream output, + double value) + throws IOException+
output
- target OutputStreamvalue
- value to writeIOException
- in case of an I/O problempublic static double readSwappedDouble(InputStream input) + throws IOException+
input
- source InputStreamIOException
- in case of an I/O problemCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/FileCleaner.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/FileCleaner.html new file mode 100644 index 0000000..6b04435 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/FileCleaner.html @@ -0,0 +1,459 @@ + + + + + +@Deprecated +public class FileCleaner +extends Object+
+ This utility creates a background thread to handle file deletion. + Each file to be deleted is registered with a handler object. + When the handler object is garbage collected, the file is deleted. +
+ In an environment with multiple class loaders (a servlet container, for
+ example), you should consider stopping the background thread if it is no
+ longer needed. This is done by invoking the method
+ exitWhenFinished()
, typically in
+ javax.servlet.ServletContextListener.contextDestroyed(javax.servlet.ServletContextEvent)
or similar.
Constructor and Description | +
---|
FileCleaner()
+Deprecated.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static void |
+exitWhenFinished()
+Deprecated.
+
+
+ |
+
static FileCleaningTracker |
+getInstance()
+Deprecated.
+Returns the singleton instance, which is used by the deprecated, static methods.
+ |
+
static int |
+getTrackCount()
+Deprecated.
+
+
+ |
+
static void |
+track(File file,
+ Object marker)
+Deprecated.
+
+
+ |
+
static void |
+track(File file,
+ Object marker,
+ FileDeleteStrategy deleteStrategy)
+Deprecated.
+
+
+ |
+
static void |
+track(String path,
+ Object marker)
+Deprecated.
+
+
+ |
+
static void |
+track(String path,
+ Object marker,
+ FileDeleteStrategy deleteStrategy)
+Deprecated.
+
+
+ |
+
@Deprecated +public static void track(File file, + Object marker)+
FileCleaningTracker.track(File, Object)
.normal
deletion strategy will be used.file
- the file to be tracked, not nullmarker
- the marker object used to track the file, not nullNullPointerException
- if the file is null@Deprecated +public static void track(File file, + Object marker, + FileDeleteStrategy deleteStrategy)+
FileCleaningTracker.track(File, Object, FileDeleteStrategy)
.file
- the file to be tracked, not nullmarker
- the marker object used to track the file, not nulldeleteStrategy
- the strategy to delete the file, null means normalNullPointerException
- if the file is null@Deprecated +public static void track(String path, + Object marker)+
FileCleaningTracker.track(String, Object)
.normal
deletion strategy will be used.path
- the full path to the file to be tracked, not nullmarker
- the marker object used to track the file, not nullNullPointerException
- if the path is null@Deprecated +public static void track(String path, + Object marker, + FileDeleteStrategy deleteStrategy)+
FileCleaningTracker.track(String, Object, FileDeleteStrategy)
.path
- the full path to the file to be tracked, not nullmarker
- the marker object used to track the file, not nulldeleteStrategy
- the strategy to delete the file, null means normalNullPointerException
- if the path is null@Deprecated +public static int getTrackCount()+
FileCleaningTracker.getTrackCount()
.@Deprecated +public static void exitWhenFinished()+
FileCleaningTracker.exitWhenFinished()
.+ In a simple environment, you don't need this method as the file cleaner + thread will simply exit when the JVM exits. In a more complex environment, + with multiple class loaders (such as an application server), you should be + aware that the file cleaner thread will continue running even if the class + loader it was started from terminates. This can consitute a memory leak. +
+ For example, suppose that you have developed a web application, which + contains the commons-io jar file in your WEB-INF/lib directory. In other + words, the FileCleaner class is loaded through the class loader of your + web application. If the web application is terminated, but the servlet + container is still running, then the file cleaner thread will still exist, + posing a memory leak. +
+ This method allows the thread to be terminated. Simply call this method
+ in the resource cleanup code, such as
+ javax.servlet.ServletContextListener.contextDestroyed(javax.servlet.ServletContextEvent)
.
+ One called, no new objects can be tracked by the file cleaner.
public static FileCleaningTracker getInstance()+
FileCleaningTracker
class while maintain compatibility with the
+ deprecated FileCleaner
.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/FileCleaningTracker.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/FileCleaningTracker.html new file mode 100644 index 0000000..d7b5d7e --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/FileCleaningTracker.html @@ -0,0 +1,430 @@ + + + + + +public class FileCleaningTracker +extends Object+
+ This utility creates a background thread to handle file deletion. + Each file to be deleted is registered with a handler object. + When the handler object is garbage collected, the file is deleted. +
+ In an environment with multiple class loaders (a servlet container, for
+ example), you should consider stopping the background thread if it is no
+ longer needed. This is done by invoking the method
+ exitWhenFinished
, typically in
+ javax.servlet.ServletContextListener.contextDestroyed(javax.servlet.ServletContextEvent)
or similar.
Constructor and Description | +
---|
FileCleaningTracker() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+exitWhenFinished()
+Call this method to cause the file cleaner thread to terminate when
+ there are no more objects being tracked for deletion.
+ |
+
List<String> |
+getDeleteFailures()
+Return the file paths that failed to delete.
+ |
+
int |
+getTrackCount()
+Retrieve the number of files currently being tracked, and therefore
+ awaiting deletion.
+ |
+
void |
+track(File file,
+ Object marker)
+Track the specified file, using the provided marker, deleting the file
+ when the marker instance is garbage collected.
+ |
+
void |
+track(File file,
+ Object marker,
+ FileDeleteStrategy deleteStrategy)
+Track the specified file, using the provided marker, deleting the file
+ when the marker instance is garbage collected.
+ |
+
void |
+track(String path,
+ Object marker)
+Track the specified file, using the provided marker, deleting the file
+ when the marker instance is garbage collected.
+ |
+
void |
+track(String path,
+ Object marker,
+ FileDeleteStrategy deleteStrategy)
+Track the specified file, using the provided marker, deleting the file
+ when the marker instance is garbage collected.
+ |
+
public void track(File file, + Object marker)+
normal
deletion strategy will be used.file
- the file to be tracked, not nullmarker
- the marker object used to track the file, not nullNullPointerException
- if the file is nullpublic void track(File file, + Object marker, + FileDeleteStrategy deleteStrategy)+
file
- the file to be tracked, not nullmarker
- the marker object used to track the file, not nulldeleteStrategy
- the strategy to delete the file, null means normalNullPointerException
- if the file is nullpublic void track(String path, + Object marker)+
normal
deletion strategy will be used.path
- the full path to the file to be tracked, not nullmarker
- the marker object used to track the file, not nullNullPointerException
- if the path is nullpublic void track(String path, + Object marker, + FileDeleteStrategy deleteStrategy)+
path
- the full path to the file to be tracked, not nullmarker
- the marker object used to track the file, not nulldeleteStrategy
- the strategy to delete the file, null means normalNullPointerException
- if the path is nullpublic int getTrackCount()+
public List<String> getDeleteFailures()+
public void exitWhenFinished()+
+ In a simple environment, you don't need this method as the file cleaner + thread will simply exit when the JVM exits. In a more complex environment, + with multiple class loaders (such as an application server), you should be + aware that the file cleaner thread will continue running even if the class + loader it was started from terminates. This can consitute a memory leak. +
+ For example, suppose that you have developed a web application, which + contains the commons-io jar file in your WEB-INF/lib directory. In other + words, the FileCleaner class is loaded through the class loader of your + web application. If the web application is terminated, but the servlet + container is still running, then the file cleaner thread will still exist, + posing a memory leak. +
+ This method allows the thread to be terminated. Simply call this method
+ in the resource cleanup code, such as
+ javax.servlet.ServletContextListener.contextDestroyed(javax.servlet.ServletContextEvent)
.
+ Once called, no new objects can be tracked by the file cleaner.
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/FileDeleteStrategy.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/FileDeleteStrategy.html new file mode 100644 index 0000000..9018c4d --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/FileDeleteStrategy.html @@ -0,0 +1,415 @@ + + + + + +public class FileDeleteStrategy +extends Object+
+ There is more than one way to delete a file. + You may want to limit access to certain directories, to only delete + directories if they are empty, or maybe to force deletion. +
+ This class captures the strategy to use and is designed for user subclassing.
Modifier and Type | +Field and Description | +
---|---|
static FileDeleteStrategy |
+FORCE
+The singleton instance for forced file deletion, which always deletes,
+ even if the file represents a non-empty directory.
+ |
+
static FileDeleteStrategy |
+NORMAL
+The singleton instance for normal file deletion, which does not permit
+ the deletion of directories that are not empty.
+ |
+
Modifier | +Constructor and Description | +
---|---|
protected |
+FileDeleteStrategy(String name)
+Restricted constructor.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+delete(File fileToDelete)
+Deletes the file object, which may be a file or a directory.
+ |
+
boolean |
+deleteQuietly(File fileToDelete)
+Deletes the file object, which may be a file or a directory.
+ |
+
protected boolean |
+doDelete(File fileToDelete)
+Actually deletes the file object, which may be a file or a directory.
+ |
+
String |
+toString()
+Gets a string describing the delete strategy.
+ |
+
public static final FileDeleteStrategy NORMAL+
public static final FileDeleteStrategy FORCE+
protected FileDeleteStrategy(String name)+
name
- the name by which the strategy is knownpublic boolean deleteQuietly(File fileToDelete)+
IOException
s are caught and false returned instead.
+ If the file does not exist or is null, true is returned.
+
+ Subclass writers should override doDelete(File)
, not this method.
fileToDelete
- the file to delete, null returns truepublic void delete(File fileToDelete) + throws IOException+
+ Subclass writers should override doDelete(File)
, not this method.
fileToDelete
- the file to delete, not nullNullPointerException
- if the file is nullIOException
- if an error occurs during file deletionprotected boolean doDelete(File fileToDelete) + throws IOException+
+ This method is designed for subclasses to override.
+ The implementation may return either false or an IOException
+ when deletion fails. The delete(File)
and deleteQuietly(File)
+ methods will handle either response appropriately.
+ A check has been made to ensure that the file will exist.
+
+ This implementation uses File.delete()
.
fileToDelete
- the file to delete, exists, not nullNullPointerException
- if the file is nullIOException
- if an error occurs during file deletionCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/FileExistsException.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/FileExistsException.html new file mode 100644 index 0000000..7a562c9 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/FileExistsException.html @@ -0,0 +1,295 @@ + + + + + +public class FileExistsException +extends IOException+
Constructor and Description | +
---|
FileExistsException()
+Default Constructor.
+ |
+
FileExistsException(File file)
+Construct an instance with the specified file.
+ |
+
FileExistsException(String message)
+Construct an instance with the specified message.
+ |
+
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public FileExistsException()+
public FileExistsException(String message)+
message
- The error messagepublic FileExistsException(File file)+
file
- The file that existsCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/FileSystemUtils.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/FileSystemUtils.html new file mode 100644 index 0000000..251dea4 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/FileSystemUtils.html @@ -0,0 +1,440 @@ + + + + + +public class FileSystemUtils +extends Object+
+ This class provides static utility methods for general file system
+ functions not provided via the JDK File
class.
+
+ The current functions provided are: +
Constructor and Description | +
---|
FileSystemUtils()
+Instances should NOT be constructed in standard programming.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static long |
+freeSpace(String path)
+Deprecated.
+
+Use freeSpaceKb(String)
+ Deprecated from 1.3, may be removed in 2.0
+ |
+
static long |
+freeSpaceKb()
+Returns the disk size of the volume which holds the working directory.
+ |
+
static long |
+freeSpaceKb(long timeout)
+Returns the disk size of the volume which holds the working directory.
+ |
+
static long |
+freeSpaceKb(String path)
+Returns the free space on a drive or volume in kilobytes by invoking
+ the command line.
+ |
+
static long |
+freeSpaceKb(String path,
+ long timeout)
+Returns the free space on a drive or volume in kilobytes by invoking
+ the command line.
+ |
+
public FileSystemUtils()+
@Deprecated +public static long freeSpace(String path) + throws IOException+
freeSpaceKb(String)
which returns a result in kilobytes.
+ + Note that some OS's are NOT currently supported, including OS/390, + OpenVMS. +
+ FileSystemUtils.freeSpace("C:"); // Windows + FileSystemUtils.freeSpace("/volume"); // *nix ++ The free space is calculated via the command line. + It uses 'dir /-c' on Windows and 'df' on *nix.
path
- the path to get free space for, not null, not empty on UnixIllegalArgumentException
- if the path is invalidIllegalStateException
- if an error occurred in initialisationIOException
- if an error occurs when finding the free spacepublic static long freeSpaceKb(String path) + throws IOException+
+ FileSystemUtils.freeSpaceKb("C:"); // Windows + FileSystemUtils.freeSpaceKb("/volume"); // *nix ++ The free space is calculated via the command line. + It uses 'dir /-c' on Windows, 'df -kP' on AIX/HP-UX and 'df -k' on other Unix. +
+ In order to work, you must be running Windows, or have a implementation of + Unix df that supports GNU format when passed -k (or -kP). If you are going + to rely on this code, please check that it works on your OS by running + some simple tests to compare the command line with the output from this class. + If your operating system isn't supported, please raise a JIRA call detailing + the exact result from df -k and as much other detail as possible, thanks.
path
- the path to get free space for, not null, not empty on UnixIllegalArgumentException
- if the path is invalidIllegalStateException
- if an error occurred in initialisationIOException
- if an error occurs when finding the free spacepublic static long freeSpaceKb(String path, + long timeout) + throws IOException+
+ FileSystemUtils.freeSpaceKb("C:"); // Windows + FileSystemUtils.freeSpaceKb("/volume"); // *nix ++ The free space is calculated via the command line. + It uses 'dir /-c' on Windows, 'df -kP' on AIX/HP-UX and 'df -k' on other Unix. +
+ In order to work, you must be running Windows, or have a implementation of + Unix df that supports GNU format when passed -k (or -kP). If you are going + to rely on this code, please check that it works on your OS by running + some simple tests to compare the command line with the output from this class. + If your operating system isn't supported, please raise a JIRA call detailing + the exact result from df -k and as much other detail as possible, thanks.
path
- the path to get free space for, not null, not empty on Unixtimeout
- The timeout amount in milliseconds or no timeout if the value
+ is zero or lessIllegalArgumentException
- if the path is invalidIllegalStateException
- if an error occurred in initialisationIOException
- if an error occurs when finding the free spacepublic static long freeSpaceKb() + throws IOException+
+ Identical to: +
+ freeSpaceKb(new File(".").getAbsolutePath()) +
IllegalStateException
- if an error occurred in initialisationIOException
- if an error occurs when finding the free spacepublic static long freeSpaceKb(long timeout) + throws IOException+
+ Identical to: +
+ freeSpaceKb(new File(".").getAbsolutePath()) +
timeout
- The timeout amount in milliseconds or no timeout if the value
+ is zero or lessIllegalStateException
- if an error occurred in initialisationIOException
- if an error occurs when finding the free spaceCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/FileUtils.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/FileUtils.html new file mode 100644 index 0000000..f10c4d8 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/FileUtils.html @@ -0,0 +1,3441 @@ + + + + + +public class FileUtils +extends Object+
+ Facilities are provided in the following areas: +
+ Origin of code: Excalibur, Alexandria, Commons-Utils
Modifier and Type | +Field and Description | +
---|---|
static File[] |
+EMPTY_FILE_ARRAY
+An empty array of type
+File . |
+
static long |
+ONE_EB
+The number of bytes in an exabyte.
+ |
+
static BigInteger |
+ONE_EB_BI
+The number of bytes in an exabyte.
+ |
+
static long |
+ONE_GB
+The number of bytes in a gigabyte.
+ |
+
static BigInteger |
+ONE_GB_BI
+The number of bytes in a gigabyte.
+ |
+
static long |
+ONE_KB
+The number of bytes in a kilobyte.
+ |
+
static BigInteger |
+ONE_KB_BI
+The number of bytes in a kilobyte.
+ |
+
static long |
+ONE_MB
+The number of bytes in a megabyte.
+ |
+
static BigInteger |
+ONE_MB_BI
+The number of bytes in a megabyte.
+ |
+
static long |
+ONE_PB
+The number of bytes in a petabyte.
+ |
+
static BigInteger |
+ONE_PB_BI
+The number of bytes in a petabyte.
+ |
+
static long |
+ONE_TB
+The number of bytes in a terabyte.
+ |
+
static BigInteger |
+ONE_TB_BI
+The number of bytes in a terabyte.
+ |
+
static BigInteger |
+ONE_YB
+The number of bytes in a yottabyte.
+ |
+
static BigInteger |
+ONE_ZB
+The number of bytes in a zettabyte.
+ |
+
Constructor and Description | +
---|
FileUtils()
+Instances should NOT be constructed in standard programming.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static String |
+byteCountToDisplaySize(BigInteger size)
+Returns a human-readable version of the file size, where the input represents a specific number of bytes.
+ |
+
static String |
+byteCountToDisplaySize(long size)
+Returns a human-readable version of the file size, where the input represents a specific number of bytes.
+ |
+
static Checksum |
+checksum(File file,
+ Checksum checksum)
+Computes the checksum of a file using the specified checksum object.
+ |
+
static long |
+checksumCRC32(File file)
+Computes the checksum of a file using the CRC32 checksum routine.
+ |
+
static void |
+cleanDirectory(File directory)
+Cleans a directory without deleting it.
+ |
+
static boolean |
+contentEquals(File file1,
+ File file2)
+Compares the contents of two files to determine if they are equal or not.
+ |
+
static boolean |
+contentEqualsIgnoreEOL(File file1,
+ File file2,
+ String charsetName)
+Compares the contents of two files to determine if they are equal or not.
+ |
+
static File[] |
+convertFileCollectionToFileArray(Collection<File> files)
+Converts a Collection containing java.io.File instanced into array
+ representation.
+ |
+
static void |
+copyDirectory(File srcDir,
+ File destDir)
+Copies a whole directory to a new location preserving the file dates.
+ |
+
static void |
+copyDirectory(File srcDir,
+ File destDir,
+ boolean preserveFileDate)
+Copies a whole directory to a new location.
+ |
+
static void |
+copyDirectory(File srcDir,
+ File destDir,
+ FileFilter filter)
+Copies a filtered directory to a new location preserving the file dates.
+ |
+
static void |
+copyDirectory(File srcDir,
+ File destDir,
+ FileFilter filter,
+ boolean preserveFileDate)
+Copies a filtered directory to a new location.
+ |
+
static void |
+copyDirectoryToDirectory(File srcDir,
+ File destDir)
+Copies a directory to within another directory preserving the file dates.
+ |
+
static void |
+copyFile(File srcFile,
+ File destFile)
+Copies a file to a new location preserving the file date.
+ |
+
static void |
+copyFile(File srcFile,
+ File destFile,
+ boolean preserveFileDate)
+Copies a file to a new location.
+ |
+
static long |
+copyFile(File input,
+ OutputStream output)
+Copy bytes from a
+File to an OutputStream . |
+
static void |
+copyFileToDirectory(File srcFile,
+ File destDir)
+Copies a file to a directory preserving the file date.
+ |
+
static void |
+copyFileToDirectory(File srcFile,
+ File destDir,
+ boolean preserveFileDate)
+Copies a file to a directory optionally preserving the file date.
+ |
+
static void |
+copyInputStreamToFile(InputStream source,
+ File destination)
+
+ |
+
static void |
+copyToFile(InputStream source,
+ File destination)
+
+ |
+
static void |
+copyURLToFile(URL source,
+ File destination)
+Copies bytes from the URL
+source to a file
+ destination . |
+
static void |
+copyURLToFile(URL source,
+ File destination,
+ int connectionTimeout,
+ int readTimeout)
+Copies bytes from the URL
+source to a file
+ destination . |
+
static void |
+deleteDirectory(File directory)
+Deletes a directory recursively.
+ |
+
static boolean |
+deleteQuietly(File file)
+Deletes a file, never throwing an exception.
+ |
+
static boolean |
+directoryContains(File directory,
+ File child)
+Determines whether the
+parent directory contains the child element (a file or directory). |
+
static void |
+forceDelete(File file)
+Deletes a file.
+ |
+
static void |
+forceDeleteOnExit(File file)
+Schedules a file to be deleted when JVM exits.
+ |
+
static void |
+forceMkdir(File directory)
+Makes a directory, including any necessary but nonexistent parent
+ directories.
+ |
+
static void |
+forceMkdirParent(File file)
+Makes any necessary but nonexistent parent directories for a given File.
+ |
+
static File |
+getFile(File directory,
+ String... names)
+Construct a file from the set of name elements.
+ |
+
static File |
+getFile(String... names)
+Construct a file from the set of name elements.
+ |
+
static File |
+getTempDirectory()
+Returns a
+File representing the system temporary directory. |
+
static String |
+getTempDirectoryPath()
+Returns the path to the system temporary directory.
+ |
+
static File |
+getUserDirectory()
+Returns a
+File representing the user's home directory. |
+
static String |
+getUserDirectoryPath()
+Returns the path to the user's home directory.
+ |
+
static boolean |
+isFileNewer(File file,
+ Date date)
+Tests if the specified
+File is newer than the specified
+ Date . |
+
static boolean |
+isFileNewer(File file,
+ File reference)
+Tests if the specified
+File is newer than the reference
+ File . |
+
static boolean |
+isFileNewer(File file,
+ long timeMillis)
+Tests if the specified
+File is newer than the specified
+ time reference. |
+
static boolean |
+isFileOlder(File file,
+ Date date)
+Tests if the specified
+File is older than the specified
+ Date . |
+
static boolean |
+isFileOlder(File file,
+ File reference)
+Tests if the specified
+File is older than the reference
+ File . |
+
static boolean |
+isFileOlder(File file,
+ long timeMillis)
+Tests if the specified
+File is older than the specified
+ time reference. |
+
static boolean |
+isSymlink(File file)
+Determines whether the specified file is a Symbolic Link rather than an actual file.
+ |
+
static Iterator<File> |
+iterateFiles(File directory,
+ IOFileFilter fileFilter,
+ IOFileFilter dirFilter)
+Allows iteration over the files in given directory (and optionally
+ its subdirectories).
+ |
+
static Iterator<File> |
+iterateFiles(File directory,
+ String[] extensions,
+ boolean recursive)
+Allows iteration over the files in a given directory (and optionally
+ its subdirectories) which match an array of extensions.
+ |
+
static Iterator<File> |
+iterateFilesAndDirs(File directory,
+ IOFileFilter fileFilter,
+ IOFileFilter dirFilter)
+Allows iteration over the files in given directory (and optionally
+ its subdirectories).
+ |
+
static LineIterator |
+lineIterator(File file)
+Returns an Iterator for the lines in a
+File using the default encoding for the VM. |
+
static LineIterator |
+lineIterator(File file,
+ String encoding)
+Returns an Iterator for the lines in a
+File . |
+
static Collection<File> |
+listFiles(File directory,
+ IOFileFilter fileFilter,
+ IOFileFilter dirFilter)
+Finds files within a given directory (and optionally its
+ subdirectories).
+ |
+
static Collection<File> |
+listFiles(File directory,
+ String[] extensions,
+ boolean recursive)
+Finds files within a given directory (and optionally its subdirectories)
+ which match an array of extensions.
+ |
+
static Collection<File> |
+listFilesAndDirs(File directory,
+ IOFileFilter fileFilter,
+ IOFileFilter dirFilter)
+Finds files within a given directory (and optionally its
+ subdirectories).
+ |
+
static void |
+moveDirectory(File srcDir,
+ File destDir)
+Moves a directory.
+ |
+
static void |
+moveDirectoryToDirectory(File src,
+ File destDir,
+ boolean createDestDir)
+Moves a directory to another directory.
+ |
+
static void |
+moveFile(File srcFile,
+ File destFile)
+Moves a file.
+ |
+
static void |
+moveFileToDirectory(File srcFile,
+ File destDir,
+ boolean createDestDir)
+Moves a file to a directory.
+ |
+
static void |
+moveToDirectory(File src,
+ File destDir,
+ boolean createDestDir)
+Moves a file or directory to the destination directory.
+ |
+
static FileInputStream |
+openInputStream(File file)
+Opens a
+FileInputStream for the specified file, providing better
+ error messages than simply calling new FileInputStream(file) . |
+
static FileOutputStream |
+openOutputStream(File file)
+Opens a
+FileOutputStream for the specified file, checking and
+ creating the parent directory if it does not exist. |
+
static FileOutputStream |
+openOutputStream(File file,
+ boolean append)
+Opens a
+FileOutputStream for the specified file, checking and
+ creating the parent directory if it does not exist. |
+
static byte[] |
+readFileToByteArray(File file)
+Reads the contents of a file into a byte array.
+ |
+
static String |
+readFileToString(File file)
+Deprecated.
+
+2.5 use
+readFileToString(File, Charset) instead |
+
static String |
+readFileToString(File file,
+ Charset encoding)
+Reads the contents of a file into a String.
+ |
+
static String |
+readFileToString(File file,
+ String encoding)
+Reads the contents of a file into a String.
+ |
+
static List<String> |
+readLines(File file)
+Deprecated.
+
+2.5 use
+readLines(File, Charset) instead |
+
static List<String> |
+readLines(File file,
+ Charset encoding)
+Reads the contents of a file line by line to a List of Strings.
+ |
+
static List<String> |
+readLines(File file,
+ String encoding)
+Reads the contents of a file line by line to a List of Strings.
+ |
+
static long |
+sizeOf(File file)
+Returns the size of the specified file or directory.
+ |
+
static BigInteger |
+sizeOfAsBigInteger(File file)
+Returns the size of the specified file or directory.
+ |
+
static long |
+sizeOfDirectory(File directory)
+Counts the size of a directory recursively (sum of the length of all files).
+ |
+
static BigInteger |
+sizeOfDirectoryAsBigInteger(File directory)
+Counts the size of a directory recursively (sum of the length of all files).
+ |
+
static File |
+toFile(URL url)
+Convert from a
+URL to a File . |
+
static File[] |
+toFiles(URL[] urls)
+Converts each of an array of
+URL to a File . |
+
static void |
+touch(File file)
+Implements the same behaviour as the "touch" utility on Unix.
+ |
+
static URL[] |
+toURLs(File[] files)
+Converts each of an array of
+File to a URL . |
+
static boolean |
+waitFor(File file,
+ int seconds)
+Waits for NFS to propagate a file creation, imposing a timeout.
+ |
+
static void |
+write(File file,
+ CharSequence data)
+Deprecated.
+
+2.5 use
+write(File, CharSequence, Charset) instead |
+
static void |
+write(File file,
+ CharSequence data,
+ boolean append)
+Deprecated.
+
+2.5 use
+write(File, CharSequence, Charset, boolean) instead |
+
static void |
+write(File file,
+ CharSequence data,
+ Charset encoding)
+Writes a CharSequence to a file creating the file if it does not exist.
+ |
+
static void |
+write(File file,
+ CharSequence data,
+ Charset encoding,
+ boolean append)
+Writes a CharSequence to a file creating the file if it does not exist.
+ |
+
static void |
+write(File file,
+ CharSequence data,
+ String encoding)
+Writes a CharSequence to a file creating the file if it does not exist.
+ |
+
static void |
+write(File file,
+ CharSequence data,
+ String encoding,
+ boolean append)
+Writes a CharSequence to a file creating the file if it does not exist.
+ |
+
static void |
+writeByteArrayToFile(File file,
+ byte[] data)
+Writes a byte array to a file creating the file if it does not exist.
+ |
+
static void |
+writeByteArrayToFile(File file,
+ byte[] data,
+ boolean append)
+Writes a byte array to a file creating the file if it does not exist.
+ |
+
static void |
+writeByteArrayToFile(File file,
+ byte[] data,
+ int off,
+ int len)
+Writes
+len bytes from the specified byte array starting
+ at offset off to a file, creating the file if it does
+ not exist. |
+
static void |
+writeByteArrayToFile(File file,
+ byte[] data,
+ int off,
+ int len,
+ boolean append)
+Writes
+len bytes from the specified byte array starting
+ at offset off to a file, creating the file if it does
+ not exist. |
+
static void |
+writeLines(File file,
+ Collection<?> lines)
+Writes the
+toString() value of each item in a collection to
+ the specified File line by line. |
+
static void |
+writeLines(File file,
+ Collection<?> lines,
+ boolean append)
+Writes the
+toString() value of each item in a collection to
+ the specified File line by line. |
+
static void |
+writeLines(File file,
+ Collection<?> lines,
+ String lineEnding)
+Writes the
+toString() value of each item in a collection to
+ the specified File line by line. |
+
static void |
+writeLines(File file,
+ Collection<?> lines,
+ String lineEnding,
+ boolean append)
+Writes the
+toString() value of each item in a collection to
+ the specified File line by line. |
+
static void |
+writeLines(File file,
+ String encoding,
+ Collection<?> lines)
+Writes the
+toString() value of each item in a collection to
+ the specified File line by line. |
+
static void |
+writeLines(File file,
+ String encoding,
+ Collection<?> lines,
+ boolean append)
+Writes the
+toString() value of each item in a collection to
+ the specified File line by line, optionally appending. |
+
static void |
+writeLines(File file,
+ String encoding,
+ Collection<?> lines,
+ String lineEnding)
+Writes the
+toString() value of each item in a collection to
+ the specified File line by line. |
+
static void |
+writeLines(File file,
+ String encoding,
+ Collection<?> lines,
+ String lineEnding,
+ boolean append)
+Writes the
+toString() value of each item in a collection to
+ the specified File line by line. |
+
static void |
+writeStringToFile(File file,
+ String data)
+Deprecated.
+
+2.5 use
+writeStringToFile(File, String, Charset) instead |
+
static void |
+writeStringToFile(File file,
+ String data,
+ boolean append)
+Deprecated.
+
+2.5 use
+writeStringToFile(File, String, Charset, boolean) instead |
+
static void |
+writeStringToFile(File file,
+ String data,
+ Charset encoding)
+Writes a String to a file creating the file if it does not exist.
+ |
+
static void |
+writeStringToFile(File file,
+ String data,
+ Charset encoding,
+ boolean append)
+Writes a String to a file creating the file if it does not exist.
+ |
+
static void |
+writeStringToFile(File file,
+ String data,
+ String encoding)
+Writes a String to a file creating the file if it does not exist.
+ |
+
static void |
+writeStringToFile(File file,
+ String data,
+ String encoding,
+ boolean append)
+Writes a String to a file creating the file if it does not exist.
+ |
+
public static final long ONE_KB+
public static final BigInteger ONE_KB_BI+
public static final long ONE_MB+
public static final BigInteger ONE_MB_BI+
public static final long ONE_GB+
public static final BigInteger ONE_GB_BI+
public static final long ONE_TB+
public static final BigInteger ONE_TB_BI+
public static final long ONE_PB+
public static final BigInteger ONE_PB_BI+
public static final long ONE_EB+
public static final BigInteger ONE_EB_BI+
public static final BigInteger ONE_ZB+
public static final BigInteger ONE_YB+
public static final File[] EMPTY_FILE_ARRAY+
File
.public FileUtils()+
public static File getFile(File directory, + String... names)+
directory
- the parent directorynames
- the name elementspublic static File getFile(String... names)+
names
- the name elementspublic static String getTempDirectoryPath()+
public static File getTempDirectory()+
File
representing the system temporary directory.public static String getUserDirectoryPath()+
public static File getUserDirectory()+
File
representing the user's home directory.public static FileInputStream openInputStream(File file) + throws IOException+
FileInputStream
for the specified file, providing better
+ error messages than simply calling new FileInputStream(file)
.
+ + At the end of the method either the stream will be successfully opened, + or an exception will have been thrown. +
+ An exception is thrown if the file does not exist. + An exception is thrown if the file object exists but is a directory. + An exception is thrown if the file exists but cannot be read.
file
- the file to open for input, must not be null
FileInputStream
for the specified fileFileNotFoundException
- if the file does not existIOException
- if the file object is a directoryIOException
- if the file cannot be readpublic static FileOutputStream openOutputStream(File file) + throws IOException+
FileOutputStream
for the specified file, checking and
+ creating the parent directory if it does not exist.
+ + At the end of the method either the stream will be successfully opened, + or an exception will have been thrown. +
+ The parent directory will be created if it does not exist. + The file will be created if it does not exist. + An exception is thrown if the file object exists but is a directory. + An exception is thrown if the file exists but cannot be written to. + An exception is thrown if the parent directory cannot be created.
file
- the file to open for output, must not be null
FileOutputStream
for the specified fileIOException
- if the file object is a directoryIOException
- if the file cannot be written toIOException
- if a parent directory needs creating but that failspublic static FileOutputStream openOutputStream(File file, + boolean append) + throws IOException+
FileOutputStream
for the specified file, checking and
+ creating the parent directory if it does not exist.
+ + At the end of the method either the stream will be successfully opened, + or an exception will have been thrown. +
+ The parent directory will be created if it does not exist. + The file will be created if it does not exist. + An exception is thrown if the file object exists but is a directory. + An exception is thrown if the file exists but cannot be written to. + An exception is thrown if the parent directory cannot be created.
file
- the file to open for output, must not be null
append
- if true
, then bytes will be added to the
+ end of the file rather than overwritingFileOutputStream
for the specified fileIOException
- if the file object is a directoryIOException
- if the file cannot be written toIOException
- if a parent directory needs creating but that failspublic static String byteCountToDisplaySize(BigInteger size)+
+ If the size is over 1GB, the size is returned as the number of whole GB, i.e. the size is rounded down to the + nearest GB boundary. +
++ Similarly for the 1MB and 1KB boundaries. +
size
- the number of bytespublic static String byteCountToDisplaySize(long size)+
+ If the size is over 1GB, the size is returned as the number of whole GB, i.e. the size is rounded down to the + nearest GB boundary. +
++ Similarly for the 1MB and 1KB boundaries. +
size
- the number of bytespublic static void touch(File file) + throws IOException+
+ NOTE: As from v1.3, this method throws an IOException if the last + modified date of the file cannot be set. Also, as from v1.3 this method + creates parent directories if they do not exist.
file
- the File to touchIOException
- If an I/O problem occurspublic static File[] convertFileCollectionToFileArray(Collection<File> files)+
files
- a Collection containing java.io.File instancespublic static Collection<File> listFiles(File directory, + IOFileFilter fileFilter, + IOFileFilter dirFilter)+
+ If your search should recurse into subdirectories you can pass in + an IOFileFilter for directories. You don't need to bind a + DirectoryFileFilter (via logical AND) to this filter. This method does + that for you. +
+ An example: If you want to search through all directories called
+ "temp" you pass in FileFilterUtils.NameFileFilter("temp")
+
+ Another common usage of this method is find files in a directory
+ tree but ignoring the directories generated CVS. You can simply pass
+ in FileFilterUtils.makeCVSAware(null)
.
directory
- the directory to search infileFilter
- filter to apply when finding files.dirFilter
- optional filter to apply when finding subdirectories.
+ If this parameter is null
, subdirectories will not be included in the
+ search. Use TrueFileFilter.INSTANCE to match all directories.FileFilterUtils
,
+NameFileFilter
public static Collection<File> listFilesAndDirs(File directory, + IOFileFilter fileFilter, + IOFileFilter dirFilter)+
+ The resulting collection includes the starting directory and + any subdirectories that match the directory filter. +
directory
- the directory to search infileFilter
- filter to apply when finding files.dirFilter
- optional filter to apply when finding subdirectories.
+ If this parameter is null
, subdirectories will not be included in the
+ search. Use TrueFileFilter.INSTANCE to match all directories.listFiles(java.io.File, org.apache.commons.io.filefilter.IOFileFilter, org.apache.commons.io.filefilter.IOFileFilter)
,
+FileFilterUtils
,
+NameFileFilter
public static Iterator<File> iterateFiles(File directory, + IOFileFilter fileFilter, + IOFileFilter dirFilter)+
+ All files found are filtered by an IOFileFilter. This method is
+ based on listFiles(File, IOFileFilter, IOFileFilter)
,
+ which supports Iterable ('foreach' loop).
+
directory
- the directory to search infileFilter
- filter to apply when finding files.dirFilter
- optional filter to apply when finding subdirectories.
+ If this parameter is null
, subdirectories will not be included in the
+ search. Use TrueFileFilter.INSTANCE to match all directories.FileFilterUtils
,
+NameFileFilter
public static Iterator<File> iterateFilesAndDirs(File directory, + IOFileFilter fileFilter, + IOFileFilter dirFilter)+
+ All files found are filtered by an IOFileFilter. This method is
+ based on listFilesAndDirs(File, IOFileFilter, IOFileFilter)
,
+ which supports Iterable ('foreach' loop).
+
+ The resulting iterator includes the subdirectories themselves.
directory
- the directory to search infileFilter
- filter to apply when finding files.dirFilter
- optional filter to apply when finding subdirectories.
+ If this parameter is null
, subdirectories will not be included in the
+ search. Use TrueFileFilter.INSTANCE to match all directories.FileFilterUtils
,
+NameFileFilter
public static Collection<File> listFiles(File directory, + String[] extensions, + boolean recursive)+
directory
- the directory to search inextensions
- an array of extensions, ex. {"java","xml"}. If this
+ parameter is null
, all files are returned.recursive
- if true all subdirectories are searched as wellpublic static Iterator<File> iterateFiles(File directory, + String[] extensions, + boolean recursive)+
listFiles(File, String[], boolean)
,
+ which supports Iterable ('foreach' loop).directory
- the directory to search inextensions
- an array of extensions, ex. {"java","xml"}. If this
+ parameter is null
, all files are returned.recursive
- if true all subdirectories are searched as wellpublic static boolean contentEquals(File file1, + File file2) + throws IOException+
+ This method checks to see if the two files are different lengths + or if they point to the same file, before resorting to byte-by-byte + comparison of the contents. +
+ Code origin: Avalon
file1
- the first filefile2
- the second fileIOException
- in case of an I/O errorpublic static boolean contentEqualsIgnoreEOL(File file1, + File file2, + String charsetName) + throws IOException+
+ This method checks to see if the two files point to the same file, + before resorting to line-by-line comparison of the contents. +
file1
- the first filefile2
- the second filecharsetName
- the character encoding to be used.
+ May be null, in which case the platform default is usedIOException
- in case of an I/O errorIOUtils.contentEqualsIgnoreEOL(Reader, Reader)
public static File toFile(URL url)+
URL
to a File
.
+
+ From version 1.1 this method will decode the URL.
+ Syntax such as file:///my%20docs/file.txt
will be
+ correctly decoded to /my docs/file.txt
. Starting with version
+ 1.5, this method uses UTF-8 to decode percent-encoded octets to characters.
+ Additionally, malformed percent-encoded octets are handled leniently by
+ passing them through literally.
url
- the file URL to convert, null
returns null
File
object, or null
+ if the URL's protocol is not file
public static File[] toFiles(URL[] urls)+
URL
to a File
.
+
+ Returns an array of the same size as the input.
+ If the input is null
, an empty array is returned.
+ If the input contains null
, the output array contains null
at the same
+ index.
+
+ This method will decode the URL.
+ Syntax such as file:///my%20docs/file.txt
will be
+ correctly decoded to /my docs/file.txt
.
urls
- the file URLs to convert, null
returns empty arraynull
array of Files matching the input, with a null
item
+ if there was a null
at that index in the input arrayIllegalArgumentException
- if any file is not a URL fileIllegalArgumentException
- if any file is incorrectly encodedpublic static URL[] toURLs(File[] files) + throws IOException+
File
to a URL
.
+ + Returns an array of the same size as the input.
files
- the files to convert, must not be null
IOException
- if a file cannot be convertedNullPointerException
- if the parameter is nullpublic static void copyFileToDirectory(File srcFile, + File destDir) + throws IOException+
+ This method copies the contents of the specified source file + to a file of the same name in the specified destination directory. + The destination directory is created if it does not exist. + If the destination file exists, then this method will overwrite it. +
+ Note: This method tries to preserve the file's last
+ modified date/times using File.setLastModified(long)
, however
+ it is not guaranteed that the operation will succeed.
+ If the modification operation fails, no indication is provided.
srcFile
- an existing file to copy, must not be null
destDir
- the directory to place the copy in, must not be null
NullPointerException
- if source or destination is nullIOException
- if source or destination is invalidIOException
- if an IO error occurs during copyingcopyFile(File, File, boolean)
public static void copyFileToDirectory(File srcFile, + File destDir, + boolean preserveFileDate) + throws IOException+
+ This method copies the contents of the specified source file + to a file of the same name in the specified destination directory. + The destination directory is created if it does not exist. + If the destination file exists, then this method will overwrite it. +
+ Note: Setting preserveFileDate
to
+ true
tries to preserve the file's last modified
+ date/times using File.setLastModified(long)
, however it is
+ not guaranteed that the operation will succeed.
+ If the modification operation fails, no indication is provided.
srcFile
- an existing file to copy, must not be null
destDir
- the directory to place the copy in, must not be null
preserveFileDate
- true if the file date of the copy
+ should be the same as the originalNullPointerException
- if source or destination is null
IOException
- if source or destination is invalidIOException
- if an IO error occurs during copyingIOException
- if the output file length is not the same as the input file length after the copy
+ completescopyFile(File, File, boolean)
public static void copyFile(File srcFile, + File destFile) + throws IOException+
+ This method copies the contents of the specified source file to the + specified destination file. The directory holding the destination file is + created if it does not exist. If the destination file exists, then this + method will overwrite it. +
+ Note: This method tries to preserve the file's last
+ modified date/times using File.setLastModified(long)
, however
+ it is not guaranteed that the operation will succeed.
+ If the modification operation fails, no indication is provided.
srcFile
- an existing file to copy, must not be null
destFile
- the new file, must not be null
NullPointerException
- if source or destination is null
IOException
- if source or destination is invalidIOException
- if an IO error occurs during copyingIOException
- if the output file length is not the same as the input file length after the copy
+ completescopyFileToDirectory(File, File)
,
+copyFile(File, File, boolean)
public static void copyFile(File srcFile, + File destFile, + boolean preserveFileDate) + throws IOException+
+ This method copies the contents of the specified source file + to the specified destination file. + The directory holding the destination file is created if it does not exist. + If the destination file exists, then this method will overwrite it. +
+ Note: Setting preserveFileDate
to
+ true
tries to preserve the file's last modified
+ date/times using File.setLastModified(long)
, however it is
+ not guaranteed that the operation will succeed.
+ If the modification operation fails, no indication is provided.
srcFile
- an existing file to copy, must not be null
destFile
- the new file, must not be null
preserveFileDate
- true if the file date of the copy
+ should be the same as the originalNullPointerException
- if source or destination is null
IOException
- if source or destination is invalidIOException
- if an IO error occurs during copyingIOException
- if the output file length is not the same as the input file length after the copy
+ completescopyFileToDirectory(File, File, boolean)
,
+doCopyFile(File, File, boolean)
public static long copyFile(File input, + OutputStream output) + throws IOException+
File
to an OutputStream
.
+
+ This method buffers the input internally, so there is no need to use a BufferedInputStream
.
+
input
- the File
to read fromoutput
- the OutputStream
to write toNullPointerException
- if the input or output is nullIOException
- if an I/O error occurspublic static void copyDirectoryToDirectory(File srcDir, + File destDir) + throws IOException+
+ This method copies the source directory and all its contents to a + directory of the same name in the specified destination directory. +
+ The destination directory is created if it does not exist. + If the destination directory did exist, then this method merges + the source with the destination, with the source taking precedence. +
+ Note: This method tries to preserve the files' last
+ modified date/times using File.setLastModified(long)
, however
+ it is not guaranteed that those operations will succeed.
+ If the modification operation fails, no indication is provided.
srcDir
- an existing directory to copy, must not be null
destDir
- the directory to place the copy in, must not be null
NullPointerException
- if source or destination is null
IOException
- if source or destination is invalidIOException
- if an IO error occurs during copyingpublic static void copyDirectory(File srcDir, + File destDir) + throws IOException+
+ This method copies the specified directory and all its child + directories and files to the specified destination. + The destination is the new location and name of the directory. +
+ The destination directory is created if it does not exist. + If the destination directory did exist, then this method merges + the source with the destination, with the source taking precedence. +
+ Note: This method tries to preserve the files' last
+ modified date/times using File.setLastModified(long)
, however
+ it is not guaranteed that those operations will succeed.
+ If the modification operation fails, no indication is provided.
srcDir
- an existing directory to copy, must not be null
destDir
- the new directory, must not be null
NullPointerException
- if source or destination is null
IOException
- if source or destination is invalidIOException
- if an IO error occurs during copyingpublic static void copyDirectory(File srcDir, + File destDir, + boolean preserveFileDate) + throws IOException+
+ This method copies the contents of the specified source directory + to within the specified destination directory. +
+ The destination directory is created if it does not exist. + If the destination directory did exist, then this method merges + the source with the destination, with the source taking precedence. +
+ Note: Setting preserveFileDate
to
+ true
tries to preserve the files' last modified
+ date/times using File.setLastModified(long)
, however it is
+ not guaranteed that those operations will succeed.
+ If the modification operation fails, no indication is provided.
srcDir
- an existing directory to copy, must not be null
destDir
- the new directory, must not be null
preserveFileDate
- true if the file date of the copy
+ should be the same as the originalNullPointerException
- if source or destination is null
IOException
- if source or destination is invalidIOException
- if an IO error occurs during copyingpublic static void copyDirectory(File srcDir, + File destDir, + FileFilter filter) + throws IOException+
+ This method copies the contents of the specified source directory + to within the specified destination directory. +
+ The destination directory is created if it does not exist. + If the destination directory did exist, then this method merges + the source with the destination, with the source taking precedence. +
+ Note: This method tries to preserve the files' last
+ modified date/times using File.setLastModified(long)
, however
+ it is not guaranteed that those operations will succeed.
+ If the modification operation fails, no indication is provided.
+
+ // only copy the directory structure + FileUtils.copyDirectory(srcDir, destDir, DirectoryFileFilter.DIRECTORY); ++ +
+ // Create a filter for ".txt" files + IOFileFilter txtSuffixFilter = FileFilterUtils.suffixFileFilter(".txt"); + IOFileFilter txtFiles = FileFilterUtils.andFileFilter(FileFileFilter.FILE, txtSuffixFilter); + + // Create a filter for either directories or ".txt" files + FileFilter filter = FileFilterUtils.orFileFilter(DirectoryFileFilter.DIRECTORY, txtFiles); + + // Copy using the filter + FileUtils.copyDirectory(srcDir, destDir, filter); +
srcDir
- an existing directory to copy, must not be null
destDir
- the new directory, must not be null
filter
- the filter to apply, null means copy all directories and files
+ should be the same as the originalNullPointerException
- if source or destination is null
IOException
- if source or destination is invalidIOException
- if an IO error occurs during copyingpublic static void copyDirectory(File srcDir, + File destDir, + FileFilter filter, + boolean preserveFileDate) + throws IOException+
+ This method copies the contents of the specified source directory + to within the specified destination directory. +
+ The destination directory is created if it does not exist. + If the destination directory did exist, then this method merges + the source with the destination, with the source taking precedence. +
+ Note: Setting preserveFileDate
to
+ true
tries to preserve the files' last modified
+ date/times using File.setLastModified(long)
, however it is
+ not guaranteed that those operations will succeed.
+ If the modification operation fails, no indication is provided.
+
+ // only copy the directory structure + FileUtils.copyDirectory(srcDir, destDir, DirectoryFileFilter.DIRECTORY, false); ++ +
+ // Create a filter for ".txt" files + IOFileFilter txtSuffixFilter = FileFilterUtils.suffixFileFilter(".txt"); + IOFileFilter txtFiles = FileFilterUtils.andFileFilter(FileFileFilter.FILE, txtSuffixFilter); + + // Create a filter for either directories or ".txt" files + FileFilter filter = FileFilterUtils.orFileFilter(DirectoryFileFilter.DIRECTORY, txtFiles); + + // Copy using the filter + FileUtils.copyDirectory(srcDir, destDir, filter, false); +
srcDir
- an existing directory to copy, must not be null
destDir
- the new directory, must not be null
filter
- the filter to apply, null means copy all directories and filespreserveFileDate
- true if the file date of the copy
+ should be the same as the originalNullPointerException
- if source or destination is null
IOException
- if source or destination is invalidIOException
- if an IO error occurs during copyingpublic static void copyURLToFile(URL source, + File destination) + throws IOException+
source
to a file
+ destination
. The directories up to destination
+ will be created if they don't already exist. destination
+ will be overwritten if it already exists.
+
+ Warning: this method does not set a connection or read timeout and thus
+ might block forever. Use copyURLToFile(URL, File, int, int)
+ with reasonable timeouts to prevent this.
source
- the URL
to copy bytes from, must not be null
destination
- the non-directory File
to write bytes to
+ (possibly overwriting), must not be null
IOException
- if source
URL cannot be openedIOException
- if destination
is a directoryIOException
- if destination
cannot be writtenIOException
- if destination
needs creating but can't beIOException
- if an IO error occurs during copyingpublic static void copyURLToFile(URL source, + File destination, + int connectionTimeout, + int readTimeout) + throws IOException+
source
to a file
+ destination
. The directories up to destination
+ will be created if they don't already exist. destination
+ will be overwritten if it already exists.source
- the URL
to copy bytes from, must not be null
destination
- the non-directory File
to write bytes to
+ (possibly overwriting), must not be null
connectionTimeout
- the number of milliseconds until this method
+ will timeout if no connection could be established to the source
readTimeout
- the number of milliseconds until this method will
+ timeout if no data could be read from the source
IOException
- if source
URL cannot be openedIOException
- if destination
is a directoryIOException
- if destination
cannot be writtenIOException
- if destination
needs creating but can't beIOException
- if an IO error occurs during copyingpublic static void copyInputStreamToFile(InputStream source, + File destination) + throws IOException+
InputStream
source
to a file
+ destination
. The directories up to destination
+ will be created if they don't already exist. destination
+ will be overwritten if it already exists.
+ The source
stream is closed.
+ See copyToFile(InputStream, File)
for a method that does not close the input stream.source
- the InputStream
to copy bytes from, must not be null
, will be closeddestination
- the non-directory File
to write bytes to
+ (possibly overwriting), must not be null
IOException
- if destination
is a directoryIOException
- if destination
cannot be writtenIOException
- if destination
needs creating but can't beIOException
- if an IO error occurs during copyingpublic static void copyToFile(InputStream source, + File destination) + throws IOException+
InputStream
source
to a file
+ destination
. The directories up to destination
+ will be created if they don't already exist. destination
+ will be overwritten if it already exists.
+ The source
stream is left open, e.g. for use with ZipInputStream
.
+ See copyInputStreamToFile(InputStream, File)
for a method that closes the input stream.source
- the InputStream
to copy bytes from, must not be null
destination
- the non-directory File
to write bytes to
+ (possibly overwriting), must not be null
IOException
- if destination
is a directoryIOException
- if destination
cannot be writtenIOException
- if destination
needs creating but can't beIOException
- if an IO error occurs during copyingpublic static void deleteDirectory(File directory) + throws IOException+
directory
- directory to deleteIOException
- in case deletion is unsuccessfulIllegalArgumentException
- if directory
does not exist or is not a directorypublic static boolean deleteQuietly(File file)+
+ The difference between File.delete() and this method are: +
file
- file or directory to delete, can be null
true
if the file or directory was deleted, otherwise
+ false
public static boolean directoryContains(File directory, + File child) + throws IOException+
parent
directory contains the child
element (a file or directory).
+ + Files are normalized before comparison. +
+ + Edge cases: +directory
must not be null: if null, throw IllegalArgumentExceptiondirectory
must be a directory: if not a directory, throw IllegalArgumentExceptiondirectory
- the file to consider as the parent.child
- the file to consider as the child.IOException
- if an IO error occurs while checking the files.IllegalArgumentException
- if directory
is null or not a directory.FilenameUtils.directoryContains(String, String)
public static void cleanDirectory(File directory) + throws IOException+
directory
- directory to cleanIOException
- in case cleaning is unsuccessfulIllegalArgumentException
- if directory
does not exist or is not a directorypublic static boolean waitFor(File file, + int seconds)+
+ This method repeatedly tests File.exists()
until it returns
+ true up to the maximum time specified in seconds.
file
- the file to check, must not be null
seconds
- the maximum time in seconds to waitNullPointerException
- if the file is null
public static String readFileToString(File file, + Charset encoding) + throws IOException+
file
- the file to read, must not be null
encoding
- the encoding to use, null
means platform defaultnull
IOException
- in case of an I/O errorpublic static String readFileToString(File file, + String encoding) + throws IOException+
file
- the file to read, must not be null
encoding
- the encoding to use, null
means platform defaultnull
IOException
- in case of an I/O errorUnsupportedCharsetException
- thrown instead of .UnsupportedEncodingException
in version 2.2 if the encoding is not supported.@Deprecated +public static String readFileToString(File file) + throws IOException+
readFileToString(File, Charset)
insteadfile
- the file to read, must not be null
null
IOException
- in case of an I/O errorpublic static byte[] readFileToByteArray(File file) + throws IOException+
file
- the file to read, must not be null
null
IOException
- in case of an I/O errorpublic static List<String> readLines(File file, + Charset encoding) + throws IOException+
file
- the file to read, must not be null
encoding
- the encoding to use, null
means platform defaultnull
IOException
- in case of an I/O errorpublic static List<String> readLines(File file, + String encoding) + throws IOException+
file
- the file to read, must not be null
encoding
- the encoding to use, null
means platform defaultnull
IOException
- in case of an I/O errorUnsupportedCharsetException
- thrown instead of .UnsupportedEncodingException
in version 2.2 if the encoding is not supported.@Deprecated +public static List<String> readLines(File file) + throws IOException+
readLines(File, Charset)
insteadfile
- the file to read, must not be null
null
IOException
- in case of an I/O errorpublic static LineIterator lineIterator(File file, + String encoding) + throws IOException+
File
.
+
+ This method opens an InputStream
for the file.
+ When you have finished with the iterator you should close the stream
+ to free internal resources. This can be done by calling the
+ LineIterator.close()
or
+ LineIterator.closeQuietly(LineIterator)
method.
+
+ The recommended usage pattern is: +
+ LineIterator it = FileUtils.lineIterator(file, "UTF-8"); + try { + while (it.hasNext()) { + String line = it.nextLine(); + /// do something with line + } + } finally { + LineIterator.closeQuietly(iterator); + } ++
+ If an exception occurs during the creation of the iterator, the + underlying stream is closed.
file
- the file to open for input, must not be null
encoding
- the encoding to use, null
means platform defaultnull
IOException
- in case of an I/O error (file closed)public static LineIterator lineIterator(File file) + throws IOException+
File
using the default encoding for the VM.file
- the file to open for input, must not be null
null
IOException
- in case of an I/O error (file closed)lineIterator(File, String)
public static void writeStringToFile(File file, + String data, + Charset encoding) + throws IOException+
+ NOTE: As from v1.3, the parent directories of the file will be created + if they do not exist.
file
- the file to writedata
- the content to write to the fileencoding
- the encoding to use, null
means platform defaultIOException
- in case of an I/O errorUnsupportedEncodingException
- if the encoding is not supported by the VMpublic static void writeStringToFile(File file, + String data, + String encoding) + throws IOException+
+ NOTE: As from v1.3, the parent directories of the file will be created + if they do not exist.
file
- the file to writedata
- the content to write to the fileencoding
- the encoding to use, null
means platform defaultIOException
- in case of an I/O errorUnsupportedEncodingException
- if the encoding is not supported by the VMpublic static void writeStringToFile(File file, + String data, + Charset encoding, + boolean append) + throws IOException+
file
- the file to writedata
- the content to write to the fileencoding
- the encoding to use, null
means platform defaultappend
- if true
, then the String will be added to the
+ end of the file rather than overwritingIOException
- in case of an I/O errorpublic static void writeStringToFile(File file, + String data, + String encoding, + boolean append) + throws IOException+
file
- the file to writedata
- the content to write to the fileencoding
- the encoding to use, null
means platform defaultappend
- if true
, then the String will be added to the
+ end of the file rather than overwritingIOException
- in case of an I/O errorUnsupportedCharsetException
- thrown instead of .UnsupportedEncodingException
in version 2.2 if the encoding is not supported by the VM@Deprecated +public static void writeStringToFile(File file, + String data) + throws IOException+
writeStringToFile(File, String, Charset)
insteadfile
- the file to writedata
- the content to write to the fileIOException
- in case of an I/O error@Deprecated +public static void writeStringToFile(File file, + String data, + boolean append) + throws IOException+
writeStringToFile(File, String, Charset, boolean)
insteadfile
- the file to writedata
- the content to write to the fileappend
- if true
, then the String will be added to the
+ end of the file rather than overwritingIOException
- in case of an I/O error@Deprecated +public static void write(File file, + CharSequence data) + throws IOException+
write(File, CharSequence, Charset)
insteadfile
- the file to writedata
- the content to write to the fileIOException
- in case of an I/O error@Deprecated +public static void write(File file, + CharSequence data, + boolean append) + throws IOException+
write(File, CharSequence, Charset, boolean)
insteadfile
- the file to writedata
- the content to write to the fileappend
- if true
, then the data will be added to the
+ end of the file rather than overwritingIOException
- in case of an I/O errorpublic static void write(File file, + CharSequence data, + Charset encoding) + throws IOException+
file
- the file to writedata
- the content to write to the fileencoding
- the encoding to use, null
means platform defaultIOException
- in case of an I/O errorpublic static void write(File file, + CharSequence data, + String encoding) + throws IOException+
file
- the file to writedata
- the content to write to the fileencoding
- the encoding to use, null
means platform defaultIOException
- in case of an I/O errorUnsupportedEncodingException
- if the encoding is not supported by the VMpublic static void write(File file, + CharSequence data, + Charset encoding, + boolean append) + throws IOException+
file
- the file to writedata
- the content to write to the fileencoding
- the encoding to use, null
means platform defaultappend
- if true
, then the data will be added to the
+ end of the file rather than overwritingIOException
- in case of an I/O errorpublic static void write(File file, + CharSequence data, + String encoding, + boolean append) + throws IOException+
file
- the file to writedata
- the content to write to the fileencoding
- the encoding to use, null
means platform defaultappend
- if true
, then the data will be added to the
+ end of the file rather than overwritingIOException
- in case of an I/O errorUnsupportedCharsetException
- thrown instead of .UnsupportedEncodingException
in version 2.2 if the encoding is not supported by the VMpublic static void writeByteArrayToFile(File file, + byte[] data) + throws IOException+
+ NOTE: As from v1.3, the parent directories of the file will be created + if they do not exist.
file
- the file to write todata
- the content to write to the fileIOException
- in case of an I/O errorpublic static void writeByteArrayToFile(File file, + byte[] data, + boolean append) + throws IOException+
file
- the file to write todata
- the content to write to the fileappend
- if true
, then bytes will be added to the
+ end of the file rather than overwritingIOException
- in case of an I/O errorpublic static void writeByteArrayToFile(File file, + byte[] data, + int off, + int len) + throws IOException+
len
bytes from the specified byte array starting
+ at offset off
to a file, creating the file if it does
+ not exist.file
- the file to write todata
- the content to write to the fileoff
- the start offset in the datalen
- the number of bytes to writeIOException
- in case of an I/O errorpublic static void writeByteArrayToFile(File file, + byte[] data, + int off, + int len, + boolean append) + throws IOException+
len
bytes from the specified byte array starting
+ at offset off
to a file, creating the file if it does
+ not exist.file
- the file to write todata
- the content to write to the fileoff
- the start offset in the datalen
- the number of bytes to writeappend
- if true
, then bytes will be added to the
+ end of the file rather than overwritingIOException
- in case of an I/O errorpublic static void writeLines(File file, + String encoding, + Collection<?> lines) + throws IOException+
toString()
value of each item in a collection to
+ the specified File
line by line.
+ The specified character encoding and the default line ending will be used.
+ + NOTE: As from v1.3, the parent directories of the file will be created + if they do not exist.
file
- the file to write toencoding
- the encoding to use, null
means platform defaultlines
- the lines to write, null
entries produce blank linesIOException
- in case of an I/O errorUnsupportedEncodingException
- if the encoding is not supported by the VMpublic static void writeLines(File file, + String encoding, + Collection<?> lines, + boolean append) + throws IOException+
toString()
value of each item in a collection to
+ the specified File
line by line, optionally appending.
+ The specified character encoding and the default line ending will be used.file
- the file to write toencoding
- the encoding to use, null
means platform defaultlines
- the lines to write, null
entries produce blank linesappend
- if true
, then the lines will be added to the
+ end of the file rather than overwritingIOException
- in case of an I/O errorUnsupportedEncodingException
- if the encoding is not supported by the VMpublic static void writeLines(File file, + Collection<?> lines) + throws IOException+
toString()
value of each item in a collection to
+ the specified File
line by line.
+ The default VM encoding and the default line ending will be used.file
- the file to write tolines
- the lines to write, null
entries produce blank linesIOException
- in case of an I/O errorpublic static void writeLines(File file, + Collection<?> lines, + boolean append) + throws IOException+
toString()
value of each item in a collection to
+ the specified File
line by line.
+ The default VM encoding and the default line ending will be used.file
- the file to write tolines
- the lines to write, null
entries produce blank linesappend
- if true
, then the lines will be added to the
+ end of the file rather than overwritingIOException
- in case of an I/O errorpublic static void writeLines(File file, + String encoding, + Collection<?> lines, + String lineEnding) + throws IOException+
toString()
value of each item in a collection to
+ the specified File
line by line.
+ The specified character encoding and the line ending will be used.
+ + NOTE: As from v1.3, the parent directories of the file will be created + if they do not exist.
file
- the file to write toencoding
- the encoding to use, null
means platform defaultlines
- the lines to write, null
entries produce blank lineslineEnding
- the line separator to use, null
is system defaultIOException
- in case of an I/O errorUnsupportedEncodingException
- if the encoding is not supported by the VMpublic static void writeLines(File file, + String encoding, + Collection<?> lines, + String lineEnding, + boolean append) + throws IOException+
toString()
value of each item in a collection to
+ the specified File
line by line.
+ The specified character encoding and the line ending will be used.file
- the file to write toencoding
- the encoding to use, null
means platform defaultlines
- the lines to write, null
entries produce blank lineslineEnding
- the line separator to use, null
is system defaultappend
- if true
, then the lines will be added to the
+ end of the file rather than overwritingIOException
- in case of an I/O errorUnsupportedEncodingException
- if the encoding is not supported by the VMpublic static void writeLines(File file, + Collection<?> lines, + String lineEnding) + throws IOException+
toString()
value of each item in a collection to
+ the specified File
line by line.
+ The default VM encoding and the specified line ending will be used.file
- the file to write tolines
- the lines to write, null
entries produce blank lineslineEnding
- the line separator to use, null
is system defaultIOException
- in case of an I/O errorpublic static void writeLines(File file, + Collection<?> lines, + String lineEnding, + boolean append) + throws IOException+
toString()
value of each item in a collection to
+ the specified File
line by line.
+ The default VM encoding and the specified line ending will be used.file
- the file to write tolines
- the lines to write, null
entries produce blank lineslineEnding
- the line separator to use, null
is system defaultappend
- if true
, then the lines will be added to the
+ end of the file rather than overwritingIOException
- in case of an I/O errorpublic static void forceDelete(File file) + throws IOException+
+ The difference between File.delete() and this method are: +
file
- file or directory to delete, must not be null
NullPointerException
- if the directory is null
FileNotFoundException
- if the file was not foundIOException
- in case deletion is unsuccessfulpublic static void forceDeleteOnExit(File file) + throws IOException+
file
- file or directory to delete, must not be null
NullPointerException
- if the file is null
IOException
- in case deletion is unsuccessfulpublic static void forceMkdir(File directory) + throws IOException+
directory
- directory to create, must not be null
NullPointerException
- if the directory is null
IOException
- if the directory cannot be created or the file already exists but is not a directorypublic static void forceMkdirParent(File file) + throws IOException+
file
- file with parent to create, must not be null
NullPointerException
- if the file is null
IOException
- if the parent directory cannot be createdpublic static long sizeOf(File file)+
File
is a regular file, then the file's length is returned.
+ If the argument is a directory, then the size of the directory is
+ calculated recursively. If a directory or subdirectory is security
+ restricted, its size will not be included.
+
+ Note that overflow is not detected, and the return value may be negative if
+ overflow occurs. See sizeOfAsBigInteger(File)
for an alternative
+ method that does not overflow.
file
- the regular file or directory to return the size
+ of (must not be null
).NullPointerException
- if the file is null
IllegalArgumentException
- if the file does not exist.public static BigInteger sizeOfAsBigInteger(File file)+
File
is a regular file, then the file's length is returned.
+ If the argument is a directory, then the size of the directory is
+ calculated recursively. If a directory or subdirectory is security
+ restricted, its size will not be included.file
- the regular file or directory to return the size
+ of (must not be null
).NullPointerException
- if the file is null
IllegalArgumentException
- if the file does not exist.public static long sizeOfDirectory(File directory)+
+ Note that overflow is not detected, and the return value may be negative if
+ overflow occurs. See sizeOfDirectoryAsBigInteger(File)
for an alternative
+ method that does not overflow.
directory
- directory to inspect, must not be null
Long.MAX_VALUE
.NullPointerException
- if the directory is null
public static BigInteger sizeOfDirectoryAsBigInteger(File directory)+
directory
- directory to inspect, must not be null
NullPointerException
- if the directory is null
public static boolean isFileNewer(File file, + File reference)+
File
is newer than the reference
+ File
.file
- the File
of which the modification date must
+ be compared, must not be null
reference
- the File
of which the modification date
+ is used, must not be null
File
exists and has been modified more
+ recently than the reference File
IllegalArgumentException
- if the file is null
IllegalArgumentException
- if the reference file is null
or doesn't existpublic static boolean isFileNewer(File file, + Date date)+
File
is newer than the specified
+ Date
.file
- the File
of which the modification date
+ must be compared, must not be null
date
- the date reference, must not be null
File
exists and has been modified
+ after the given Date
.IllegalArgumentException
- if the file is null
IllegalArgumentException
- if the date is null
public static boolean isFileNewer(File file, + long timeMillis)+
File
is newer than the specified
+ time reference.file
- the File
of which the modification date must
+ be compared, must not be null
timeMillis
- the time reference measured in milliseconds since the
+ epoch (00:00:00 GMT, January 1, 1970)File
exists and has been modified after
+ the given time reference.IllegalArgumentException
- if the file is null
public static boolean isFileOlder(File file, + File reference)+
File
is older than the reference
+ File
.file
- the File
of which the modification date must
+ be compared, must not be null
reference
- the File
of which the modification date
+ is used, must not be null
File
exists and has been modified before
+ the reference File
IllegalArgumentException
- if the file is null
IllegalArgumentException
- if the reference file is null
or doesn't existpublic static boolean isFileOlder(File file, + Date date)+
File
is older than the specified
+ Date
.file
- the File
of which the modification date
+ must be compared, must not be null
date
- the date reference, must not be null
File
exists and has been modified
+ before the given Date
.IllegalArgumentException
- if the file is null
IllegalArgumentException
- if the date is null
public static boolean isFileOlder(File file, + long timeMillis)+
File
is older than the specified
+ time reference.file
- the File
of which the modification date must
+ be compared, must not be null
timeMillis
- the time reference measured in milliseconds since the
+ epoch (00:00:00 GMT, January 1, 1970)File
exists and has been modified before
+ the given time reference.IllegalArgumentException
- if the file is null
public static long checksumCRC32(File file) + throws IOException+
file
- the file to checksum, must not be null
NullPointerException
- if the file or checksum is null
IllegalArgumentException
- if the file is a directoryIOException
- if an IO error occurs reading the filepublic static Checksum checksum(File file, + Checksum checksum) + throws IOException+
Checksum
instance
+ if desired simply by reusing the same checksum object.
+ For example:
+ + long csum = FileUtils.checksum(file, new CRC32()).getValue(); +
file
- the file to checksum, must not be null
checksum
- the checksum object to be used, must not be null
NullPointerException
- if the file or checksum is null
IllegalArgumentException
- if the file is a directoryIOException
- if an IO error occurs reading the filepublic static void moveDirectory(File srcDir, + File destDir) + throws IOException+
+ When the destination directory is on another file system, do a "copy and delete".
srcDir
- the directory to be moveddestDir
- the destination directoryNullPointerException
- if source or destination is null
FileExistsException
- if the destination directory existsIOException
- if source or destination is invalidIOException
- if an IO error occurs moving the filepublic static void moveDirectoryToDirectory(File src, + File destDir, + boolean createDestDir) + throws IOException+
src
- the file to be moveddestDir
- the destination filecreateDestDir
- If true
create the destination directory,
+ otherwise if false
throw an IOExceptionNullPointerException
- if source or destination is null
FileExistsException
- if the directory exists in the destination directoryIOException
- if source or destination is invalidIOException
- if an IO error occurs moving the filepublic static void moveFile(File srcFile, + File destFile) + throws IOException+
+ When the destination file is on another file system, do a "copy and delete".
srcFile
- the file to be moveddestFile
- the destination fileNullPointerException
- if source or destination is null
FileExistsException
- if the destination file existsIOException
- if source or destination is invalidIOException
- if an IO error occurs moving the filepublic static void moveFileToDirectory(File srcFile, + File destDir, + boolean createDestDir) + throws IOException+
srcFile
- the file to be moveddestDir
- the destination filecreateDestDir
- If true
create the destination directory,
+ otherwise if false
throw an IOExceptionNullPointerException
- if source or destination is null
FileExistsException
- if the destination file existsIOException
- if source or destination is invalidIOException
- if an IO error occurs moving the filepublic static void moveToDirectory(File src, + File destDir, + boolean createDestDir) + throws IOException+
+ When the destination is on another file system, do a "copy and delete".
src
- the file or directory to be moveddestDir
- the destination directorycreateDestDir
- If true
create the destination directory,
+ otherwise if false
throw an IOExceptionNullPointerException
- if source or destination is null
FileExistsException
- if the directory or file exists in the destination directoryIOException
- if source or destination is invalidIOException
- if an IO error occurs moving the filepublic static boolean isSymlink(File file) + throws IOException+
+ Will not return true if there is a Symbolic Link anywhere in the path, + only if the specific file is. +
+ When using jdk1.7, this method delegates to boolean java.nio.file.Files.isSymbolicLink(Path path)
+
+ Note: the current implementation always returns false
if running on
+ jkd1.6 and the system is detected as Windows using FilenameUtils.isSystemWindows()
+
+ For code that runs on Java 1.7 or later, use the following method instead:
+
+ boolean java.nio.file.Files.isSymbolicLink(Path path)
file
- the file to checkIOException
- if an IO error occurs while checking the fileCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/FilenameUtils.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/FilenameUtils.html new file mode 100644 index 0000000..fec6b6e --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/FilenameUtils.html @@ -0,0 +1,1432 @@ + + + + + +public class FilenameUtils +extends Object+
+ When dealing with filenames you can hit problems when moving from a Windows + based development machine to a Unix based production machine. + This class aims to help avoid those problems. +
+ NOTE: You may be able to avoid using this class entirely simply by
+ using JDK File
objects and the two argument constructor
+ File(File,String)
.
+
+ Most methods on this class are designed to work the same on both Unix and Windows. + Those that don't include 'System', 'Unix' or 'Windows' in their name. +
+ Most methods recognise both separators (forward and back), and both + sets of prefixes. See the javadoc of each method for details. +
+ This class defines six components within a filename + (example C:\dev\project\file.txt): +
+ This class only supports Unix and Windows style names. + Prefixes are matched as follows: +
+ Windows: + a\b\c.txt --> "" --> relative + \a\b\c.txt --> "\" --> current drive absolute + C:a\b\c.txt --> "C:" --> drive relative + C:\a\b\c.txt --> "C:\" --> absolute + \\server\a\b\c.txt --> "\\server\" --> UNC + + Unix: + a/b/c.txt --> "" --> relative + /a/b/c.txt --> "/" --> absolute + ~/a/b/c.txt --> "~/" --> current user + ~ --> "~/" --> current user (slash added) + ~user/a/b/c.txt --> "~user/" --> named user + ~user --> "~user/" --> named user (slash added) ++ Both prefix styles are matched always, irrespective of the machine that you are + currently running on. +
+ Origin of code: Excalibur, Alexandria, Tomcat, Commons-Utils.
Modifier and Type | +Field and Description | +
---|---|
static char |
+EXTENSION_SEPARATOR
+The extension separator character.
+ |
+
static String |
+EXTENSION_SEPARATOR_STR
+The extension separator String.
+ |
+
Constructor and Description | +
---|
FilenameUtils()
+Instances should NOT be constructed in standard programming.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static String |
+concat(String basePath,
+ String fullFilenameToAdd)
+Concatenates a filename to a base path using normal command line style rules.
+ |
+
static boolean |
+directoryContains(String canonicalParent,
+ String canonicalChild)
+Determines whether the
+parent directory contains the child element (a file or directory). |
+
static boolean |
+equals(String filename1,
+ String filename2)
+Checks whether two filenames are equal exactly.
+ |
+
static boolean |
+equals(String filename1,
+ String filename2,
+ boolean normalized,
+ IOCase caseSensitivity)
+Checks whether two filenames are equal, optionally normalizing and providing
+ control over the case-sensitivity.
+ |
+
static boolean |
+equalsNormalized(String filename1,
+ String filename2)
+Checks whether two filenames are equal after both have been normalized.
+ |
+
static boolean |
+equalsNormalizedOnSystem(String filename1,
+ String filename2)
+Checks whether two filenames are equal after both have been normalized
+ and using the case rules of the system.
+ |
+
static boolean |
+equalsOnSystem(String filename1,
+ String filename2)
+Checks whether two filenames are equal using the case rules of the system.
+ |
+
static String |
+getBaseName(String filename)
+Gets the base name, minus the full path and extension, from a full filename.
+ |
+
static String |
+getExtension(String filename)
+Gets the extension of a filename.
+ |
+
static String |
+getFullPath(String filename)
+Gets the full path from a full filename, which is the prefix + path.
+ |
+
static String |
+getFullPathNoEndSeparator(String filename)
+Gets the full path from a full filename, which is the prefix + path,
+ and also excluding the final directory separator.
+ |
+
static String |
+getName(String filename)
+Gets the name minus the path from a full filename.
+ |
+
static String |
+getPath(String filename)
+Gets the path from a full filename, which excludes the prefix.
+ |
+
static String |
+getPathNoEndSeparator(String filename)
+Gets the path from a full filename, which excludes the prefix, and
+ also excluding the final directory separator.
+ |
+
static String |
+getPrefix(String filename)
+Gets the prefix from a full filename, such as
+C:/
+ or ~/ . |
+
static int |
+getPrefixLength(String filename)
+Returns the length of the filename prefix, such as
+C:/ or ~/ . |
+
static int |
+indexOfExtension(String filename)
+Returns the index of the last extension separator character, which is a dot.
+ |
+
static int |
+indexOfLastSeparator(String filename)
+Returns the index of the last directory separator character.
+ |
+
static boolean |
+isExtension(String filename,
+ Collection<String> extensions)
+Checks whether the extension of the filename is one of those specified.
+ |
+
static boolean |
+isExtension(String filename,
+ String extension)
+Checks whether the extension of the filename is that specified.
+ |
+
static boolean |
+isExtension(String filename,
+ String[] extensions)
+Checks whether the extension of the filename is one of those specified.
+ |
+
static String |
+normalize(String filename)
+Normalizes a path, removing double and single dot path steps.
+ |
+
static String |
+normalize(String filename,
+ boolean unixSeparator)
+Normalizes a path, removing double and single dot path steps.
+ |
+
static String |
+normalizeNoEndSeparator(String filename)
+Normalizes a path, removing double and single dot path steps,
+ and removing any final directory separator.
+ |
+
static String |
+normalizeNoEndSeparator(String filename,
+ boolean unixSeparator)
+Normalizes a path, removing double and single dot path steps,
+ and removing any final directory separator.
+ |
+
static String |
+removeExtension(String filename)
+Removes the extension from a filename.
+ |
+
static String |
+separatorsToSystem(String path)
+Converts all separators to the system separator.
+ |
+
static String |
+separatorsToUnix(String path)
+Converts all separators to the Unix separator of forward slash.
+ |
+
static String |
+separatorsToWindows(String path)
+Converts all separators to the Windows separator of backslash.
+ |
+
static boolean |
+wildcardMatch(String filename,
+ String wildcardMatcher)
+Checks a filename to see if it matches the specified wildcard matcher,
+ always testing case-sensitive.
+ |
+
static boolean |
+wildcardMatch(String filename,
+ String wildcardMatcher,
+ IOCase caseSensitivity)
+Checks a filename to see if it matches the specified wildcard matcher
+ allowing control over case-sensitivity.
+ |
+
static boolean |
+wildcardMatchOnSystem(String filename,
+ String wildcardMatcher)
+Checks a filename to see if it matches the specified wildcard matcher
+ using the case rules of the system.
+ |
+
public static final char EXTENSION_SEPARATOR+
public static final String EXTENSION_SEPARATOR_STR+
public FilenameUtils()+
public static String normalize(String filename)+
+ This method normalizes a path to a standard format. + The input may contain separators in either Unix or Windows format. + The output will contain separators in the format of the system. +
+ A trailing slash will be retained.
+ A double slash will be merged to a single slash (but UNC names are handled).
+ A single dot path segment will be removed.
+ A double dot will cause that path segment and the one before to be removed.
+ If the double dot has no parent path segment to work with, null
+ is returned.
+
+ The output will be the same on both Unix and Windows except + for the separator character. +
+ /foo// --> /foo/ + /foo/./ --> /foo/ + /foo/../bar --> /bar + /foo/../bar/ --> /bar/ + /foo/../bar/../baz --> /baz + //foo//./bar --> /foo/bar + /../ --> null + ../foo --> null + foo/bar/.. --> foo/ + foo/../../bar --> null + foo/../bar --> bar + //server/foo/../bar --> //server/bar + //server/../bar --> null + C:\foo\..\bar --> C:\bar + C:\..\bar --> null + ~/foo/../bar/ --> ~/bar/ + ~/../bar --> null ++ (Note the file separator returned will be correct for Windows/Unix)
filename
- the filename to normalize, null returns nullpublic static String normalize(String filename, + boolean unixSeparator)+
+ This method normalizes a path to a standard format. + The input may contain separators in either Unix or Windows format. + The output will contain separators in the format specified. +
+ A trailing slash will be retained.
+ A double slash will be merged to a single slash (but UNC names are handled).
+ A single dot path segment will be removed.
+ A double dot will cause that path segment and the one before to be removed.
+ If the double dot has no parent path segment to work with, null
+ is returned.
+
+ The output will be the same on both Unix and Windows except + for the separator character. +
+ /foo// --> /foo/ + /foo/./ --> /foo/ + /foo/../bar --> /bar + /foo/../bar/ --> /bar/ + /foo/../bar/../baz --> /baz + //foo//./bar --> /foo/bar + /../ --> null + ../foo --> null + foo/bar/.. --> foo/ + foo/../../bar --> null + foo/../bar --> bar + //server/foo/../bar --> //server/bar + //server/../bar --> null + C:\foo\..\bar --> C:\bar + C:\..\bar --> null + ~/foo/../bar/ --> ~/bar/ + ~/../bar --> null ++ The output will be the same on both Unix and Windows including + the separator character.
filename
- the filename to normalize, null returns nullunixSeparator
- true
if a unix separator should
+ be used or false
if a windows separator should be used.public static String normalizeNoEndSeparator(String filename)+
+ This method normalizes a path to a standard format. + The input may contain separators in either Unix or Windows format. + The output will contain separators in the format of the system. +
+ A trailing slash will be removed.
+ A double slash will be merged to a single slash (but UNC names are handled).
+ A single dot path segment will be removed.
+ A double dot will cause that path segment and the one before to be removed.
+ If the double dot has no parent path segment to work with, null
+ is returned.
+
+ The output will be the same on both Unix and Windows except + for the separator character. +
+ /foo// --> /foo + /foo/./ --> /foo + /foo/../bar --> /bar + /foo/../bar/ --> /bar + /foo/../bar/../baz --> /baz + //foo//./bar --> /foo/bar + /../ --> null + ../foo --> null + foo/bar/.. --> foo + foo/../../bar --> null + foo/../bar --> bar + //server/foo/../bar --> //server/bar + //server/../bar --> null + C:\foo\..\bar --> C:\bar + C:\..\bar --> null + ~/foo/../bar/ --> ~/bar + ~/../bar --> null ++ (Note the file separator returned will be correct for Windows/Unix)
filename
- the filename to normalize, null returns nullpublic static String normalizeNoEndSeparator(String filename, + boolean unixSeparator)+
+ This method normalizes a path to a standard format. + The input may contain separators in either Unix or Windows format. + The output will contain separators in the format specified. +
+ A trailing slash will be removed.
+ A double slash will be merged to a single slash (but UNC names are handled).
+ A single dot path segment will be removed.
+ A double dot will cause that path segment and the one before to be removed.
+ If the double dot has no parent path segment to work with, null
+ is returned.
+
+ The output will be the same on both Unix and Windows including + the separator character. +
+ /foo// --> /foo + /foo/./ --> /foo + /foo/../bar --> /bar + /foo/../bar/ --> /bar + /foo/../bar/../baz --> /baz + //foo//./bar --> /foo/bar + /../ --> null + ../foo --> null + foo/bar/.. --> foo + foo/../../bar --> null + foo/../bar --> bar + //server/foo/../bar --> //server/bar + //server/../bar --> null + C:\foo\..\bar --> C:\bar + C:\..\bar --> null + ~/foo/../bar/ --> ~/bar + ~/../bar --> null +
filename
- the filename to normalize, null returns nullunixSeparator
- true
if a unix separator should
+ be used or false
if a windows separtor should be used.public static String concat(String basePath, + String fullFilenameToAdd)+
+ The effect is equivalent to resultant directory after changing + directory to the first argument, followed by changing directory to + the second argument. +
+ The first argument is the base path, the second is the path to concatenate.
+ The returned path is always normalized via normalize(String)
,
+ thus ..
is handled.
+
+ If pathToAdd
is absolute (has an absolute prefix), then
+ it will be normalized and returned.
+ Otherwise, the paths will be joined, normalized and returned.
+
+ The output will be the same on both Unix and Windows except + for the separator character. +
+ /foo/ + bar --> /foo/bar + /foo + bar --> /foo/bar + /foo + /bar --> /bar + /foo + C:/bar --> C:/bar + /foo + C:bar --> C:bar (*) + /foo/a/ + ../bar --> foo/bar + /foo/ + ../../bar --> null + /foo/ + /bar --> /bar + /foo/.. + /bar --> /bar + /foo + bar/c.txt --> /foo/bar/c.txt + /foo/c.txt + bar --> /foo/c.txt/bar (!) ++ (*) Note that the Windows relative drive prefix is unreliable when + used with this method. + (!) Note that the first parameter must be a path. If it ends with a name, then + the name will be built into the concatenated path. If this might be a problem, + use
getFullPath(String)
on the base path argument.basePath
- the base path to attach to, always treated as a pathfullFilenameToAdd
- the filename (or path) to attach to the basepublic static boolean directoryContains(String canonicalParent, + String canonicalChild) + throws IOException+
parent
directory contains the child
element (a file or directory).
+ + The files names are expected to be normalized. +
+ + Edge cases: +directory
must not be null: if null, throw IllegalArgumentExceptioncanonicalParent
- the file to consider as the parent.canonicalChild
- the file to consider as the child.IOException
- if an IO error occurs while checking the files.FileUtils.directoryContains(File, File)
public static String separatorsToUnix(String path)+
path
- the path to be changed, null ignoredpublic static String separatorsToWindows(String path)+
path
- the path to be changed, null ignoredpublic static String separatorsToSystem(String path)+
path
- the path to be changed, null ignoredpublic static int getPrefixLength(String filename)+
C:/
or ~/
.
+ + This method will handle a file in either Unix or Windows format. +
+ The prefix length includes the first slash in the full filename + if applicable. Thus, it is possible that the length returned is greater + than the length of the input string. +
+ Windows: + a\b\c.txt --> "" --> relative + \a\b\c.txt --> "\" --> current drive absolute + C:a\b\c.txt --> "C:" --> drive relative + C:\a\b\c.txt --> "C:\" --> absolute + \\server\a\b\c.txt --> "\\server\" --> UNC + \\\a\b\c.txt --> error, length = -1 + + Unix: + a/b/c.txt --> "" --> relative + /a/b/c.txt --> "/" --> absolute + ~/a/b/c.txt --> "~/" --> current user + ~ --> "~/" --> current user (slash added) + ~user/a/b/c.txt --> "~user/" --> named user + ~user --> "~user/" --> named user (slash added) + //server/a/b/c.txt --> "//server/" + ///a/b/c.txt --> error, length = -1 ++
+ The output will be the same irrespective of the machine that the code is running on. + ie. both Unix and Windows prefixes are matched regardless. + + Note that a leading // (or \\) is used to indicate a UNC name on Windows. + These must be followed by a server name, so double-slashes are not collapsed + to a single slash at the start of the filename.
filename
- the filename to find the prefix in, null returns -1public static int indexOfLastSeparator(String filename)+
+ This method will handle a file in either Unix or Windows format. + The position of the last forward or backslash is returned. +
+ The output will be the same irrespective of the machine that the code is running on.
filename
- the filename to find the last path separator in, null returns -1public static int indexOfExtension(String filename)+
+ This method also checks that there is no directory separator after the last dot. To do this it uses
+ indexOfLastSeparator(String)
which will handle a file in either Unix or Windows format.
+
+ The output will be the same irrespective of the machine that the code is running on. +
filename
- the filename to find the last extension separator in, null returns -1public static String getPrefix(String filename)+
C:/
+ or ~/
.
+ + This method will handle a file in either Unix or Windows format. + The prefix includes the first slash in the full filename where applicable. +
+ Windows: + a\b\c.txt --> "" --> relative + \a\b\c.txt --> "\" --> current drive absolute + C:a\b\c.txt --> "C:" --> drive relative + C:\a\b\c.txt --> "C:\" --> absolute + \\server\a\b\c.txt --> "\\server\" --> UNC + + Unix: + a/b/c.txt --> "" --> relative + /a/b/c.txt --> "/" --> absolute + ~/a/b/c.txt --> "~/" --> current user + ~ --> "~/" --> current user (slash added) + ~user/a/b/c.txt --> "~user/" --> named user + ~user --> "~user/" --> named user (slash added) ++
+ The output will be the same irrespective of the machine that the code is running on. + ie. both Unix and Windows prefixes are matched regardless.
filename
- the filename to query, null returns nullpublic static String getPath(String filename)+
+ This method will handle a file in either Unix or Windows format. + The method is entirely text based, and returns the text before and + including the last forward or backslash. +
+ C:\a\b\c.txt --> a\b\ + ~/a/b/c.txt --> a/b/ + a.txt --> "" + a/b/c --> a/b/ + a/b/c/ --> a/b/c/ ++
+ The output will be the same irrespective of the machine that the code is running on. +
+ This method drops the prefix from the result.
+ See getFullPath(String)
for the method that retains the prefix.
filename
- the filename to query, null returns nullpublic static String getPathNoEndSeparator(String filename)+
+ This method will handle a file in either Unix or Windows format. + The method is entirely text based, and returns the text before the + last forward or backslash. +
+ C:\a\b\c.txt --> a\b + ~/a/b/c.txt --> a/b + a.txt --> "" + a/b/c --> a/b + a/b/c/ --> a/b/c ++
+ The output will be the same irrespective of the machine that the code is running on. +
+ This method drops the prefix from the result.
+ See getFullPathNoEndSeparator(String)
for the method that retains the prefix.
filename
- the filename to query, null returns nullpublic static String getFullPath(String filename)+
+ This method will handle a file in either Unix or Windows format. + The method is entirely text based, and returns the text before and + including the last forward or backslash. +
+ C:\a\b\c.txt --> C:\a\b\ + ~/a/b/c.txt --> ~/a/b/ + a.txt --> "" + a/b/c --> a/b/ + a/b/c/ --> a/b/c/ + C: --> C: + C:\ --> C:\ + ~ --> ~/ + ~/ --> ~/ + ~user --> ~user/ + ~user/ --> ~user/ ++
+ The output will be the same irrespective of the machine that the code is running on.
filename
- the filename to query, null returns nullpublic static String getFullPathNoEndSeparator(String filename)+
+ This method will handle a file in either Unix or Windows format. + The method is entirely text based, and returns the text before the + last forward or backslash. +
+ C:\a\b\c.txt --> C:\a\b + ~/a/b/c.txt --> ~/a/b + a.txt --> "" + a/b/c --> a/b + a/b/c/ --> a/b/c + C: --> C: + C:\ --> C:\ + ~ --> ~ + ~/ --> ~ + ~user --> ~user + ~user/ --> ~user ++
+ The output will be the same irrespective of the machine that the code is running on.
filename
- the filename to query, null returns nullpublic static String getName(String filename)+
+ This method will handle a file in either Unix or Windows format. + The text after the last forward or backslash is returned. +
+ a/b/c.txt --> c.txt + a.txt --> a.txt + a/b/c --> c + a/b/c/ --> "" ++
+ The output will be the same irrespective of the machine that the code is running on.
filename
- the filename to query, null returns nullpublic static String getBaseName(String filename)+
+ This method will handle a file in either Unix or Windows format. + The text after the last forward or backslash and before the last dot is returned. +
+ a/b/c.txt --> c + a.txt --> a + a/b/c --> c + a/b/c/ --> "" ++
+ The output will be the same irrespective of the machine that the code is running on.
filename
- the filename to query, null returns nullpublic static String getExtension(String filename)+
+ This method returns the textual part of the filename after the last dot. + There must be no directory separator after the dot. +
+ foo.txt --> "txt" + a/b/c.jpg --> "jpg" + a/b.txt/c --> "" + a/b/c --> "" ++
+ The output will be the same irrespective of the machine that the code is running on.
filename
- the filename to retrieve the extension of.null
+ if the filename is null
.public static String removeExtension(String filename)+
+ This method returns the textual part of the filename before the last dot. + There must be no directory separator after the dot. +
+ foo.txt --> foo + a\b\c.jpg --> a\b\c + a\b\c --> a\b\c + a.b\c --> a.b\c ++
+ The output will be the same irrespective of the machine that the code is running on.
filename
- the filename to query, null returns nullpublic static boolean equals(String filename1, + String filename2)+
+ No processing is performed on the filenames other than comparison, + thus this is merely a null-safe case-sensitive equals.
filename1
- the first filename to query, may be nullfilename2
- the second filename to query, may be nullIOCase.SENSITIVE
public static boolean equalsOnSystem(String filename1, + String filename2)+
+ No processing is performed on the filenames other than comparison. + The check is case-sensitive on Unix and case-insensitive on Windows.
filename1
- the first filename to query, may be nullfilename2
- the second filename to query, may be nullIOCase.SYSTEM
public static boolean equalsNormalized(String filename1, + String filename2)+
+ Both filenames are first passed to normalize(String)
.
+ The check is then performed in a case-sensitive manner.
filename1
- the first filename to query, may be nullfilename2
- the second filename to query, may be nullIOCase.SENSITIVE
public static boolean equalsNormalizedOnSystem(String filename1, + String filename2)+
+ Both filenames are first passed to normalize(String)
.
+ The check is then performed case-sensitive on Unix and
+ case-insensitive on Windows.
filename1
- the first filename to query, may be nullfilename2
- the second filename to query, may be nullIOCase.SYSTEM
public static boolean equals(String filename1, + String filename2, + boolean normalized, + IOCase caseSensitivity)+
filename1
- the first filename to query, may be nullfilename2
- the second filename to query, may be nullnormalized
- whether to normalize the filenamescaseSensitivity
- what case sensitivity rule to use, null means case-sensitivepublic static boolean isExtension(String filename, + String extension)+
+ This method obtains the extension as the textual part of the filename + after the last dot. There must be no directory separator after the dot. + The extension check is case-sensitive on all platforms.
filename
- the filename to query, null returns falseextension
- the extension to check for, null or empty checks for no extensionIllegalArgumentException
- if the supplied filename contains null bytespublic static boolean isExtension(String filename, + String[] extensions)+
+ This method obtains the extension as the textual part of the filename + after the last dot. There must be no directory separator after the dot. + The extension check is case-sensitive on all platforms.
filename
- the filename to query, null returns falseextensions
- the extensions to check for, null checks for no extensionIllegalArgumentException
- if the supplied filename contains null bytespublic static boolean isExtension(String filename, + Collection<String> extensions)+
+ This method obtains the extension as the textual part of the filename + after the last dot. There must be no directory separator after the dot. + The extension check is case-sensitive on all platforms.
filename
- the filename to query, null returns falseextensions
- the extensions to check for, null checks for no extensionIllegalArgumentException
- if the supplied filename contains null bytespublic static boolean wildcardMatch(String filename, + String wildcardMatcher)+
+ The wildcard matcher uses the characters '?' and '*' to represent a + single or multiple (zero or more) wildcard characters. + This is the same as often found on Dos/Unix command lines. + The check is case-sensitive always. +
+ wildcardMatch("c.txt", "*.txt") --> true + wildcardMatch("c.txt", "*.jpg") --> false + wildcardMatch("a/b/c.txt", "a/b/*") --> true + wildcardMatch("c.txt", "*.???") --> true + wildcardMatch("c.txt", "*.????") --> false ++ N.B. the sequence "*?" does not work properly at present in match strings.
filename
- the filename to match onwildcardMatcher
- the wildcard string to match againstIOCase.SENSITIVE
public static boolean wildcardMatchOnSystem(String filename, + String wildcardMatcher)+
+ The wildcard matcher uses the characters '?' and '*' to represent a + single or multiple (zero or more) wildcard characters. + This is the same as often found on Dos/Unix command lines. + The check is case-sensitive on Unix and case-insensitive on Windows. +
+ wildcardMatch("c.txt", "*.txt") --> true + wildcardMatch("c.txt", "*.jpg") --> false + wildcardMatch("a/b/c.txt", "a/b/*") --> true + wildcardMatch("c.txt", "*.???") --> true + wildcardMatch("c.txt", "*.????") --> false ++ N.B. the sequence "*?" does not work properly at present in match strings.
filename
- the filename to match onwildcardMatcher
- the wildcard string to match againstIOCase.SYSTEM
public static boolean wildcardMatch(String filename, + String wildcardMatcher, + IOCase caseSensitivity)+
+ The wildcard matcher uses the characters '?' and '*' to represent a + single or multiple (zero or more) wildcard characters. + N.B. the sequence "*?" does not work properly at present in match strings.
filename
- the filename to match onwildcardMatcher
- the wildcard string to match againstcaseSensitivity
- what case sensitivity rule to use, null means case-sensitiveCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/HexDump.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/HexDump.html new file mode 100644 index 0000000..4a7f244 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/HexDump.html @@ -0,0 +1,340 @@ + + + + + +public class HexDump +extends Object+
+ Provides a single function to take an array of bytes and display it + in hexadecimal form. +
+ Origin of code: POI.
Modifier and Type | +Field and Description | +
---|---|
static String |
+EOL
+The line-separator (initializes to "line.separator" system property.
+ |
+
Constructor and Description | +
---|
HexDump()
+Instances should NOT be constructed in standard programming.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static void |
+dump(byte[] data,
+ long offset,
+ OutputStream stream,
+ int index)
+Dump an array of bytes to an OutputStream.
+ |
+
public static final String EOL+
public HexDump()+
public static void dump(byte[] data, + long offset, + OutputStream stream, + int index) + throws IOException, + ArrayIndexOutOfBoundsException, + IllegalArgumentException+
+ The offset argument specifies the start offset of the data array + within a larger entity like a file or an incoming stream. For example, + if the data array contains the third kibibyte of a file, then the + offset argument should be set to 2048. The offset value printed + at the beginning of each line indicates where in that larger entity + the first byte on that line is located. +
+ All bytes between the given index (inclusive) and the end of the + data array are dumped.
data
- the byte array to be dumpedoffset
- offset of the byte array within a larger entitystream
- the OutputStream to which the data is to be
+ writtenindex
- initial index into the byte arrayIOException
- is thrown if anything goes wrong writing
+ the data to streamArrayIndexOutOfBoundsException
- if the index is
+ outside the data array's boundsIllegalArgumentException
- if the output stream is nullCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/IOCase.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/IOCase.html new file mode 100644 index 0000000..8652709 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/IOCase.html @@ -0,0 +1,597 @@ + + + + + +public enum IOCase +extends Enum<IOCase> +implements Serializable+
+ Different filing systems have different rules for case-sensitivity. + Windows is case-insensitive, Unix is case-sensitive. +
+ This class captures that difference, providing an enumeration to + control how filename comparisons should be performed. It also provides + methods that use the enumeration to perform comparisons. +
+ Wherever possible, you should use the check
methods in this
+ class to compare filenames.
Enum Constant and Description | +
---|
INSENSITIVE
+The constant for case insensitive regardless of operating system.
+ |
+
SENSITIVE
+The constant for case sensitive regardless of operating system.
+ |
+
SYSTEM
+The constant for case sensitivity determined by the current operating system.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+checkCompareTo(String str1,
+ String str2)
+Compares two strings using the case-sensitivity rule.
+ |
+
boolean |
+checkEndsWith(String str,
+ String end)
+Checks if one string ends with another using the case-sensitivity rule.
+ |
+
boolean |
+checkEquals(String str1,
+ String str2)
+Compares two strings using the case-sensitivity rule.
+ |
+
int |
+checkIndexOf(String str,
+ int strStartIndex,
+ String search)
+Checks if one string contains another starting at a specific index using the
+ case-sensitivity rule.
+ |
+
boolean |
+checkRegionMatches(String str,
+ int strStartIndex,
+ String search)
+Checks if one string contains another at a specific index using the case-sensitivity rule.
+ |
+
boolean |
+checkStartsWith(String str,
+ String start)
+Checks if one string starts with another using the case-sensitivity rule.
+ |
+
static IOCase |
+forName(String name)
+Factory method to create an IOCase from a name.
+ |
+
String |
+getName()
+Gets the name of the constant.
+ |
+
boolean |
+isCaseSensitive()
+Does the object represent case sensitive comparison.
+ |
+
String |
+toString()
+Gets a string describing the sensitivity.
+ |
+
static IOCase |
+valueOf(String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static IOCase[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
public static final IOCase SENSITIVE+
public static final IOCase INSENSITIVE+
public static final IOCase SYSTEM+
+ Note: This only caters for Windows and Unix. Other operating
+ systems (e.g. OSX and OpenVMS) are treated as case sensitive if they use the
+ Unix file separator and case-insensitive if they use the Windows file separator
+ (see File.separatorChar
).
+
+ If you derialize this constant of Windows, and deserialize on Unix, or vice + versa, then the value of the case-sensitivity flag will change.
public static IOCase[] values()+
+for (IOCase c : IOCase.values()) + System.out.println(c); +
public static IOCase valueOf(String name)+
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static IOCase forName(String name)+
name
- the name to findIllegalArgumentException
- if the name is invalidpublic String getName()+
public boolean isCaseSensitive()+
public int checkCompareTo(String str1, + String str2)+
+ This method mimics String.compareTo(java.lang.String)
but takes case-sensitivity
+ into account.
str1
- the first string to compare, not nullstr2
- the second string to compare, not nullNullPointerException
- if either string is nullpublic boolean checkEquals(String str1, + String str2)+
+ This method mimics String.equals(java.lang.Object)
but takes case-sensitivity
+ into account.
str1
- the first string to compare, not nullstr2
- the second string to compare, not nullNullPointerException
- if either string is nullpublic boolean checkStartsWith(String str, + String start)+
+ This method mimics String.startsWith(String)
but takes case-sensitivity
+ into account.
str
- the string to check, not nullstart
- the start to compare against, not nullNullPointerException
- if either string is nullpublic boolean checkEndsWith(String str, + String end)+
+ This method mimics String.endsWith(java.lang.String)
but takes case-sensitivity
+ into account.
str
- the string to check, not nullend
- the end to compare against, not nullNullPointerException
- if either string is nullpublic int checkIndexOf(String str, + int strStartIndex, + String search)+
+ This method mimics parts of String.indexOf(String, int)
+ but takes case-sensitivity into account.
str
- the string to check, not nullstrStartIndex
- the index to start at in strsearch
- the start to search for, not nullnull
string inputNullPointerException
- if either string is nullpublic boolean checkRegionMatches(String str, + int strStartIndex, + String search)+
+ This method mimics parts of String.regionMatches(boolean, int, String, int, int)
+ but takes case-sensitivity into account.
str
- the string to check, not nullstrStartIndex
- the index to start at in strsearch
- the start to search for, not nullNullPointerException
- if either string is nullCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/IOExceptionWithCause.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/IOExceptionWithCause.html new file mode 100644 index 0000000..e36b528 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/IOExceptionWithCause.html @@ -0,0 +1,302 @@ + + + + + +IOException
instead@Deprecated +public class IOExceptionWithCause +extends IOException+
Throwable
constructors missing before Java 6.Constructor and Description | +
---|
IOExceptionWithCause(String message,
+ Throwable cause)
+Deprecated.
+Constructs a new instance with the given message and cause.
+ |
+
IOExceptionWithCause(Throwable cause)
+Deprecated.
+Constructs a new instance with the given cause.
+ |
+
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public IOExceptionWithCause(String message, + Throwable cause)+
+ As specified in Throwable
, the message in the given cause
is not used in this instance's
+ message.
+
message
- the message (see Throwable.getMessage()
)cause
- the cause (see Throwable.getCause()
). A null
value is allowed.public IOExceptionWithCause(Throwable cause)+
+ The message is set to cause==null ? null : cause.toString()
, which by default contains the class
+ and message of cause
. This constructor is useful for call sites that just wrap another throwable.
+
cause
- the cause (see Throwable.getCause()
). A null
value is allowed.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/IOUtils.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/IOUtils.html new file mode 100644 index 0000000..0d1b667 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/IOUtils.html @@ -0,0 +1,4242 @@ + + + + + +public class IOUtils +extends Object+
+ This class provides static utility methods for input/output operations. +
+ The byte-to-char methods and char-to-byte methods involve a conversion step. + Two methods are provided in each case, one that uses the platform default + encoding and the other which allows you to specify an encoding. You are + encouraged to always specify an encoding because relying on the platform + default can lead to unexpected results, for example when moving from + development to production. +
+ All the methods in this class that read a stream are buffered internally.
+ This means that there is no cause to use a BufferedInputStream
+ or BufferedReader
. The default buffer size of 4K has been shown
+ to be efficient in tests.
+
+ The various copy methods all delegate the actual copying to one of the following methods: +
copyLarge(InputStream, OutputStream, byte[])
copyLarge(InputStream, OutputStream, long, long, byte[])
copyLarge(Reader, Writer, char[])
copyLarge(Reader, Writer, long, long, char[])
copy(InputStream, OutputStream)
calls copyLarge(InputStream, OutputStream)
+ which calls copy(InputStream, OutputStream, int)
which creates the buffer and calls
+ copyLarge(InputStream, OutputStream, byte[])
.
+ + Applications can re-use buffers by using the underlying methods directly. + This may improve performance for applications that need to do a lot of copying. +
+ Wherever possible, the methods in this class do not flush or close + the stream. This is to avoid making non-portable assumptions about the + streams' origin and further use. Thus the caller is still responsible for + closing streams after use. +
+ Origin of code: Excalibur.
Modifier and Type | +Field and Description | +
---|---|
static char |
+DIR_SEPARATOR
+The system directory separator character.
+ |
+
static char |
+DIR_SEPARATOR_UNIX
+The Unix directory separator character.
+ |
+
static char |
+DIR_SEPARATOR_WINDOWS
+The Windows directory separator character.
+ |
+
static int |
+EOF
+Represents the end-of-file (or stream).
+ |
+
static String |
+LINE_SEPARATOR
+The system line separator string.
+ |
+
static String |
+LINE_SEPARATOR_UNIX
+The Unix line separator string.
+ |
+
static String |
+LINE_SEPARATOR_WINDOWS
+The Windows line separator string.
+ |
+
Constructor and Description | +
---|
IOUtils()
+Instances should NOT be constructed in standard programming.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static BufferedInputStream |
+buffer(InputStream inputStream)
+Returns the given InputStream if it is already a
+BufferedInputStream , otherwise creates a
+ BufferedInputStream from the given InputStream. |
+
static BufferedInputStream |
+buffer(InputStream inputStream,
+ int size)
+Returns the given InputStream if it is already a
+BufferedInputStream , otherwise creates a
+ BufferedInputStream from the given InputStream. |
+
static BufferedOutputStream |
+buffer(OutputStream outputStream)
+Returns the given OutputStream if it is already a
+BufferedOutputStream , otherwise creates a
+ BufferedOutputStream from the given OutputStream. |
+
static BufferedOutputStream |
+buffer(OutputStream outputStream,
+ int size)
+Returns the given OutputStream if it is already a
+BufferedOutputStream , otherwise creates a
+ BufferedOutputStream from the given OutputStream. |
+
static BufferedReader |
+buffer(Reader reader)
+Returns the given reader if it is already a
+BufferedReader , otherwise creates a BufferedReader from
+ the given reader. |
+
static BufferedReader |
+buffer(Reader reader,
+ int size)
+Returns the given reader if it is already a
+BufferedReader , otherwise creates a BufferedReader from the
+ given reader. |
+
static BufferedWriter |
+buffer(Writer writer)
+Returns the given Writer if it is already a
+BufferedWriter , otherwise creates a BufferedWriter from the
+ given Writer. |
+
static BufferedWriter |
+buffer(Writer writer,
+ int size)
+Returns the given Writer if it is already a
+BufferedWriter , otherwise creates a BufferedWriter from the
+ given Writer. |
+
static void |
+close(URLConnection conn)
+Closes a URLConnection.
+ |
+
static void |
+closeQuietly(Closeable... closeables)
+Closes a
+Closeable unconditionally. |
+
static void |
+closeQuietly(Closeable closeable)
+Closes a
+Closeable unconditionally. |
+
static void |
+closeQuietly(InputStream input)
+Closes an
+InputStream unconditionally. |
+
static void |
+closeQuietly(OutputStream output)
+Closes an
+OutputStream unconditionally. |
+
static void |
+closeQuietly(Reader input)
+Closes an
+Reader unconditionally. |
+
static void |
+closeQuietly(Selector selector)
+Closes a
+Selector unconditionally. |
+
static void |
+closeQuietly(ServerSocket sock)
+Closes a
+ServerSocket unconditionally. |
+
static void |
+closeQuietly(Socket sock)
+Closes a
+Socket unconditionally. |
+
static void |
+closeQuietly(Writer output)
+Closes an
+Writer unconditionally. |
+
static boolean |
+contentEquals(InputStream input1,
+ InputStream input2)
+Compares the contents of two Streams to determine if they are equal or
+ not.
+ |
+
static boolean |
+contentEquals(Reader input1,
+ Reader input2)
+Compares the contents of two Readers to determine if they are equal or
+ not.
+ |
+
static boolean |
+contentEqualsIgnoreEOL(Reader input1,
+ Reader input2)
+Compares the contents of two Readers to determine if they are equal or
+ not, ignoring EOL characters.
+ |
+
static int |
+copy(InputStream input,
+ OutputStream output)
+Copies bytes from an
+InputStream to an
+ OutputStream . |
+
static long |
+copy(InputStream input,
+ OutputStream output,
+ int bufferSize)
+Copies bytes from an
+InputStream to an OutputStream using an internal buffer of the
+ given size. |
+
static void |
+copy(InputStream input,
+ Writer output)
+Deprecated.
+
+2.5 use
+copy(InputStream, Writer, Charset) instead |
+
static void |
+copy(InputStream input,
+ Writer output,
+ Charset inputEncoding)
+Copies bytes from an
+InputStream to chars on a
+ Writer using the specified character encoding. |
+
static void |
+copy(InputStream input,
+ Writer output,
+ String inputEncoding)
+Copies bytes from an
+InputStream to chars on a
+ Writer using the specified character encoding. |
+
static void |
+copy(Reader input,
+ OutputStream output)
+Deprecated.
+
+2.5 use
+copy(Reader, OutputStream, Charset) instead |
+
static void |
+copy(Reader input,
+ OutputStream output,
+ Charset outputEncoding)
+Copies chars from a
+Reader to bytes on an
+ OutputStream using the specified character encoding, and
+ calling flush. |
+
static void |
+copy(Reader input,
+ OutputStream output,
+ String outputEncoding)
+Copies chars from a
+Reader to bytes on an
+ OutputStream using the specified character encoding, and
+ calling flush. |
+
static int |
+copy(Reader input,
+ Writer output)
+Copies chars from a
+Reader to a Writer . |
+
static long |
+copyLarge(InputStream input,
+ OutputStream output)
+Copies bytes from a large (over 2GB)
+InputStream to an
+ OutputStream . |
+
static long |
+copyLarge(InputStream input,
+ OutputStream output,
+ byte[] buffer)
+Copies bytes from a large (over 2GB)
+InputStream to an
+ OutputStream . |
+
static long |
+copyLarge(InputStream input,
+ OutputStream output,
+ long inputOffset,
+ long length)
+Copies some or all bytes from a large (over 2GB)
+InputStream to an
+ OutputStream , optionally skipping input bytes. |
+
static long |
+copyLarge(InputStream input,
+ OutputStream output,
+ long inputOffset,
+ long length,
+ byte[] buffer)
+Copies some or all bytes from a large (over 2GB)
+InputStream to an
+ OutputStream , optionally skipping input bytes. |
+
static long |
+copyLarge(Reader input,
+ Writer output)
+Copies chars from a large (over 2GB)
+Reader to a Writer . |
+
static long |
+copyLarge(Reader input,
+ Writer output,
+ char[] buffer)
+Copies chars from a large (over 2GB)
+Reader to a Writer . |
+
static long |
+copyLarge(Reader input,
+ Writer output,
+ long inputOffset,
+ long length)
+Copies some or all chars from a large (over 2GB)
+InputStream to an
+ OutputStream , optionally skipping input chars. |
+
static long |
+copyLarge(Reader input,
+ Writer output,
+ long inputOffset,
+ long length,
+ char[] buffer)
+Copies some or all chars from a large (over 2GB)
+InputStream to an
+ OutputStream , optionally skipping input chars. |
+
static LineIterator |
+lineIterator(InputStream input,
+ Charset encoding)
+Returns an Iterator for the lines in an
+InputStream , using
+ the character encoding specified (or default encoding if null). |
+
static LineIterator |
+lineIterator(InputStream input,
+ String encoding)
+Returns an Iterator for the lines in an
+InputStream , using
+ the character encoding specified (or default encoding if null). |
+
static LineIterator |
+lineIterator(Reader reader)
+Returns an Iterator for the lines in a
+Reader . |
+
static int |
+read(InputStream input,
+ byte[] buffer)
+Reads bytes from an input stream.
+ |
+
static int |
+read(InputStream input,
+ byte[] buffer,
+ int offset,
+ int length)
+Reads bytes from an input stream.
+ |
+
static int |
+read(ReadableByteChannel input,
+ ByteBuffer buffer)
+Reads bytes from a ReadableByteChannel.
+ |
+
static int |
+read(Reader input,
+ char[] buffer)
+Reads characters from an input character stream.
+ |
+
static int |
+read(Reader input,
+ char[] buffer,
+ int offset,
+ int length)
+Reads characters from an input character stream.
+ |
+
static void |
+readFully(InputStream input,
+ byte[] buffer)
+Reads the requested number of bytes or fail if there are not enough left.
+ |
+
static void |
+readFully(InputStream input,
+ byte[] buffer,
+ int offset,
+ int length)
+Reads the requested number of bytes or fail if there are not enough left.
+ |
+
static byte[] |
+readFully(InputStream input,
+ int length)
+Reads the requested number of bytes or fail if there are not enough left.
+ |
+
static void |
+readFully(ReadableByteChannel input,
+ ByteBuffer buffer)
+Reads the requested number of bytes or fail if there are not enough left.
+ |
+
static void |
+readFully(Reader input,
+ char[] buffer)
+Reads the requested number of characters or fail if there are not enough left.
+ |
+
static void |
+readFully(Reader input,
+ char[] buffer,
+ int offset,
+ int length)
+Reads the requested number of characters or fail if there are not enough left.
+ |
+
static List<String> |
+readLines(InputStream input)
+Deprecated.
+
+2.5 use
+readLines(InputStream, Charset) instead |
+
static List<String> |
+readLines(InputStream input,
+ Charset encoding)
+Gets the contents of an
+InputStream as a list of Strings,
+ one entry per line, using the specified character encoding. |
+
static List<String> |
+readLines(InputStream input,
+ String encoding)
+Gets the contents of an
+InputStream as a list of Strings,
+ one entry per line, using the specified character encoding. |
+
static List<String> |
+readLines(Reader input)
+Gets the contents of a
+Reader as a list of Strings,
+ one entry per line. |
+
static long |
+skip(InputStream input,
+ long toSkip)
+Skips bytes from an input byte stream.
+ |
+
static long |
+skip(ReadableByteChannel input,
+ long toSkip)
+Skips bytes from a ReadableByteChannel.
+ |
+
static long |
+skip(Reader input,
+ long toSkip)
+Skips characters from an input character stream.
+ |
+
static void |
+skipFully(InputStream input,
+ long toSkip)
+Skips the requested number of bytes or fail if there are not enough left.
+ |
+
static void |
+skipFully(ReadableByteChannel input,
+ long toSkip)
+Skips the requested number of bytes or fail if there are not enough left.
+ |
+
static void |
+skipFully(Reader input,
+ long toSkip)
+Skips the requested number of characters or fail if there are not enough left.
+ |
+
static InputStream |
+toBufferedInputStream(InputStream input)
+Fetches entire contents of an
+InputStream and represent
+ same data as result InputStream. |
+
static InputStream |
+toBufferedInputStream(InputStream input,
+ int size)
+Fetches entire contents of an
+InputStream and represent
+ same data as result InputStream. |
+
static BufferedReader |
+toBufferedReader(Reader reader)
+Returns the given reader if it is a
+BufferedReader , otherwise creates a BufferedReader from the given
+ reader. |
+
static BufferedReader |
+toBufferedReader(Reader reader,
+ int size)
+Returns the given reader if it is a
+BufferedReader , otherwise creates a BufferedReader from the given
+ reader. |
+
static byte[] |
+toByteArray(InputStream input)
+Gets the contents of an
+InputStream as a byte[] . |
+
static byte[] |
+toByteArray(InputStream input,
+ int size)
+Gets the contents of an
+InputStream as a byte[] . |
+
static byte[] |
+toByteArray(InputStream input,
+ long size)
+Gets contents of an
+InputStream as a byte[] . |
+
static byte[] |
+toByteArray(Reader input)
+Deprecated.
+
+2.5 use
+toByteArray(Reader, Charset) instead |
+
static byte[] |
+toByteArray(Reader input,
+ Charset encoding)
+Gets the contents of a
+Reader as a byte[]
+ using the specified character encoding. |
+
static byte[] |
+toByteArray(Reader input,
+ String encoding)
+Gets the contents of a
+Reader as a byte[]
+ using the specified character encoding. |
+
static byte[] |
+toByteArray(String input)
+Deprecated.
+
+2.5 Use
+String.getBytes() instead |
+
static byte[] |
+toByteArray(URI uri)
+Gets the contents of a
+URI as a byte[] . |
+
static byte[] |
+toByteArray(URL url)
+Gets the contents of a
+URL as a byte[] . |
+
static byte[] |
+toByteArray(URLConnection urlConn)
+Gets the contents of a
+URLConnection as a byte[] . |
+
static char[] |
+toCharArray(InputStream is)
+Deprecated.
+
+2.5 use
+toCharArray(InputStream, Charset) instead |
+
static char[] |
+toCharArray(InputStream is,
+ Charset encoding)
+Gets the contents of an
+InputStream as a character array
+ using the specified character encoding. |
+
static char[] |
+toCharArray(InputStream is,
+ String encoding)
+Gets the contents of an
+InputStream as a character array
+ using the specified character encoding. |
+
static char[] |
+toCharArray(Reader input)
+Gets the contents of a
+Reader as a character array. |
+
static InputStream |
+toInputStream(CharSequence input)
+Deprecated.
+
+2.5 use
+toInputStream(CharSequence, Charset) instead |
+
static InputStream |
+toInputStream(CharSequence input,
+ Charset encoding)
+Converts the specified CharSequence to an input stream, encoded as bytes
+ using the specified character encoding.
+ |
+
static InputStream |
+toInputStream(CharSequence input,
+ String encoding)
+Converts the specified CharSequence to an input stream, encoded as bytes
+ using the specified character encoding.
+ |
+
static InputStream |
+toInputStream(String input)
+Deprecated.
+
+2.5 use
+toInputStream(String, Charset) instead |
+
static InputStream |
+toInputStream(String input,
+ Charset encoding)
+Converts the specified string to an input stream, encoded as bytes
+ using the specified character encoding.
+ |
+
static InputStream |
+toInputStream(String input,
+ String encoding)
+Converts the specified string to an input stream, encoded as bytes
+ using the specified character encoding.
+ |
+
static String |
+toString(byte[] input)
+Deprecated.
+
+2.5 Use
+String.String(byte[]) instead |
+
static String |
+toString(byte[] input,
+ String encoding)
+Gets the contents of a
+byte[] as a String
+ using the specified character encoding. |
+
static String |
+toString(InputStream input)
+Deprecated.
+
+2.5 use
+toString(InputStream, Charset) instead |
+
static String |
+toString(InputStream input,
+ Charset encoding)
+Gets the contents of an
+InputStream as a String
+ using the specified character encoding. |
+
static String |
+toString(InputStream input,
+ String encoding)
+Gets the contents of an
+InputStream as a String
+ using the specified character encoding. |
+
static String |
+toString(Reader input)
+Gets the contents of a
+Reader as a String. |
+
static String |
+toString(URI uri)
+Deprecated.
+
+2.5 use
+toString(URI, Charset) instead |
+
static String |
+toString(URI uri,
+ Charset encoding)
+Gets the contents at the given URI.
+ |
+
static String |
+toString(URI uri,
+ String encoding)
+Gets the contents at the given URI.
+ |
+
static String |
+toString(URL url)
+Deprecated.
+
+2.5 use
+toString(URL, Charset) instead |
+
static String |
+toString(URL url,
+ Charset encoding)
+Gets the contents at the given URL.
+ |
+
static String |
+toString(URL url,
+ String encoding)
+Gets the contents at the given URL.
+ |
+
static void |
+write(byte[] data,
+ OutputStream output)
+Writes bytes from a
+byte[] to an OutputStream . |
+
static void |
+write(byte[] data,
+ Writer output)
+Deprecated.
+
+2.5 use
+write(byte[], Writer, Charset) instead |
+
static void |
+write(byte[] data,
+ Writer output,
+ Charset encoding)
+Writes bytes from a
+byte[] to chars on a Writer
+ using the specified character encoding. |
+
static void |
+write(byte[] data,
+ Writer output,
+ String encoding)
+Writes bytes from a
+byte[] to chars on a Writer
+ using the specified character encoding. |
+
static void |
+write(char[] data,
+ OutputStream output)
+Deprecated.
+
+2.5 use
+write(char[], OutputStream, Charset) instead |
+
static void |
+write(char[] data,
+ OutputStream output,
+ Charset encoding)
+Writes chars from a
+char[] to bytes on an
+ OutputStream using the specified character encoding. |
+
static void |
+write(char[] data,
+ OutputStream output,
+ String encoding)
+Writes chars from a
+char[] to bytes on an
+ OutputStream using the specified character encoding. |
+
static void |
+write(char[] data,
+ Writer output)
+Writes chars from a
+char[] to a Writer |
+
static void |
+write(CharSequence data,
+ OutputStream output)
+Deprecated.
+
+2.5 use
+write(CharSequence, OutputStream, Charset) instead |
+
static void |
+write(CharSequence data,
+ OutputStream output,
+ Charset encoding)
+Writes chars from a
+CharSequence to bytes on an
+ OutputStream using the specified character encoding. |
+
static void |
+write(CharSequence data,
+ OutputStream output,
+ String encoding)
+Writes chars from a
+CharSequence to bytes on an
+ OutputStream using the specified character encoding. |
+
static void |
+write(CharSequence data,
+ Writer output)
+Writes chars from a
+CharSequence to a Writer . |
+
static void |
+write(StringBuffer data,
+ OutputStream output)
+Deprecated.
+
+replaced by write(CharSequence, OutputStream)
+ |
+
static void |
+write(StringBuffer data,
+ OutputStream output,
+ String encoding)
+Deprecated.
+
+replaced by write(CharSequence, OutputStream, String)
+ |
+
static void |
+write(StringBuffer data,
+ Writer output)
+Deprecated.
+
+replaced by write(CharSequence, Writer)
+ |
+
static void |
+write(String data,
+ OutputStream output)
+Deprecated.
+
+2.5 use
+write(String, OutputStream, Charset) instead |
+
static void |
+write(String data,
+ OutputStream output,
+ Charset encoding)
+Writes chars from a
+String to bytes on an
+ OutputStream using the specified character encoding. |
+
static void |
+write(String data,
+ OutputStream output,
+ String encoding)
+Writes chars from a
+String to bytes on an
+ OutputStream using the specified character encoding. |
+
static void |
+write(String data,
+ Writer output)
+Writes chars from a
+String to a Writer . |
+
static void |
+writeChunked(byte[] data,
+ OutputStream output)
+Writes bytes from a
+byte[] to an OutputStream using chunked writes. |
+
static void |
+writeChunked(char[] data,
+ Writer output)
+Writes chars from a
+char[] to a Writer using chunked writes. |
+
static void |
+writeLines(Collection<?> lines,
+ String lineEnding,
+ OutputStream output)
+Deprecated.
+
+2.5 use
+writeLines(Collection, String, OutputStream, Charset) instead |
+
static void |
+writeLines(Collection<?> lines,
+ String lineEnding,
+ OutputStream output,
+ Charset encoding)
+Writes the
+toString() value of each item in a collection to
+ an OutputStream line by line, using the specified character
+ encoding and the specified line ending. |
+
static void |
+writeLines(Collection<?> lines,
+ String lineEnding,
+ OutputStream output,
+ String encoding)
+Writes the
+toString() value of each item in a collection to
+ an OutputStream line by line, using the specified character
+ encoding and the specified line ending. |
+
static void |
+writeLines(Collection<?> lines,
+ String lineEnding,
+ Writer writer)
+Writes the
+toString() value of each item in a collection to
+ a Writer line by line, using the specified line ending. |
+
public static final int EOF+
public static final char DIR_SEPARATOR_UNIX+
public static final char DIR_SEPARATOR_WINDOWS+
public static final char DIR_SEPARATOR+
public static final String LINE_SEPARATOR_UNIX+
public static final String LINE_SEPARATOR_WINDOWS+
public static final String LINE_SEPARATOR+
public IOUtils()+
public static void close(URLConnection conn)+
conn
- the connection to close.public static void closeQuietly(Reader input)+
Reader
unconditionally.
+
+ Equivalent to Reader.close()
, except any exceptions will be ignored.
+ This is typically used in finally blocks.
+
+ Example code: +
+ char[] data = new char[1024]; + Reader in = null; + try { + in = new FileReader("foo.txt"); + in.read(data); + in.close(); //close errors are handled + } catch (Exception e) { + // error handling + } finally { + IOUtils.closeQuietly(in); + } +
input
- the Reader to close, may be null or already closedpublic static void closeQuietly(Writer output)+
Writer
unconditionally.
+
+ Equivalent to Writer.close()
, except any exceptions will be ignored.
+ This is typically used in finally blocks.
+
+ Example code: +
+ Writer out = null; + try { + out = new StringWriter(); + out.write("Hello World"); + out.close(); //close errors are handled + } catch (Exception e) { + // error handling + } finally { + IOUtils.closeQuietly(out); + } +
output
- the Writer to close, may be null or already closedpublic static void closeQuietly(InputStream input)+
InputStream
unconditionally.
+
+ Equivalent to InputStream.close()
, except any exceptions will be ignored.
+ This is typically used in finally blocks.
+
+ Example code: +
+ byte[] data = new byte[1024]; + InputStream in = null; + try { + in = new FileInputStream("foo.txt"); + in.read(data); + in.close(); //close errors are handled + } catch (Exception e) { + // error handling + } finally { + IOUtils.closeQuietly(in); + } +
input
- the InputStream to close, may be null or already closedpublic static void closeQuietly(OutputStream output)+
OutputStream
unconditionally.
+
+ Equivalent to OutputStream.close()
, except any exceptions will be ignored.
+ This is typically used in finally blocks.
+
+ Example code: +
+ byte[] data = "Hello, World".getBytes(); + + OutputStream out = null; + try { + out = new FileOutputStream("foo.txt"); + out.write(data); + out.close(); //close errors are handled + } catch (IOException e) { + // error handling + } finally { + IOUtils.closeQuietly(out); + } +
output
- the OutputStream to close, may be null or already closedpublic static void closeQuietly(Closeable closeable)+
Closeable
unconditionally.
+
+ Equivalent to Closeable.close()
, except any exceptions will be ignored. This is typically used in
+ finally blocks.
+
+ Example code: +
++ Closeable closeable = null; + try { + closeable = new FileReader("foo.txt"); + // process closeable + closeable.close(); + } catch (Exception e) { + // error handling + } finally { + IOUtils.closeQuietly(closeable); + } ++
+ Closing all streams: +
++ try { + return IOUtils.copy(inputStream, outputStream); + } finally { + IOUtils.closeQuietly(inputStream); + IOUtils.closeQuietly(outputStream); + } +
closeable
- the objects to close, may be null or already closedpublic static void closeQuietly(Closeable... closeables)+
Closeable
unconditionally.
+
+ Equivalent to Closeable.close()
, except any exceptions will be ignored.
+
+ This is typically used in finally blocks to ensure that the closeable is closed
+ even if an Exception was thrown before the normal close statement was reached.
+
+ It should not be used to replace the close statement(s)
+ which should be present for the non-exceptional case.
+
+ It is only intended to simplify tidying up where normal processing has already failed
+ and reporting close failure as well is not necessary or useful.
+
+ Example code: +
++ Closeable closeable = null; + try { + closeable = new FileReader("foo.txt"); + // processing using the closeable; may throw an Exception + closeable.close(); // Normal close - exceptions not ignored + } catch (Exception e) { + // error handling + } finally { + IOUtils.closeQuietly(closeable); // In case normal close was skipped due to Exception + } ++
+ Closing all streams:
+
+
+ try { + return IOUtils.copy(inputStream, outputStream); + } finally { + IOUtils.closeQuietly(inputStream, outputStream); + } +
closeables
- the objects to close, may be null or already closedcloseQuietly(Closeable)
public static void closeQuietly(Socket sock)+
Socket
unconditionally.
+
+ Equivalent to Socket.close()
, except any exceptions will be ignored.
+ This is typically used in finally blocks.
+
+ Example code: +
+ Socket socket = null; + try { + socket = new Socket("http://www.foo.com/", 80); + // process socket + socket.close(); + } catch (Exception e) { + // error handling + } finally { + IOUtils.closeQuietly(socket); + } +
sock
- the Socket to close, may be null or already closedpublic static void closeQuietly(Selector selector)+
Selector
unconditionally.
+
+ Equivalent to Selector.close()
, except any exceptions will be ignored.
+ This is typically used in finally blocks.
+
+ Example code: +
+ Selector selector = null; + try { + selector = Selector.open(); + // process socket + + } catch (Exception e) { + // error handling + } finally { + IOUtils.closeQuietly(selector); + } +
selector
- the Selector to close, may be null or already closedpublic static void closeQuietly(ServerSocket sock)+
ServerSocket
unconditionally.
+
+ Equivalent to ServerSocket.close()
, except any exceptions will be ignored.
+ This is typically used in finally blocks.
+
+ Example code: +
+ ServerSocket socket = null; + try { + socket = new ServerSocket(); + // process socket + socket.close(); + } catch (Exception e) { + // error handling + } finally { + IOUtils.closeQuietly(socket); + } +
sock
- the ServerSocket to close, may be null or already closedpublic static InputStream toBufferedInputStream(InputStream input) + throws IOException+
InputStream
and represent
+ same data as result InputStream.
+ + This method is useful where, +
toByteArray(InputStream)
, since it
+ avoids unnecessary allocation and copy of byte[].BufferedInputStream
.input
- Stream to be fully buffered.IOException
- if an I/O error occurspublic static InputStream toBufferedInputStream(InputStream input, + int size) + throws IOException+
InputStream
and represent
+ same data as result InputStream.
+ + This method is useful where, +
toByteArray(InputStream)
, since it
+ avoids unnecessary allocation and copy of byte[].BufferedInputStream
.input
- Stream to be fully buffered.size
- the initial buffer sizeIOException
- if an I/O error occurspublic static BufferedReader toBufferedReader(Reader reader)+
BufferedReader
, otherwise creates a BufferedReader from the given
+ reader.reader
- the reader to wrap or return (not null)BufferedReader
for the given readerNullPointerException
- if the input parameter is nullbuffer(Reader)
public static BufferedReader toBufferedReader(Reader reader, + int size)+
BufferedReader
, otherwise creates a BufferedReader from the given
+ reader.reader
- the reader to wrap or return (not null)size
- the buffer size, if a new BufferedReader is created.BufferedReader
for the given readerNullPointerException
- if the input parameter is nullbuffer(Reader)
public static BufferedReader buffer(Reader reader)+
BufferedReader
, otherwise creates a BufferedReader from
+ the given reader.reader
- the reader to wrap or return (not null)BufferedReader
for the given readerNullPointerException
- if the input parameter is nullpublic static BufferedReader buffer(Reader reader, + int size)+
BufferedReader
, otherwise creates a BufferedReader from the
+ given reader.reader
- the reader to wrap or return (not null)size
- the buffer size, if a new BufferedReader is created.BufferedReader
for the given readerNullPointerException
- if the input parameter is nullpublic static BufferedWriter buffer(Writer writer)+
BufferedWriter
, otherwise creates a BufferedWriter from the
+ given Writer.writer
- the Writer to wrap or return (not null)BufferedWriter
for the given WriterNullPointerException
- if the input parameter is nullpublic static BufferedWriter buffer(Writer writer, + int size)+
BufferedWriter
, otherwise creates a BufferedWriter from the
+ given Writer.writer
- the Writer to wrap or return (not null)size
- the buffer size, if a new BufferedWriter is created.BufferedWriter
for the given WriterNullPointerException
- if the input parameter is nullpublic static BufferedOutputStream buffer(OutputStream outputStream)+
BufferedOutputStream
, otherwise creates a
+ BufferedOutputStream from the given OutputStream.outputStream
- the OutputStream to wrap or return (not null)BufferedOutputStream
for the given OutputStreamNullPointerException
- if the input parameter is nullpublic static BufferedOutputStream buffer(OutputStream outputStream, + int size)+
BufferedOutputStream
, otherwise creates a
+ BufferedOutputStream from the given OutputStream.outputStream
- the OutputStream to wrap or return (not null)size
- the buffer size, if a new BufferedOutputStream is created.BufferedOutputStream
for the given OutputStreamNullPointerException
- if the input parameter is nullpublic static BufferedInputStream buffer(InputStream inputStream)+
BufferedInputStream
, otherwise creates a
+ BufferedInputStream from the given InputStream.inputStream
- the InputStream to wrap or return (not null)BufferedInputStream
for the given InputStreamNullPointerException
- if the input parameter is nullpublic static BufferedInputStream buffer(InputStream inputStream, + int size)+
BufferedInputStream
, otherwise creates a
+ BufferedInputStream from the given InputStream.inputStream
- the InputStream to wrap or return (not null)size
- the buffer size, if a new BufferedInputStream is created.BufferedInputStream
for the given InputStreamNullPointerException
- if the input parameter is nullpublic static byte[] toByteArray(InputStream input) + throws IOException+
InputStream
as a byte[]
.
+
+ This method buffers the input internally, so there is no need to use a
+ BufferedInputStream
.
input
- the InputStream
to read fromNullPointerException
- if the input is nullIOException
- if an I/O error occurspublic static byte[] toByteArray(InputStream input, + long size) + throws IOException+
InputStream
as a byte[]
.
+ Use this method instead of toByteArray(InputStream)
+ when InputStream
size is known.
+ NOTE: the method checks that the length can safely be cast to an int without truncation
+ before using toByteArray(java.io.InputStream, int)
to read into the byte array.
+ (Arrays can have no more than Integer.MAX_VALUE entries anyway)input
- the InputStream
to read fromsize
- the size of InputStream
IOException
- if an I/O error occurs or InputStream
size differ from parameter
+ sizeIllegalArgumentException
- if size is less than zero or size is greater than Integer.MAX_VALUEtoByteArray(java.io.InputStream, int)
public static byte[] toByteArray(InputStream input, + int size) + throws IOException+
InputStream
as a byte[]
.
+ Use this method instead of toByteArray(InputStream)
+ when InputStream
size is knowninput
- the InputStream
to read fromsize
- the size of InputStream
IOException
- if an I/O error occurs or InputStream
size differ from parameter
+ sizeIllegalArgumentException
- if size is less than zero@Deprecated +public static byte[] toByteArray(Reader input) + throws IOException+
toByteArray(Reader, Charset)
insteadReader
as a byte[]
+ using the default character encoding of the platform.
+
+ This method buffers the input internally, so there is no need to use a
+ BufferedReader
.
input
- the Reader
to read fromNullPointerException
- if the input is nullIOException
- if an I/O error occurspublic static byte[] toByteArray(Reader input, + Charset encoding) + throws IOException+
Reader
as a byte[]
+ using the specified character encoding.
+
+ This method buffers the input internally, so there is no need to use a
+ BufferedReader
.
input
- the Reader
to read fromencoding
- the encoding to use, null means platform defaultNullPointerException
- if the input is nullIOException
- if an I/O error occurspublic static byte[] toByteArray(Reader input, + String encoding) + throws IOException+
Reader
as a byte[]
+ using the specified character encoding.
+ + Character encoding names can be found at + IANA. +
+ This method buffers the input internally, so there is no need to use a
+ BufferedReader
.
input
- the Reader
to read fromencoding
- the encoding to use, null means platform defaultNullPointerException
- if the input is nullIOException
- if an I/O error occursUnsupportedCharsetException
- thrown instead of .UnsupportedEncodingException
in version 2.2 if the
+ encoding is not supported.@Deprecated +public static byte[] toByteArray(String input) + throws IOException+
String.getBytes()
insteadString
as a byte[]
+ using the default character encoding of the platform.
+
+ This is the same as String.getBytes()
.
input
- the String
to convertNullPointerException
- if the input is nullIOException
- if an I/O error occurs (never occurs)public static byte[] toByteArray(URI uri) + throws IOException+
URI
as a byte[]
.uri
- the URI
to readNullPointerException
- if the uri is nullIOException
- if an I/O exception occurspublic static byte[] toByteArray(URL url) + throws IOException+
URL
as a byte[]
.url
- the URL
to readNullPointerException
- if the input is nullIOException
- if an I/O exception occurspublic static byte[] toByteArray(URLConnection urlConn) + throws IOException+
URLConnection
as a byte[]
.urlConn
- the URLConnection
to readNullPointerException
- if the urlConn is nullIOException
- if an I/O exception occurs@Deprecated +public static char[] toCharArray(InputStream is) + throws IOException+
toCharArray(InputStream, Charset)
insteadInputStream
as a character array
+ using the default character encoding of the platform.
+
+ This method buffers the input internally, so there is no need to use a
+ BufferedInputStream
.
is
- the InputStream
to read fromNullPointerException
- if the input is nullIOException
- if an I/O error occurspublic static char[] toCharArray(InputStream is, + Charset encoding) + throws IOException+
InputStream
as a character array
+ using the specified character encoding.
+
+ This method buffers the input internally, so there is no need to use a
+ BufferedInputStream
.
is
- the InputStream
to read fromencoding
- the encoding to use, null means platform defaultNullPointerException
- if the input is nullIOException
- if an I/O error occurspublic static char[] toCharArray(InputStream is, + String encoding) + throws IOException+
InputStream
as a character array
+ using the specified character encoding.
+ + Character encoding names can be found at + IANA. +
+ This method buffers the input internally, so there is no need to use a
+ BufferedInputStream
.
is
- the InputStream
to read fromencoding
- the encoding to use, null means platform defaultNullPointerException
- if the input is nullIOException
- if an I/O error occursUnsupportedCharsetException
- thrown instead of .UnsupportedEncodingException
in version 2.2 if the
+ encoding is not supported.public static char[] toCharArray(Reader input) + throws IOException+
Reader
as a character array.
+
+ This method buffers the input internally, so there is no need to use a
+ BufferedReader
.
input
- the Reader
to read fromNullPointerException
- if the input is nullIOException
- if an I/O error occurs@Deprecated +public static String toString(InputStream input) + throws IOException+
toString(InputStream, Charset)
insteadInputStream
as a String
+ using the default character encoding of the platform.
+
+ This method buffers the input internally, so there is no need to use a
+ BufferedInputStream
.
input
- the InputStream
to read fromNullPointerException
- if the input is nullIOException
- if an I/O error occurspublic static String toString(InputStream input, + Charset encoding) + throws IOException+
InputStream
as a String
+ using the specified character encoding.
+
+ This method buffers the input internally, so there is no need to use a
+ BufferedInputStream
.
+
input
- the InputStream
to read fromencoding
- the encoding to use, null means platform defaultNullPointerException
- if the input is nullIOException
- if an I/O error occurspublic static String toString(InputStream input, + String encoding) + throws IOException+
InputStream
as a String
+ using the specified character encoding.
+ + Character encoding names can be found at + IANA. +
+ This method buffers the input internally, so there is no need to use a
+ BufferedInputStream
.
input
- the InputStream
to read fromencoding
- the encoding to use, null means platform defaultNullPointerException
- if the input is nullIOException
- if an I/O error occursUnsupportedCharsetException
- thrown instead of .UnsupportedEncodingException
in version 2.2 if the
+ encoding is not supported.public static String toString(Reader input) + throws IOException+
Reader
as a String.
+
+ This method buffers the input internally, so there is no need to use a
+ BufferedReader
.
input
- the Reader
to read fromNullPointerException
- if the input is nullIOException
- if an I/O error occurs@Deprecated +public static String toString(URI uri) + throws IOException+
toString(URI, Charset)
insteaduri
- The URI source.IOException
- if an I/O exception occurs.public static String toString(URI uri, + Charset encoding) + throws IOException+
uri
- The URI source.encoding
- The encoding name for the URL contents.IOException
- if an I/O exception occurs.public static String toString(URI uri, + String encoding) + throws IOException+
uri
- The URI source.encoding
- The encoding name for the URL contents.IOException
- if an I/O exception occurs.UnsupportedCharsetException
- thrown instead of .UnsupportedEncodingException
in version 2.2 if the
+ encoding is not supported.@Deprecated +public static String toString(URL url) + throws IOException+
toString(URL, Charset)
insteadurl
- The URL source.IOException
- if an I/O exception occurs.public static String toString(URL url, + Charset encoding) + throws IOException+
url
- The URL source.encoding
- The encoding name for the URL contents.IOException
- if an I/O exception occurs.public static String toString(URL url, + String encoding) + throws IOException+
url
- The URL source.encoding
- The encoding name for the URL contents.IOException
- if an I/O exception occurs.UnsupportedCharsetException
- thrown instead of .UnsupportedEncodingException
in version 2.2 if the
+ encoding is not supported.@Deprecated +public static String toString(byte[] input) + throws IOException+
String.String(byte[])
insteadbyte[]
as a String
+ using the default character encoding of the platform.input
- the byte array to read fromNullPointerException
- if the input is nullIOException
- if an I/O error occurs (never occurs)public static String toString(byte[] input, + String encoding) + throws IOException+
byte[]
as a String
+ using the specified character encoding.
+ + Character encoding names can be found at + IANA.
input
- the byte array to read fromencoding
- the encoding to use, null means platform defaultNullPointerException
- if the input is nullIOException
- if an I/O error occurs (never occurs)@Deprecated +public static List<String> readLines(InputStream input) + throws IOException+
readLines(InputStream, Charset)
insteadInputStream
as a list of Strings,
+ one entry per line, using the default character encoding of the platform.
+
+ This method buffers the input internally, so there is no need to use a
+ BufferedInputStream
.
input
- the InputStream
to read from, not nullNullPointerException
- if the input is nullIOException
- if an I/O error occurspublic static List<String> readLines(InputStream input, + Charset encoding) + throws IOException+
InputStream
as a list of Strings,
+ one entry per line, using the specified character encoding.
+
+ This method buffers the input internally, so there is no need to use a
+ BufferedInputStream
.
input
- the InputStream
to read from, not nullencoding
- the encoding to use, null means platform defaultNullPointerException
- if the input is nullIOException
- if an I/O error occurspublic static List<String> readLines(InputStream input, + String encoding) + throws IOException+
InputStream
as a list of Strings,
+ one entry per line, using the specified character encoding.
+ + Character encoding names can be found at + IANA. +
+ This method buffers the input internally, so there is no need to use a
+ BufferedInputStream
.
input
- the InputStream
to read from, not nullencoding
- the encoding to use, null means platform defaultNullPointerException
- if the input is nullIOException
- if an I/O error occursUnsupportedCharsetException
- thrown instead of .UnsupportedEncodingException
in version 2.2 if the
+ encoding is not supported.public static List<String> readLines(Reader input) + throws IOException+
Reader
as a list of Strings,
+ one entry per line.
+
+ This method buffers the input internally, so there is no need to use a
+ BufferedReader
.
input
- the Reader
to read from, not nullNullPointerException
- if the input is nullIOException
- if an I/O error occurspublic static LineIterator lineIterator(Reader reader)+
Reader
.
+
+ LineIterator
holds a reference to the open
+ Reader
specified here. When you have finished with the
+ iterator you should close the reader to free internal resources.
+ This can be done by closing the reader directly, or by calling
+ LineIterator.close()
or LineIterator.closeQuietly(LineIterator)
.
+
+ The recommended usage pattern is: +
+ try { + LineIterator it = IOUtils.lineIterator(reader); + while (it.hasNext()) { + String line = it.nextLine(); + /// do something with line + } + } finally { + IOUtils.closeQuietly(reader); + } +
reader
- the Reader
to read from, not nullIllegalArgumentException
- if the reader is nullpublic static LineIterator lineIterator(InputStream input, + Charset encoding) + throws IOException+
InputStream
, using
+ the character encoding specified (or default encoding if null).
+
+ LineIterator
holds a reference to the open
+ InputStream
specified here. When you have finished with
+ the iterator you should close the stream to free internal resources.
+ This can be done by closing the stream directly, or by calling
+ LineIterator.close()
or LineIterator.closeQuietly(LineIterator)
.
+
+ The recommended usage pattern is: +
+ try { + LineIterator it = IOUtils.lineIterator(stream, charset); + while (it.hasNext()) { + String line = it.nextLine(); + /// do something with line + } + } finally { + IOUtils.closeQuietly(stream); + } +
input
- the InputStream
to read from, not nullencoding
- the encoding to use, null means platform defaultIllegalArgumentException
- if the input is nullIOException
- if an I/O error occurs, such as if the encoding is invalidpublic static LineIterator lineIterator(InputStream input, + String encoding) + throws IOException+
InputStream
, using
+ the character encoding specified (or default encoding if null).
+
+ LineIterator
holds a reference to the open
+ InputStream
specified here. When you have finished with
+ the iterator you should close the stream to free internal resources.
+ This can be done by closing the stream directly, or by calling
+ LineIterator.close()
or LineIterator.closeQuietly(LineIterator)
.
+
+ The recommended usage pattern is: +
+ try { + LineIterator it = IOUtils.lineIterator(stream, "UTF-8"); + while (it.hasNext()) { + String line = it.nextLine(); + /// do something with line + } + } finally { + IOUtils.closeQuietly(stream); + } +
input
- the InputStream
to read from, not nullencoding
- the encoding to use, null means platform defaultIllegalArgumentException
- if the input is nullIOException
- if an I/O error occurs, such as if the encoding is invalidUnsupportedCharsetException
- thrown instead of .UnsupportedEncodingException
in version 2.2 if the
+ encoding is not supported.@Deprecated +public static InputStream toInputStream(CharSequence input)+
toInputStream(CharSequence, Charset)
insteadinput
- the CharSequence to convertpublic static InputStream toInputStream(CharSequence input, + Charset encoding)+
input
- the CharSequence to convertencoding
- the encoding to use, null means platform defaultpublic static InputStream toInputStream(CharSequence input, + String encoding) + throws IOException+
+ Character encoding names can be found at + IANA.
input
- the CharSequence to convertencoding
- the encoding to use, null means platform defaultIOException
- if the encoding is invalidUnsupportedCharsetException
- thrown instead of .UnsupportedEncodingException
in version 2.2 if the
+ encoding is not supported.@Deprecated +public static InputStream toInputStream(String input)+
toInputStream(String, Charset)
insteadinput
- the string to convertpublic static InputStream toInputStream(String input, + Charset encoding)+
input
- the string to convertencoding
- the encoding to use, null means platform defaultpublic static InputStream toInputStream(String input, + String encoding) + throws IOException+
+ Character encoding names can be found at + IANA.
input
- the string to convertencoding
- the encoding to use, null means platform defaultIOException
- if the encoding is invalidUnsupportedCharsetException
- thrown instead of .UnsupportedEncodingException
in version 2.2 if the
+ encoding is not supported.public static void write(byte[] data, + OutputStream output) + throws IOException+
byte[]
to an OutputStream
.data
- the byte array to write, do not modify during output,
+ null ignoredoutput
- the OutputStream
to write toNullPointerException
- if output is nullIOException
- if an I/O error occurspublic static void writeChunked(byte[] data, + OutputStream output) + throws IOException+
byte[]
to an OutputStream
using chunked writes.
+ This is intended for writing very large byte arrays which might otherwise cause excessive
+ memory usage if the native code has to allocate a copy.data
- the byte array to write, do not modify during output,
+ null ignoredoutput
- the OutputStream
to write toNullPointerException
- if output is nullIOException
- if an I/O error occurs@Deprecated +public static void write(byte[] data, + Writer output) + throws IOException+
write(byte[], Writer, Charset)
insteadbyte[]
to chars on a Writer
+ using the default character encoding of the platform.
+
+ This method uses String.String(byte[])
.
data
- the byte array to write, do not modify during output,
+ null ignoredoutput
- the Writer
to write toNullPointerException
- if output is nullIOException
- if an I/O error occurspublic static void write(byte[] data, + Writer output, + Charset encoding) + throws IOException+
byte[]
to chars on a Writer
+ using the specified character encoding.
+
+ This method uses String.String(byte[], String)
.
data
- the byte array to write, do not modify during output,
+ null ignoredoutput
- the Writer
to write toencoding
- the encoding to use, null means platform defaultNullPointerException
- if output is nullIOException
- if an I/O error occurspublic static void write(byte[] data, + Writer output, + String encoding) + throws IOException+
byte[]
to chars on a Writer
+ using the specified character encoding.
+ + Character encoding names can be found at + IANA. +
+ This method uses String.String(byte[], String)
.
data
- the byte array to write, do not modify during output,
+ null ignoredoutput
- the Writer
to write toencoding
- the encoding to use, null means platform defaultNullPointerException
- if output is nullIOException
- if an I/O error occursUnsupportedCharsetException
- thrown instead of .UnsupportedEncodingException
in version 2.2 if the
+ encoding is not supported.public static void write(char[] data, + Writer output) + throws IOException+
char[]
to a Writer
data
- the char array to write, do not modify during output,
+ null ignoredoutput
- the Writer
to write toNullPointerException
- if output is nullIOException
- if an I/O error occurspublic static void writeChunked(char[] data, + Writer output) + throws IOException+
char[]
to a Writer
using chunked writes.
+ This is intended for writing very large byte arrays which might otherwise cause excessive
+ memory usage if the native code has to allocate a copy.data
- the char array to write, do not modify during output,
+ null ignoredoutput
- the Writer
to write toNullPointerException
- if output is nullIOException
- if an I/O error occurs@Deprecated +public static void write(char[] data, + OutputStream output) + throws IOException+
write(char[], OutputStream, Charset)
insteadchar[]
to bytes on an
+ OutputStream
.
+
+ This method uses String.String(char[])
and
+ String.getBytes()
.
data
- the char array to write, do not modify during output,
+ null ignoredoutput
- the OutputStream
to write toNullPointerException
- if output is nullIOException
- if an I/O error occurspublic static void write(char[] data, + OutputStream output, + Charset encoding) + throws IOException+
char[]
to bytes on an
+ OutputStream
using the specified character encoding.
+
+ This method uses String.String(char[])
and
+ String.getBytes(String)
.
data
- the char array to write, do not modify during output,
+ null ignoredoutput
- the OutputStream
to write toencoding
- the encoding to use, null means platform defaultNullPointerException
- if output is nullIOException
- if an I/O error occurspublic static void write(char[] data, + OutputStream output, + String encoding) + throws IOException+
char[]
to bytes on an
+ OutputStream
using the specified character encoding.
+ + Character encoding names can be found at + IANA. +
+ This method uses String.String(char[])
and
+ String.getBytes(String)
.
data
- the char array to write, do not modify during output,
+ null ignoredoutput
- the OutputStream
to write toencoding
- the encoding to use, null means platform defaultNullPointerException
- if output is nullIOException
- if an I/O error occursUnsupportedCharsetException
- thrown instead of .UnsupportedEncodingException
in version 2.2 if the encoding is not supported.public static void write(CharSequence data, + Writer output) + throws IOException+
CharSequence
to a Writer
.data
- the CharSequence
to write, null ignoredoutput
- the Writer
to write toNullPointerException
- if output is nullIOException
- if an I/O error occurs@Deprecated +public static void write(CharSequence data, + OutputStream output) + throws IOException+
write(CharSequence, OutputStream, Charset)
insteadCharSequence
to bytes on an
+ OutputStream
using the default character encoding of the
+ platform.
+
+ This method uses String.getBytes()
.
data
- the CharSequence
to write, null ignoredoutput
- the OutputStream
to write toNullPointerException
- if output is nullIOException
- if an I/O error occurspublic static void write(CharSequence data, + OutputStream output, + Charset encoding) + throws IOException+
CharSequence
to bytes on an
+ OutputStream
using the specified character encoding.
+
+ This method uses String.getBytes(String)
.
data
- the CharSequence
to write, null ignoredoutput
- the OutputStream
to write toencoding
- the encoding to use, null means platform defaultNullPointerException
- if output is nullIOException
- if an I/O error occurspublic static void write(CharSequence data, + OutputStream output, + String encoding) + throws IOException+
CharSequence
to bytes on an
+ OutputStream
using the specified character encoding.
+ + Character encoding names can be found at + IANA. +
+ This method uses String.getBytes(String)
.
data
- the CharSequence
to write, null ignoredoutput
- the OutputStream
to write toencoding
- the encoding to use, null means platform defaultNullPointerException
- if output is nullIOException
- if an I/O error occursUnsupportedCharsetException
- thrown instead of .UnsupportedEncodingException
in version 2.2 if the encoding is not supported.public static void write(String data, + Writer output) + throws IOException+
String
to a Writer
.data
- the String
to write, null ignoredoutput
- the Writer
to write toNullPointerException
- if output is nullIOException
- if an I/O error occurs@Deprecated +public static void write(String data, + OutputStream output) + throws IOException+
write(String, OutputStream, Charset)
insteadString
to bytes on an
+ OutputStream
using the default character encoding of the
+ platform.
+
+ This method uses String.getBytes()
.
data
- the String
to write, null ignoredoutput
- the OutputStream
to write toNullPointerException
- if output is nullIOException
- if an I/O error occurspublic static void write(String data, + OutputStream output, + Charset encoding) + throws IOException+
String
to bytes on an
+ OutputStream
using the specified character encoding.
+
+ This method uses String.getBytes(String)
.
data
- the String
to write, null ignoredoutput
- the OutputStream
to write toencoding
- the encoding to use, null means platform defaultNullPointerException
- if output is nullIOException
- if an I/O error occurspublic static void write(String data, + OutputStream output, + String encoding) + throws IOException+
String
to bytes on an
+ OutputStream
using the specified character encoding.
+ + Character encoding names can be found at + IANA. +
+ This method uses String.getBytes(String)
.
data
- the String
to write, null ignoredoutput
- the OutputStream
to write toencoding
- the encoding to use, null means platform defaultNullPointerException
- if output is nullIOException
- if an I/O error occursUnsupportedCharsetException
- thrown instead of .UnsupportedEncodingException
in version 2.2 if the encoding is not supported.@Deprecated +public static void write(StringBuffer data, + Writer output) + throws IOException+
StringBuffer
to a Writer
.data
- the StringBuffer
to write, null ignoredoutput
- the Writer
to write toNullPointerException
- if output is nullIOException
- if an I/O error occurs@Deprecated +public static void write(StringBuffer data, + OutputStream output) + throws IOException+
StringBuffer
to bytes on an
+ OutputStream
using the default character encoding of the
+ platform.
+
+ This method uses String.getBytes()
.
data
- the StringBuffer
to write, null ignoredoutput
- the OutputStream
to write toNullPointerException
- if output is nullIOException
- if an I/O error occurs@Deprecated +public static void write(StringBuffer data, + OutputStream output, + String encoding) + throws IOException+
StringBuffer
to bytes on an
+ OutputStream
using the specified character encoding.
+ + Character encoding names can be found at + IANA. +
+ This method uses String.getBytes(String)
.
data
- the StringBuffer
to write, null ignoredoutput
- the OutputStream
to write toencoding
- the encoding to use, null means platform defaultNullPointerException
- if output is nullIOException
- if an I/O error occursUnsupportedCharsetException
- thrown instead of .UnsupportedEncodingException
in version 2.2 if the encoding is not supported.@Deprecated +public static void writeLines(Collection<?> lines, + String lineEnding, + OutputStream output) + throws IOException+
writeLines(Collection, String, OutputStream, Charset)
insteadtoString()
value of each item in a collection to
+ an OutputStream
line by line, using the default character
+ encoding of the platform and the specified line ending.lines
- the lines to write, null entries produce blank lineslineEnding
- the line separator to use, null is system defaultoutput
- the OutputStream
to write to, not null, not closedNullPointerException
- if the output is nullIOException
- if an I/O error occurspublic static void writeLines(Collection<?> lines, + String lineEnding, + OutputStream output, + Charset encoding) + throws IOException+
toString()
value of each item in a collection to
+ an OutputStream
line by line, using the specified character
+ encoding and the specified line ending.lines
- the lines to write, null entries produce blank lineslineEnding
- the line separator to use, null is system defaultoutput
- the OutputStream
to write to, not null, not closedencoding
- the encoding to use, null means platform defaultNullPointerException
- if the output is nullIOException
- if an I/O error occurspublic static void writeLines(Collection<?> lines, + String lineEnding, + OutputStream output, + String encoding) + throws IOException+
toString()
value of each item in a collection to
+ an OutputStream
line by line, using the specified character
+ encoding and the specified line ending.
+ + Character encoding names can be found at + IANA.
lines
- the lines to write, null entries produce blank lineslineEnding
- the line separator to use, null is system defaultoutput
- the OutputStream
to write to, not null, not closedencoding
- the encoding to use, null means platform defaultNullPointerException
- if the output is nullIOException
- if an I/O error occursUnsupportedCharsetException
- thrown instead of .UnsupportedEncodingException
in version 2.2 if the
+ encoding is not supported.public static void writeLines(Collection<?> lines, + String lineEnding, + Writer writer) + throws IOException+
toString()
value of each item in a collection to
+ a Writer
line by line, using the specified line ending.lines
- the lines to write, null entries produce blank lineslineEnding
- the line separator to use, null is system defaultwriter
- the Writer
to write to, not null, not closedNullPointerException
- if the input is nullIOException
- if an I/O error occurspublic static int copy(InputStream input, + OutputStream output) + throws IOException+
InputStream
to an
+ OutputStream
.
+
+ This method buffers the input internally, so there is no need to use a
+ BufferedInputStream
.
+
+ Large streams (over 2GB) will return a bytes copied value of
+ -1
after the copy has completed since the correct
+ number of bytes cannot be returned as an int. For large streams
+ use the copyLarge(InputStream, OutputStream)
method.
input
- the InputStream
to read fromoutput
- the OutputStream
to write toNullPointerException
- if the input or output is nullIOException
- if an I/O error occurspublic static long copy(InputStream input, + OutputStream output, + int bufferSize) + throws IOException+
InputStream
to an OutputStream
using an internal buffer of the
+ given size.
+
+ This method buffers the input internally, so there is no need to use a BufferedInputStream
.
+
input
- the InputStream
to read fromoutput
- the OutputStream
to write tobufferSize
- the bufferSize used to copy from the input to the outputNullPointerException
- if the input or output is nullIOException
- if an I/O error occurspublic static long copyLarge(InputStream input, + OutputStream output) + throws IOException+
InputStream
to an
+ OutputStream
.
+
+ This method buffers the input internally, so there is no need to use a
+ BufferedInputStream
.
+
+ The buffer size is given by DEFAULT_BUFFER_SIZE
.
input
- the InputStream
to read fromoutput
- the OutputStream
to write toNullPointerException
- if the input or output is nullIOException
- if an I/O error occurspublic static long copyLarge(InputStream input, + OutputStream output, + byte[] buffer) + throws IOException+
InputStream
to an
+ OutputStream
.
+
+ This method uses the provided buffer, so there is no need to use a
+ BufferedInputStream
.
+
input
- the InputStream
to read fromoutput
- the OutputStream
to write tobuffer
- the buffer to use for the copyNullPointerException
- if the input or output is nullIOException
- if an I/O error occurspublic static long copyLarge(InputStream input, + OutputStream output, + long inputOffset, + long length) + throws IOException+
InputStream
to an
+ OutputStream
, optionally skipping input bytes.
+
+ This method buffers the input internally, so there is no need to use a
+ BufferedInputStream
.
+
+ Note that the implementation uses skip(InputStream, long)
.
+ This means that the method may be considerably less efficient than using the actual skip implementation,
+ this is done to guarantee that the correct number of characters are skipped.
+
DEFAULT_BUFFER_SIZE
.input
- the InputStream
to read fromoutput
- the OutputStream
to write toinputOffset
- : number of bytes to skip from input before copying
+ -ve values are ignoredlength
- : number of bytes to copy. -ve means allNullPointerException
- if the input or output is nullIOException
- if an I/O error occurspublic static long copyLarge(InputStream input, + OutputStream output, + long inputOffset, + long length, + byte[] buffer) + throws IOException+
InputStream
to an
+ OutputStream
, optionally skipping input bytes.
+
+ This method uses the provided buffer, so there is no need to use a
+ BufferedInputStream
.
+
+ Note that the implementation uses skip(InputStream, long)
.
+ This means that the method may be considerably less efficient than using the actual skip implementation,
+ this is done to guarantee that the correct number of characters are skipped.
+
input
- the InputStream
to read fromoutput
- the OutputStream
to write toinputOffset
- : number of bytes to skip from input before copying
+ -ve values are ignoredlength
- : number of bytes to copy. -ve means allbuffer
- the buffer to use for the copyNullPointerException
- if the input or output is nullIOException
- if an I/O error occurs@Deprecated +public static void copy(InputStream input, + Writer output) + throws IOException+
copy(InputStream, Writer, Charset)
insteadInputStream
to chars on a
+ Writer
using the default character encoding of the platform.
+
+ This method buffers the input internally, so there is no need to use a
+ BufferedInputStream
.
+
+ This method uses InputStreamReader
.
input
- the InputStream
to read fromoutput
- the Writer
to write toNullPointerException
- if the input or output is nullIOException
- if an I/O error occurspublic static void copy(InputStream input, + Writer output, + Charset inputEncoding) + throws IOException+
InputStream
to chars on a
+ Writer
using the specified character encoding.
+
+ This method buffers the input internally, so there is no need to use a
+ BufferedInputStream
.
+
+ This method uses InputStreamReader
.
input
- the InputStream
to read fromoutput
- the Writer
to write toinputEncoding
- the encoding to use for the input stream, null means platform defaultNullPointerException
- if the input or output is nullIOException
- if an I/O error occurspublic static void copy(InputStream input, + Writer output, + String inputEncoding) + throws IOException+
InputStream
to chars on a
+ Writer
using the specified character encoding.
+
+ This method buffers the input internally, so there is no need to use a
+ BufferedInputStream
.
+
+ Character encoding names can be found at + IANA. +
+ This method uses InputStreamReader
.
input
- the InputStream
to read fromoutput
- the Writer
to write toinputEncoding
- the encoding to use for the InputStream, null means platform defaultNullPointerException
- if the input or output is nullIOException
- if an I/O error occursUnsupportedCharsetException
- thrown instead of .UnsupportedEncodingException
in version 2.2 if the
+ encoding is not supported.public static int copy(Reader input, + Writer output) + throws IOException+
Reader
to a Writer
.
+
+ This method buffers the input internally, so there is no need to use a
+ BufferedReader
.
+
+ Large streams (over 2GB) will return a chars copied value of
+ -1
after the copy has completed since the correct
+ number of chars cannot be returned as an int. For large streams
+ use the copyLarge(Reader, Writer)
method.
input
- the Reader
to read fromoutput
- the Writer
to write toNullPointerException
- if the input or output is nullIOException
- if an I/O error occurspublic static long copyLarge(Reader input, + Writer output) + throws IOException+
Reader
to a Writer
.
+
+ This method buffers the input internally, so there is no need to use a
+ BufferedReader
.
+
+ The buffer size is given by DEFAULT_BUFFER_SIZE
.
input
- the Reader
to read fromoutput
- the Writer
to write toNullPointerException
- if the input or output is nullIOException
- if an I/O error occurspublic static long copyLarge(Reader input, + Writer output, + char[] buffer) + throws IOException+
Reader
to a Writer
.
+
+ This method uses the provided buffer, so there is no need to use a
+ BufferedReader
.
+
input
- the Reader
to read fromoutput
- the Writer
to write tobuffer
- the buffer to be used for the copyNullPointerException
- if the input or output is nullIOException
- if an I/O error occurspublic static long copyLarge(Reader input, + Writer output, + long inputOffset, + long length) + throws IOException+
InputStream
to an
+ OutputStream
, optionally skipping input chars.
+
+ This method buffers the input internally, so there is no need to use a
+ BufferedReader
.
+
+ The buffer size is given by DEFAULT_BUFFER_SIZE
.
input
- the Reader
to read fromoutput
- the Writer
to write toinputOffset
- : number of chars to skip from input before copying
+ -ve values are ignoredlength
- : number of chars to copy. -ve means allNullPointerException
- if the input or output is nullIOException
- if an I/O error occurspublic static long copyLarge(Reader input, + Writer output, + long inputOffset, + long length, + char[] buffer) + throws IOException+
InputStream
to an
+ OutputStream
, optionally skipping input chars.
+
+ This method uses the provided buffer, so there is no need to use a
+ BufferedReader
.
+
input
- the Reader
to read fromoutput
- the Writer
to write toinputOffset
- : number of chars to skip from input before copying
+ -ve values are ignoredlength
- : number of chars to copy. -ve means allbuffer
- the buffer to be used for the copyNullPointerException
- if the input or output is nullIOException
- if an I/O error occurs@Deprecated +public static void copy(Reader input, + OutputStream output) + throws IOException+
copy(Reader, OutputStream, Charset)
insteadReader
to bytes on an
+ OutputStream
using the default character encoding of the
+ platform, and calling flush.
+
+ This method buffers the input internally, so there is no need to use a
+ BufferedReader
.
+
+ Due to the implementation of OutputStreamWriter, this method performs a + flush. +
+ This method uses OutputStreamWriter
.
input
- the Reader
to read fromoutput
- the OutputStream
to write toNullPointerException
- if the input or output is nullIOException
- if an I/O error occurspublic static void copy(Reader input, + OutputStream output, + Charset outputEncoding) + throws IOException+
Reader
to bytes on an
+ OutputStream
using the specified character encoding, and
+ calling flush.
+
+ This method buffers the input internally, so there is no need to use a
+ BufferedReader
.
+
+ Due to the implementation of OutputStreamWriter, this method performs a + flush. +
+
+ This method uses OutputStreamWriter
.
+
input
- the Reader
to read fromoutput
- the OutputStream
to write tooutputEncoding
- the encoding to use for the OutputStream, null means platform defaultNullPointerException
- if the input or output is nullIOException
- if an I/O error occurspublic static void copy(Reader input, + OutputStream output, + String outputEncoding) + throws IOException+
Reader
to bytes on an
+ OutputStream
using the specified character encoding, and
+ calling flush.
+
+ This method buffers the input internally, so there is no need to use a
+ BufferedReader
.
+
+ Character encoding names can be found at + IANA. +
+ Due to the implementation of OutputStreamWriter, this method performs a + flush. +
+ This method uses OutputStreamWriter
.
input
- the Reader
to read fromoutput
- the OutputStream
to write tooutputEncoding
- the encoding to use for the OutputStream, null means platform defaultNullPointerException
- if the input or output is nullIOException
- if an I/O error occursUnsupportedCharsetException
- thrown instead of .UnsupportedEncodingException
in version 2.2 if the
+ encoding is not supported.public static boolean contentEquals(InputStream input1, + InputStream input2) + throws IOException+
+ This method buffers the input internally using
+ BufferedInputStream
if they are not already buffered.
input1
- the first streaminput2
- the second streamNullPointerException
- if either input is nullIOException
- if an I/O error occurspublic static boolean contentEquals(Reader input1, + Reader input2) + throws IOException+
+ This method buffers the input internally using
+ BufferedReader
if they are not already buffered.
input1
- the first readerinput2
- the second readerNullPointerException
- if either input is nullIOException
- if an I/O error occurspublic static boolean contentEqualsIgnoreEOL(Reader input1, + Reader input2) + throws IOException+
+ This method buffers the input internally using
+ BufferedReader
if they are not already buffered.
input1
- the first readerinput2
- the second readerNullPointerException
- if either input is nullIOException
- if an I/O error occurspublic static long skip(InputStream input, + long toSkip) + throws IOException+
InputStream
.
+
+ Note that the implementation uses InputStream.read(byte[], int, int)
rather
+ than delegating to InputStream.skip(long)
.
+ This means that the method may be considerably less efficient than using the actual skip implementation,
+ this is done to guarantee that the correct number of bytes are skipped.
+
input
- byte stream to skiptoSkip
- number of bytes to skip.IOException
- if there is a problem reading the fileIllegalArgumentException
- if toSkip is negativeInputStream.skip(long)
,
+IO-203 - Add skipFully() method for InputStreamspublic static long skip(ReadableByteChannel input, + long toSkip) + throws IOException+
input
- ReadableByteChannel to skiptoSkip
- number of bytes to skip.IOException
- if there is a problem reading the ReadableByteChannelIllegalArgumentException
- if toSkip is negativepublic static long skip(Reader input, + long toSkip) + throws IOException+
Reader
.
+
+ Note that the implementation uses Reader.read(char[], int, int)
rather
+ than delegating to Reader.skip(long)
.
+ This means that the method may be considerably less efficient than using the actual skip implementation,
+ this is done to guarantee that the correct number of characters are skipped.
+
input
- character stream to skiptoSkip
- number of characters to skip.IOException
- if there is a problem reading the fileIllegalArgumentException
- if toSkip is negativeReader.skip(long)
,
+IO-203 - Add skipFully() method for InputStreamspublic static void skipFully(InputStream input, + long toSkip) + throws IOException+
+ This allows for the possibility that InputStream.skip(long)
may
+ not skip as many bytes as requested (most likely because of reaching EOF).
+
+ Note that the implementation uses skip(InputStream, long)
.
+ This means that the method may be considerably less efficient than using the actual skip implementation,
+ this is done to guarantee that the correct number of characters are skipped.
+
input
- stream to skiptoSkip
- the number of bytes to skipIOException
- if there is a problem reading the fileIllegalArgumentException
- if toSkip is negativeEOFException
- if the number of bytes skipped was incorrectInputStream.skip(long)
public static void skipFully(ReadableByteChannel input, + long toSkip) + throws IOException+
input
- ReadableByteChannel to skiptoSkip
- the number of bytes to skipIOException
- if there is a problem reading the ReadableByteChannelIllegalArgumentException
- if toSkip is negativeEOFException
- if the number of bytes skipped was incorrectpublic static void skipFully(Reader input, + long toSkip) + throws IOException+
+ This allows for the possibility that Reader.skip(long)
may
+ not skip as many characters as requested (most likely because of reaching EOF).
+
+ Note that the implementation uses skip(Reader, long)
.
+ This means that the method may be considerably less efficient than using the actual skip implementation,
+ this is done to guarantee that the correct number of characters are skipped.
+
input
- stream to skiptoSkip
- the number of characters to skipIOException
- if there is a problem reading the fileIllegalArgumentException
- if toSkip is negativeEOFException
- if the number of characters skipped was incorrectReader.skip(long)
public static int read(Reader input, + char[] buffer, + int offset, + int length) + throws IOException+
Reader
.input
- where to read input frombuffer
- destinationoffset
- initial offset into bufferlength
- length to read, must be >= 0IOException
- if a read error occurspublic static int read(Reader input, + char[] buffer) + throws IOException+
Reader
.input
- where to read input frombuffer
- destinationIOException
- if a read error occurspublic static int read(InputStream input, + byte[] buffer, + int offset, + int length) + throws IOException+
InputStream
.input
- where to read input frombuffer
- destinationoffset
- initial offset into bufferlength
- length to read, must be >= 0IOException
- if a read error occurspublic static int read(InputStream input, + byte[] buffer) + throws IOException+
InputStream
.input
- where to read input frombuffer
- destinationIOException
- if a read error occurspublic static int read(ReadableByteChannel input, + ByteBuffer buffer) + throws IOException+
+ This implementation guarantees that it will read as many bytes
+ as possible before giving up; this may not always be the case for
+ subclasses of ReadableByteChannel
.
input
- the byte channel to readbuffer
- byte buffer destinationIOException
- if a read error occurspublic static void readFully(Reader input, + char[] buffer, + int offset, + int length) + throws IOException+
+ This allows for the possibility that Reader.read(char[], int, int)
may
+ not read as many characters as requested (most likely because of reaching EOF).
input
- where to read input frombuffer
- destinationoffset
- initial offset into bufferlength
- length to read, must be >= 0IOException
- if there is a problem reading the fileIllegalArgumentException
- if length is negativeEOFException
- if the number of characters read was incorrectpublic static void readFully(Reader input, + char[] buffer) + throws IOException+
+ This allows for the possibility that Reader.read(char[], int, int)
may
+ not read as many characters as requested (most likely because of reaching EOF).
input
- where to read input frombuffer
- destinationIOException
- if there is a problem reading the fileIllegalArgumentException
- if length is negativeEOFException
- if the number of characters read was incorrectpublic static void readFully(InputStream input, + byte[] buffer, + int offset, + int length) + throws IOException+
+ This allows for the possibility that InputStream.read(byte[], int, int)
may
+ not read as many bytes as requested (most likely because of reaching EOF).
input
- where to read input frombuffer
- destinationoffset
- initial offset into bufferlength
- length to read, must be >= 0IOException
- if there is a problem reading the fileIllegalArgumentException
- if length is negativeEOFException
- if the number of bytes read was incorrectpublic static void readFully(InputStream input, + byte[] buffer) + throws IOException+
+ This allows for the possibility that InputStream.read(byte[], int, int)
may
+ not read as many bytes as requested (most likely because of reaching EOF).
input
- where to read input frombuffer
- destinationIOException
- if there is a problem reading the fileIllegalArgumentException
- if length is negativeEOFException
- if the number of bytes read was incorrectpublic static byte[] readFully(InputStream input, + int length) + throws IOException+
+ This allows for the possibility that InputStream.read(byte[], int, int)
may
+ not read as many bytes as requested (most likely because of reaching EOF).
input
- where to read input fromlength
- length to read, must be >= 0IOException
- if there is a problem reading the fileIllegalArgumentException
- if length is negativeEOFException
- if the number of bytes read was incorrectpublic static void readFully(ReadableByteChannel input, + ByteBuffer buffer) + throws IOException+
+ This allows for the possibility that ReadableByteChannel.read(ByteBuffer)
may
+ not read as many bytes as requested (most likely because of reaching EOF).
input
- the byte channel to readbuffer
- byte buffer destinationIOException
- if there is a problem reading the fileEOFException
- if the number of bytes read was incorrectCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/LineIterator.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/LineIterator.html new file mode 100644 index 0000000..e640dd4 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/LineIterator.html @@ -0,0 +1,421 @@ + + + + + +public class LineIterator +extends Object +implements Iterator<String>+
Reader
.
+
+ LineIterator
holds a reference to an open Reader
.
+ When you have finished with the iterator you should close the reader
+ to free internal resources. This can be done by closing the reader directly,
+ or by calling the close()
or closeQuietly(LineIterator)
+ method on the iterator.
+
+ The recommended usage pattern is: +
+ LineIterator it = FileUtils.lineIterator(file, "UTF-8"); + try { + while (it.hasNext()) { + String line = it.nextLine(); + // do something with line + } + } finally { + it.close(); + } +
Constructor and Description | +
---|
LineIterator(Reader reader)
+Constructs an iterator of the lines for a
+Reader . |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+close()
+Closes the underlying
+Reader quietly. |
+
static void |
+closeQuietly(LineIterator iterator)
+Closes the iterator, handling null and ignoring exceptions.
+ |
+
boolean |
+hasNext()
+Indicates whether the
+Reader has more lines. |
+
protected boolean |
+isValidLine(String line)
+Overridable method to validate each line that is returned.
+ |
+
String |
+next()
+Returns the next line in the wrapped
+Reader . |
+
String |
+nextLine()
+Returns the next line in the wrapped
+Reader . |
+
void |
+remove()
+Unsupported.
+ |
+
public LineIterator(Reader reader) + throws IllegalArgumentException+
Reader
.reader
- the Reader
to read from, not nullIllegalArgumentException
- if the reader is nullpublic boolean hasNext()+
Reader
has more lines.
+ If there is an IOException
then close()
will
+ be called on this instance.hasNext
in interface Iterator<String>
true
if the Reader has more linesIllegalStateException
- if an IO exception occursprotected boolean isValidLine(String line)+
line
- the line that is to be validatedpublic String next()+
Reader
.next
in interface Iterator<String>
NoSuchElementException
- if there is no line to returnpublic String nextLine()+
Reader
.NoSuchElementException
- if there is no line to returnpublic void close()+
Reader
quietly.
+ This method is useful if you only want to process the first few
+ lines of a larger file. If you do not close the iterator
+ then the Reader
remains open.
+ This method can safely be called multiple times.public void remove()+
remove
in interface Iterator<String>
UnsupportedOperationException
- alwayspublic static void closeQuietly(LineIterator iterator)+
iterator
- the iterator to closeCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/TaggedIOException.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/TaggedIOException.html new file mode 100644 index 0000000..90d07a2 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/TaggedIOException.html @@ -0,0 +1,403 @@ + + + + + +public class TaggedIOException +extends IOExceptionWithCause+
IOException
decorator that adds a serializable tag to the
+ wrapped exception. Both the tag and the original exception can be used
+ to determine further processing when this exception is caught.Constructor and Description | +
---|
TaggedIOException(IOException original,
+ Serializable tag)
+Creates a tagged wrapper for the given exception.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
IOException |
+getCause()
+Returns the wrapped exception.
+ |
+
Serializable |
+getTag()
+Returns the serializable tag object.
+ |
+
static boolean |
+isTaggedWith(Throwable throwable,
+ Object tag)
+Checks whether the given throwable is tagged with the given tag.
+ |
+
static void |
+throwCauseIfTaggedWith(Throwable throwable,
+ Object tag)
+Throws the original
+IOException if the given throwable is
+ a TaggedIOException decorator the given tag. |
+
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public TaggedIOException(IOException original, + Serializable tag)+
original
- the exception to be taggedtag
- tag of this exceptionpublic static boolean isTaggedWith(Throwable throwable, + Object tag)+
+ This check can only succeed if the throwable is a
+ TaggedIOException
and the tag is Serializable
, but
+ the argument types are intentionally more generic to make it easier
+ to use this method without type casts.
+
+ A typical use for this method is in a catch
block to
+ determine how a caught exception should be handled:
+
+ Serializable tag = ...; + try { + ...; + } catch (Throwable t) { + if (TaggedIOExcepton.isTaggedWith(t, tag)) { + // special processing for tagged exception + } else { + // handling of other kinds of exceptions + } + } +
throwable
- The Throwable object to checktag
- tag objecttrue
if the throwable has the specified tag,
+ otherwise false
public static void throwCauseIfTaggedWith(Throwable throwable, + Object tag) + throws IOException+
IOException
if the given throwable is
+ a TaggedIOException
decorator the given tag. Does nothing
+ if the given throwable is of a different type or if it is tagged
+ with some other tag.
+
+ This method is typically used in a catch
block to
+ selectively rethrow tagged exceptions.
+
+ Serializable tag = ...; + try { + ...; + } catch (Throwable t) { + TaggedIOExcepton.throwCauseIfTagged(t, tag); + // handle other kinds of exceptions + } +
throwable
- an exceptiontag
- tag objectIOException
- original exception from the tagged decorator, if anypublic Serializable getTag()+
public IOException getCause()+
Throwable.getCause()
method is the narrower return type.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/ByteOrderMark.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/ByteOrderMark.html new file mode 100644 index 0000000..a44a753 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/ByteOrderMark.html @@ -0,0 +1,249 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io | +
+
+This package defines utility classes for working with streams, readers,
+writers and files.
+ |
+
org.apache.commons.io.input | +
+
+This package provides implementations of input classes, such as
+
+InputStream and Reader . |
+
Modifier and Type | +Field and Description | +
---|---|
static ByteOrderMark |
+ByteOrderMark.UTF_16BE
+UTF-16BE BOM (Big-Endian)
+ |
+
static ByteOrderMark |
+ByteOrderMark.UTF_16LE
+UTF-16LE BOM (Little-Endian)
+ |
+
static ByteOrderMark |
+ByteOrderMark.UTF_32BE
+UTF-32BE BOM (Big-Endian)
+ |
+
static ByteOrderMark |
+ByteOrderMark.UTF_32LE
+UTF-32LE BOM (Little-Endian)
+ |
+
static ByteOrderMark |
+ByteOrderMark.UTF_8
+UTF-8 BOM
+ |
+
Modifier and Type | +Method and Description | +
---|---|
ByteOrderMark |
+BOMInputStream.getBOM()
+Return the BOM (Byte Order Mark).
+ |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+BOMInputStream.hasBOM(ByteOrderMark bom)
+Indicates whether the stream contains the specified BOM.
+ |
+
Constructor and Description | +
---|
BOMInputStream(InputStream delegate,
+ boolean include,
+ ByteOrderMark... boms)
+Constructs a new BOM InputStream that detects the specified BOMs and optionally includes them.
+ |
+
BOMInputStream(InputStream delegate,
+ ByteOrderMark... boms)
+Constructs a new BOM InputStream that excludes the specified BOMs.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/Charsets.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/Charsets.html new file mode 100644 index 0000000..3fd2946 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/Charsets.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/CopyUtils.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/CopyUtils.html new file mode 100644 index 0000000..5e1a6f7 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/CopyUtils.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/DirectoryWalker.CancelException.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/DirectoryWalker.CancelException.html new file mode 100644 index 0000000..e2f947d --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/DirectoryWalker.CancelException.html @@ -0,0 +1,163 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io | +
+
+This package defines utility classes for working with streams, readers,
+writers and files.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+DirectoryWalker.handleCancelled(File startDirectory,
+ Collection<T> results,
+ DirectoryWalker.CancelException cancel)
+Overridable callback method invoked when the operation is cancelled.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/DirectoryWalker.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/DirectoryWalker.html new file mode 100644 index 0000000..69eeddb --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/DirectoryWalker.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/EndianUtils.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/EndianUtils.html new file mode 100644 index 0000000..b474075 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/EndianUtils.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/FileCleaner.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/FileCleaner.html new file mode 100644 index 0000000..9953f42 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/FileCleaner.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/FileCleaningTracker.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/FileCleaningTracker.html new file mode 100644 index 0000000..2af5c88 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/FileCleaningTracker.html @@ -0,0 +1,162 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io | +
+
+This package defines utility classes for working with streams, readers,
+writers and files.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static FileCleaningTracker |
+FileCleaner.getInstance()
+Deprecated.
+Returns the singleton instance, which is used by the deprecated, static methods.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/FileDeleteStrategy.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/FileDeleteStrategy.html new file mode 100644 index 0000000..1fc88b5 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/FileDeleteStrategy.html @@ -0,0 +1,216 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io | +
+
+This package defines utility classes for working with streams, readers,
+writers and files.
+ |
+
Modifier and Type | +Field and Description | +
---|---|
static FileDeleteStrategy |
+FileDeleteStrategy.FORCE
+The singleton instance for forced file deletion, which always deletes,
+ even if the file represents a non-empty directory.
+ |
+
static FileDeleteStrategy |
+FileDeleteStrategy.NORMAL
+The singleton instance for normal file deletion, which does not permit
+ the deletion of directories that are not empty.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+FileCleaningTracker.track(File file,
+ Object marker,
+ FileDeleteStrategy deleteStrategy)
+Track the specified file, using the provided marker, deleting the file
+ when the marker instance is garbage collected.
+ |
+
static void |
+FileCleaner.track(File file,
+ Object marker,
+ FileDeleteStrategy deleteStrategy)
+Deprecated.
+
+
+ |
+
void |
+FileCleaningTracker.track(String path,
+ Object marker,
+ FileDeleteStrategy deleteStrategy)
+Track the specified file, using the provided marker, deleting the file
+ when the marker instance is garbage collected.
+ |
+
static void |
+FileCleaner.track(String path,
+ Object marker,
+ FileDeleteStrategy deleteStrategy)
+Deprecated.
+
+
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/FileExistsException.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/FileExistsException.html new file mode 100644 index 0000000..0c852bf --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/FileExistsException.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/FileSystemUtils.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/FileSystemUtils.html new file mode 100644 index 0000000..19e53b3 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/FileSystemUtils.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/FileUtils.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/FileUtils.html new file mode 100644 index 0000000..34356e4 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/FileUtils.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/FilenameUtils.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/FilenameUtils.html new file mode 100644 index 0000000..8f321ac --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/FilenameUtils.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/HexDump.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/HexDump.html new file mode 100644 index 0000000..28e314f --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/HexDump.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/IOCase.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/IOCase.html new file mode 100644 index 0000000..fa397e1 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/IOCase.html @@ -0,0 +1,416 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io | +
+
+This package defines utility classes for working with streams, readers,
+writers and files.
+ |
+
org.apache.commons.io.comparator | +
+ This package provides various
+Comparator implementations
+for File s. |
+
org.apache.commons.io.filefilter | +
+ This package defines an interface (IOFileFilter) that combines both
+
+FileFilter and FilenameFilter . |
+
org.apache.commons.io.monitor | +
+
+This package provides a component for monitoring file system events
+(directory and file create, update and delete events).
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static IOCase |
+IOCase.forName(String name)
+Factory method to create an IOCase from a name.
+ |
+
static IOCase |
+IOCase.valueOf(String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static IOCase[] |
+IOCase.values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static boolean |
+FilenameUtils.equals(String filename1,
+ String filename2,
+ boolean normalized,
+ IOCase caseSensitivity)
+Checks whether two filenames are equal, optionally normalizing and providing
+ control over the case-sensitivity.
+ |
+
static boolean |
+FilenameUtils.wildcardMatch(String filename,
+ String wildcardMatcher,
+ IOCase caseSensitivity)
+Checks a filename to see if it matches the specified wildcard matcher
+ allowing control over case-sensitivity.
+ |
+
Constructor and Description | +
---|
ExtensionFileComparator(IOCase caseSensitivity)
+Construct a file extension comparator instance with the specified case-sensitivity.
+ |
+
NameFileComparator(IOCase caseSensitivity)
+Construct a file name comparator instance with the specified case-sensitivity.
+ |
+
PathFileComparator(IOCase caseSensitivity)
+Construct a file path comparator instance with the specified case-sensitivity.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static IOFileFilter |
+FileFilterUtils.nameFileFilter(String name,
+ IOCase caseSensitivity)
+Returns a filter that returns true if the filename matches the specified text.
+ |
+
static IOFileFilter |
+FileFilterUtils.prefixFileFilter(String prefix,
+ IOCase caseSensitivity)
+Returns a filter that returns true if the filename starts with the specified text.
+ |
+
static IOFileFilter |
+FileFilterUtils.suffixFileFilter(String suffix,
+ IOCase caseSensitivity)
+Returns a filter that returns true if the filename ends with the specified text.
+ |
+
Constructor and Description | +
---|
NameFileFilter(List<String> names,
+ IOCase caseSensitivity)
+Constructs a new name file filter for a list of names specifying case-sensitivity.
+ |
+
NameFileFilter(String[] names,
+ IOCase caseSensitivity)
+Constructs a new name file filter for an array of names specifying case-sensitivity.
+ |
+
NameFileFilter(String name,
+ IOCase caseSensitivity)
+Construct a new name file filter specifying case-sensitivity.
+ |
+
PrefixFileFilter(List<String> prefixes,
+ IOCase caseSensitivity)
+Constructs a new Prefix file filter for a list of prefixes
+ specifying case-sensitivity.
+ |
+
PrefixFileFilter(String[] prefixes,
+ IOCase caseSensitivity)
+Constructs a new Prefix file filter for any of an array of prefixes
+ specifying case-sensitivity.
+ |
+
PrefixFileFilter(String prefix,
+ IOCase caseSensitivity)
+Constructs a new Prefix file filter for a single prefix
+ specifying case-sensitivity.
+ |
+
RegexFileFilter(String pattern,
+ IOCase caseSensitivity)
+Construct a new regular expression filter with the specified flags case sensitivity.
+ |
+
SuffixFileFilter(List<String> suffixes,
+ IOCase caseSensitivity)
+Constructs a new Suffix file filter for a list of suffixes
+ specifying case-sensitivity.
+ |
+
SuffixFileFilter(String[] suffixes,
+ IOCase caseSensitivity)
+Constructs a new Suffix file filter for an array of suffixs
+ specifying case-sensitivity.
+ |
+
SuffixFileFilter(String suffix,
+ IOCase caseSensitivity)
+Constructs a new Suffix file filter for a single extension
+ specifying case-sensitivity.
+ |
+
WildcardFileFilter(List<String> wildcards,
+ IOCase caseSensitivity)
+Construct a new wildcard filter for a list of wildcards specifying case-sensitivity.
+ |
+
WildcardFileFilter(String[] wildcards,
+ IOCase caseSensitivity)
+Construct a new wildcard filter for an array of wildcards specifying case-sensitivity.
+ |
+
WildcardFileFilter(String wildcard,
+ IOCase caseSensitivity)
+Construct a new wildcard filter for a single wildcard specifying case-sensitivity.
+ |
+
Constructor and Description | +
---|
FileAlterationObserver(FileEntry rootEntry,
+ FileFilter fileFilter,
+ IOCase caseSensitivity)
+Construct an observer for the specified directory, file filter and
+ file comparator.
+ |
+
FileAlterationObserver(File directory,
+ FileFilter fileFilter,
+ IOCase caseSensitivity)
+Construct an observer for the specified directory, file filter and
+ file comparator.
+ |
+
FileAlterationObserver(String directoryName,
+ FileFilter fileFilter,
+ IOCase caseSensitivity)
+Construct an observer for the specified directory, file filter and
+ file comparator.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/IOExceptionWithCause.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/IOExceptionWithCause.html new file mode 100644 index 0000000..a6340ec --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/IOExceptionWithCause.html @@ -0,0 +1,162 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io | +
+
+This package defines utility classes for working with streams, readers,
+writers and files.
+ |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+TaggedIOException
+An
+IOException decorator that adds a serializable tag to the
+ wrapped exception. |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/IOUtils.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/IOUtils.html new file mode 100644 index 0000000..3ebfe63 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/IOUtils.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/LineIterator.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/LineIterator.html new file mode 100644 index 0000000..61722d0 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/LineIterator.html @@ -0,0 +1,205 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io | +
+
+This package defines utility classes for working with streams, readers,
+writers and files.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static LineIterator |
+FileUtils.lineIterator(File file)
+Returns an Iterator for the lines in a
+File using the default encoding for the VM. |
+
static LineIterator |
+FileUtils.lineIterator(File file,
+ String encoding)
+Returns an Iterator for the lines in a
+File . |
+
static LineIterator |
+IOUtils.lineIterator(InputStream input,
+ Charset encoding)
+Returns an Iterator for the lines in an
+InputStream , using
+ the character encoding specified (or default encoding if null). |
+
static LineIterator |
+IOUtils.lineIterator(InputStream input,
+ String encoding)
+Returns an Iterator for the lines in an
+InputStream , using
+ the character encoding specified (or default encoding if null). |
+
static LineIterator |
+IOUtils.lineIterator(Reader reader)
+Returns an Iterator for the lines in a
+Reader . |
+
Modifier and Type | +Method and Description | +
---|---|
static void |
+LineIterator.closeQuietly(LineIterator iterator)
+Closes the iterator, handling null and ignoring exceptions.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/TaggedIOException.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/TaggedIOException.html new file mode 100644 index 0000000..8eff349 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/class-use/TaggedIOException.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/CompositeFileComparator.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/CompositeFileComparator.html new file mode 100644 index 0000000..9a7c2b0 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/CompositeFileComparator.html @@ -0,0 +1,380 @@ + + + + + +public class CompositeFileComparator +extends Object +implements Serializable+
Comparator
.
+ + This comparator can be used to sort lists or arrays of files + by combining a number other comparators. +
+ Example of sorting a list of files by type (i.e. directory or file) + and then by name: +
+ CompositeFileComparator comparator = + new CompositeFileComparator( + (AbstractFileComparator) DirectoryFileComparator.DIRECTORY_COMPARATOR, + (AbstractFileComparator) NameFileComparator.NAME_COMPARATOR); + List<File> list = ... + comparator.sort(list); +
Constructor and Description | +
---|
CompositeFileComparator(Comparator<File>... delegates)
+Create a composite comparator for the set of delegate comparators.
+ |
+
CompositeFileComparator(Iterable<Comparator<File>> delegates)
+Create a composite comparator for the set of delegate comparators.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+compare(File file1,
+ File file2)
+Compare the two files using delegate comparators.
+ |
+
File[] |
+sort(File... files)
+Sort an array of files.
+ |
+
List<File> |
+sort(List<File> files)
+Sort a List of files.
+ |
+
String |
+toString()
+String representation of this file comparator.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals
public CompositeFileComparator(Comparator<File>... delegates)+
delegates
- The delegate file comparatorspublic CompositeFileComparator(Iterable<Comparator<File>> delegates)+
delegates
- The delegate file comparatorspublic int compare(File file1, + File file2)+
compare
in interface Comparator<File>
file1
- The first file to comparefile2
- The second file to comparepublic String toString()+
public File[] sort(File... files)+
+ This method uses Arrays.sort(Object[], Comparator)
+ and returns the original array.
files
- The files to sort, may be nullpublic List<File> sort(List<File> files)+
+ This method uses Collections.sort(List, Comparator)
+ and returns the original list.
files
- The files to sort, may be nullCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/DefaultFileComparator.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/DefaultFileComparator.html new file mode 100644 index 0000000..4fdae24 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/DefaultFileComparator.html @@ -0,0 +1,422 @@ + + + + + +public class DefaultFileComparator +extends Object +implements Serializable+
File.compareTo(File)
method.
+ + This comparator can be used to sort lists or arrays of files + by using the default file comparison. +
+ Example of sorting a list of files using the
+ DEFAULT_COMPARATOR
singleton instance:
+
+ List<File> list = ... + ((AbstractFileComparator) DefaultFileComparator.DEFAULT_COMPARATOR).sort(list); ++
+ Example of doing a reverse sort of an array of files using the
+ DEFAULT_REVERSE
singleton instance:
+
+ File[] array = ... + ((AbstractFileComparator) DefaultFileComparator.DEFAULT_REVERSE).sort(array); ++
Modifier and Type | +Field and Description | +
---|---|
static Comparator<File> |
+DEFAULT_COMPARATOR
+Singleton default comparator instance
+ |
+
static Comparator<File> |
+DEFAULT_REVERSE
+Singleton reverse default comparator instance
+ |
+
Constructor and Description | +
---|
DefaultFileComparator() |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+compare(File file1,
+ File file2)
+Compare the two files using the
+File.compareTo(File) method. |
+
File[] |
+sort(File... files)
+Sort an array of files.
+ |
+
List<File> |
+sort(List<File> files)
+Sort a List of files.
+ |
+
String |
+toString()
+String representation of this file comparator.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals
public static final Comparator<File> DEFAULT_COMPARATOR+
public static final Comparator<File> DEFAULT_REVERSE+
public int compare(File file1, + File file2)+
File.compareTo(File)
method.compare
in interface Comparator<File>
file1
- The first file to comparefile2
- The second file to compareFile.compareTo(File)
with file2 as the parameter.public File[] sort(File... files)+
+ This method uses Arrays.sort(Object[], Comparator)
+ and returns the original array.
files
- The files to sort, may be nullpublic List<File> sort(List<File> files)+
+ This method uses Collections.sort(List, Comparator)
+ and returns the original list.
files
- The files to sort, may be nullCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/DirectoryFileComparator.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/DirectoryFileComparator.html new file mode 100644 index 0000000..8969eae --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/DirectoryFileComparator.html @@ -0,0 +1,421 @@ + + + + + +public class DirectoryFileComparator +extends Object +implements Serializable+
File.isDirectory()
method.
+ + This comparator can be used to sort lists or arrays by directories and files. +
+ Example of sorting a list of files/directories using the
+ DIRECTORY_COMPARATOR
singleton instance:
+
+ List<File> list = ... + ((AbstractFileComparator) DirectoryFileComparator.DIRECTORY_COMPARATOR).sort(list); ++
+ Example of doing a reverse sort of an array of files/directories using the
+ DIRECTORY_REVERSE
singleton instance:
+
+ File[] array = ... + ((AbstractFileComparator) DirectoryFileComparator.DIRECTORY_REVERSE).sort(array); ++
Modifier and Type | +Field and Description | +
---|---|
static Comparator<File> |
+DIRECTORY_COMPARATOR
+Singleton default comparator instance
+ |
+
static Comparator<File> |
+DIRECTORY_REVERSE
+Singleton reverse default comparator instance
+ |
+
Constructor and Description | +
---|
DirectoryFileComparator() |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+compare(File file1,
+ File file2)
+Compare the two files using the
+File.isDirectory() method. |
+
File[] |
+sort(File... files)
+Sort an array of files.
+ |
+
List<File> |
+sort(List<File> files)
+Sort a List of files.
+ |
+
String |
+toString()
+String representation of this file comparator.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals
public static final Comparator<File> DIRECTORY_COMPARATOR+
public static final Comparator<File> DIRECTORY_REVERSE+
public DirectoryFileComparator()+
public int compare(File file1, + File file2)+
File.isDirectory()
method.compare
in interface Comparator<File>
file1
- The first file to comparefile2
- The second file to compareFile.compareTo(File)
with file2 as the parameter.public File[] sort(File... files)+
+ This method uses Arrays.sort(Object[], Comparator)
+ and returns the original array.
files
- The files to sort, may be nullpublic List<File> sort(List<File> files)+
+ This method uses Collections.sort(List, Comparator)
+ and returns the original list.
files
- The files to sort, may be nullCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/ExtensionFileComparator.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/ExtensionFileComparator.html new file mode 100644 index 0000000..3806fdc --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/ExtensionFileComparator.html @@ -0,0 +1,508 @@ + + + + + +public class ExtensionFileComparator +extends Object +implements Serializable+
FilenameUtils.getExtension(String)
).
+
+ This comparator can be used to sort lists or arrays of files
+ by their file extension either in a case-sensitive, case-insensitive or
+ system dependent case sensitive way. A number of singleton instances
+ are provided for the various case sensitivity options (using IOCase
)
+ and the reverse of those options.
+
+ Example of a case-sensitive file extension sort using the
+ EXTENSION_COMPARATOR
singleton instance:
+
+ List<File> list = ... + ((AbstractFileComparator) ExtensionFileComparator.EXTENSION_COMPARATOR).sort(list); ++
+ Example of a reverse case-insensitive file extension sort using the
+ EXTENSION_INSENSITIVE_REVERSE
singleton instance:
+
+ File[] array = ... + ((AbstractFileComparator) ExtensionFileComparator.EXTENSION_INSENSITIVE_REVERSE).sort(array); ++
Modifier and Type | +Field and Description | +
---|---|
static Comparator<File> |
+EXTENSION_COMPARATOR
+Case-sensitive extension comparator instance (see
+IOCase.SENSITIVE ) |
+
static Comparator<File> |
+EXTENSION_INSENSITIVE_COMPARATOR
+Case-insensitive extension comparator instance (see
+IOCase.INSENSITIVE ) |
+
static Comparator<File> |
+EXTENSION_INSENSITIVE_REVERSE
+Reverse case-insensitive extension comparator instance (see
+IOCase.INSENSITIVE ) |
+
static Comparator<File> |
+EXTENSION_REVERSE
+Reverse case-sensitive extension comparator instance (see
+IOCase.SENSITIVE ) |
+
static Comparator<File> |
+EXTENSION_SYSTEM_COMPARATOR
+System sensitive extension comparator instance (see
+IOCase.SYSTEM ) |
+
static Comparator<File> |
+EXTENSION_SYSTEM_REVERSE
+Reverse system sensitive path comparator instance (see
+IOCase.SYSTEM ) |
+
Constructor and Description | +
---|
ExtensionFileComparator()
+Construct a case sensitive file extension comparator instance.
+ |
+
ExtensionFileComparator(IOCase caseSensitivity)
+Construct a file extension comparator instance with the specified case-sensitivity.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+compare(File file1,
+ File file2)
+Compare the extensions of two files the specified case sensitivity.
+ |
+
File[] |
+sort(File... files)
+Sort an array of files.
+ |
+
List<File> |
+sort(List<File> files)
+Sort a List of files.
+ |
+
String |
+toString()
+String representation of this file comparator.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals
public static final Comparator<File> EXTENSION_COMPARATOR+
IOCase.SENSITIVE
)public static final Comparator<File> EXTENSION_REVERSE+
IOCase.SENSITIVE
)public static final Comparator<File> EXTENSION_INSENSITIVE_COMPARATOR+
IOCase.INSENSITIVE
)public static final Comparator<File> EXTENSION_INSENSITIVE_REVERSE+
IOCase.INSENSITIVE
)public static final Comparator<File> EXTENSION_SYSTEM_COMPARATOR+
IOCase.SYSTEM
)public static final Comparator<File> EXTENSION_SYSTEM_REVERSE+
IOCase.SYSTEM
)public ExtensionFileComparator()+
public ExtensionFileComparator(IOCase caseSensitivity)+
caseSensitivity
- how to handle case sensitivity, null means case-sensitivepublic int compare(File file1, + File file2)+
compare
in interface Comparator<File>
file1
- The first file to comparefile2
- The second file to comparepublic String toString()+
public File[] sort(File... files)+
+ This method uses Arrays.sort(Object[], Comparator)
+ and returns the original array.
files
- The files to sort, may be nullpublic List<File> sort(List<File> files)+
+ This method uses Collections.sort(List, Comparator)
+ and returns the original list.
files
- The files to sort, may be nullCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/LastModifiedFileComparator.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/LastModifiedFileComparator.html new file mode 100644 index 0000000..677a3f0 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/LastModifiedFileComparator.html @@ -0,0 +1,425 @@ + + + + + +public class LastModifiedFileComparator +extends Object +implements Serializable+
File.lastModified()
).
+ + This comparator can be used to sort lists or arrays of files + by their last modified date/time. +
+ Example of sorting a list of files using the
+ LASTMODIFIED_COMPARATOR
singleton instance:
+
+ List<File> list = ... + ((AbstractFileComparator) LastModifiedFileComparator.LASTMODIFIED_COMPARATOR).sort(list); ++
+ Example of doing a reverse sort of an array of files using the
+ LASTMODIFIED_REVERSE
singleton instance:
+
+ File[] array = ... + ((AbstractFileComparator) LastModifiedFileComparator.LASTMODIFIED_REVERSE).sort(array); ++
Modifier and Type | +Field and Description | +
---|---|
static Comparator<File> |
+LASTMODIFIED_COMPARATOR
+Last modified comparator instance
+ |
+
static Comparator<File> |
+LASTMODIFIED_REVERSE
+Reverse last modified comparator instance
+ |
+
Constructor and Description | +
---|
LastModifiedFileComparator() |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+compare(File file1,
+ File file2)
+Compare the last the last modified date/time of two files.
+ |
+
File[] |
+sort(File... files)
+Sort an array of files.
+ |
+
List<File> |
+sort(List<File> files)
+Sort a List of files.
+ |
+
String |
+toString()
+String representation of this file comparator.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals
public static final Comparator<File> LASTMODIFIED_COMPARATOR+
public static final Comparator<File> LASTMODIFIED_REVERSE+
public LastModifiedFileComparator()+
public int compare(File file1, + File file2)+
compare
in interface Comparator<File>
file1
- The first file to comparefile2
- The second file to comparepublic File[] sort(File... files)+
+ This method uses Arrays.sort(Object[], Comparator)
+ and returns the original array.
files
- The files to sort, may be nullpublic List<File> sort(List<File> files)+
+ This method uses Collections.sort(List, Comparator)
+ and returns the original list.
files
- The files to sort, may be nullCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/NameFileComparator.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/NameFileComparator.html new file mode 100644 index 0000000..d201855 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/NameFileComparator.html @@ -0,0 +1,507 @@ + + + + + +public class NameFileComparator +extends Object +implements Serializable+
File.getName()
).
+
+ This comparator can be used to sort lists or arrays of files
+ by their name either in a case-sensitive, case-insensitive or
+ system dependent case sensitive way. A number of singleton instances
+ are provided for the various case sensitivity options (using IOCase
)
+ and the reverse of those options.
+
+ Example of a case-sensitive file name sort using the
+ NAME_COMPARATOR
singleton instance:
+
+ List<File> list = ... + ((AbstractFileComparator) NameFileComparator.NAME_COMPARATOR).sort(list); ++
+ Example of a reverse case-insensitive file name sort using the
+ NAME_INSENSITIVE_REVERSE
singleton instance:
+
+ File[] array = ... + ((AbstractFileComparator) NameFileComparator.NAME_INSENSITIVE_REVERSE).sort(array); ++
Modifier and Type | +Field and Description | +
---|---|
static Comparator<File> |
+NAME_COMPARATOR
+Case-sensitive name comparator instance (see
+IOCase.SENSITIVE ) |
+
static Comparator<File> |
+NAME_INSENSITIVE_COMPARATOR
+Case-insensitive name comparator instance (see
+IOCase.INSENSITIVE ) |
+
static Comparator<File> |
+NAME_INSENSITIVE_REVERSE
+Reverse case-insensitive name comparator instance (see
+IOCase.INSENSITIVE ) |
+
static Comparator<File> |
+NAME_REVERSE
+Reverse case-sensitive name comparator instance (see
+IOCase.SENSITIVE ) |
+
static Comparator<File> |
+NAME_SYSTEM_COMPARATOR
+System sensitive name comparator instance (see
+IOCase.SYSTEM ) |
+
static Comparator<File> |
+NAME_SYSTEM_REVERSE
+Reverse system sensitive name comparator instance (see
+IOCase.SYSTEM ) |
+
Constructor and Description | +
---|
NameFileComparator()
+Construct a case sensitive file name comparator instance.
+ |
+
NameFileComparator(IOCase caseSensitivity)
+Construct a file name comparator instance with the specified case-sensitivity.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+compare(File file1,
+ File file2)
+Compare the names of two files with the specified case sensitivity.
+ |
+
File[] |
+sort(File... files)
+Sort an array of files.
+ |
+
List<File> |
+sort(List<File> files)
+Sort a List of files.
+ |
+
String |
+toString()
+String representation of this file comparator.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals
public static final Comparator<File> NAME_COMPARATOR+
IOCase.SENSITIVE
)public static final Comparator<File> NAME_REVERSE+
IOCase.SENSITIVE
)public static final Comparator<File> NAME_INSENSITIVE_COMPARATOR+
IOCase.INSENSITIVE
)public static final Comparator<File> NAME_INSENSITIVE_REVERSE+
IOCase.INSENSITIVE
)public static final Comparator<File> NAME_SYSTEM_COMPARATOR+
IOCase.SYSTEM
)public static final Comparator<File> NAME_SYSTEM_REVERSE+
IOCase.SYSTEM
)public NameFileComparator()+
public NameFileComparator(IOCase caseSensitivity)+
caseSensitivity
- how to handle case sensitivity, null means case-sensitivepublic int compare(File file1, + File file2)+
compare
in interface Comparator<File>
file1
- The first file to comparefile2
- The second file to comparepublic String toString()+
public File[] sort(File... files)+
+ This method uses Arrays.sort(Object[], Comparator)
+ and returns the original array.
files
- The files to sort, may be nullpublic List<File> sort(List<File> files)+
+ This method uses Collections.sort(List, Comparator)
+ and returns the original list.
files
- The files to sort, may be nullCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/PathFileComparator.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/PathFileComparator.html new file mode 100644 index 0000000..e3464f7 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/PathFileComparator.html @@ -0,0 +1,507 @@ + + + + + +public class PathFileComparator +extends Object +implements Serializable+
File.getPath()
).
+
+ This comparator can be used to sort lists or arrays of files
+ by their path either in a case-sensitive, case-insensitive or
+ system dependent case sensitive way. A number of singleton instances
+ are provided for the various case sensitivity options (using IOCase
)
+ and the reverse of those options.
+
+ Example of a case-sensitive file path sort using the
+ PATH_COMPARATOR
singleton instance:
+
+ List<File> list = ... + ((AbstractFileComparator) PathFileComparator.PATH_COMPARATOR).sort(list); ++
+ Example of a reverse case-insensitive file path sort using the
+ PATH_INSENSITIVE_REVERSE
singleton instance:
+
+ File[] array = ... + ((AbstractFileComparator) PathFileComparator.PATH_INSENSITIVE_REVERSE).sort(array); ++
Modifier and Type | +Field and Description | +
---|---|
static Comparator<File> |
+PATH_COMPARATOR
+Case-sensitive path comparator instance (see
+IOCase.SENSITIVE ) |
+
static Comparator<File> |
+PATH_INSENSITIVE_COMPARATOR
+Case-insensitive path comparator instance (see
+IOCase.INSENSITIVE ) |
+
static Comparator<File> |
+PATH_INSENSITIVE_REVERSE
+Reverse case-insensitive path comparator instance (see
+IOCase.INSENSITIVE ) |
+
static Comparator<File> |
+PATH_REVERSE
+Reverse case-sensitive path comparator instance (see
+IOCase.SENSITIVE ) |
+
static Comparator<File> |
+PATH_SYSTEM_COMPARATOR
+System sensitive path comparator instance (see
+IOCase.SYSTEM ) |
+
static Comparator<File> |
+PATH_SYSTEM_REVERSE
+Reverse system sensitive path comparator instance (see
+IOCase.SYSTEM ) |
+
Constructor and Description | +
---|
PathFileComparator()
+Construct a case sensitive file path comparator instance.
+ |
+
PathFileComparator(IOCase caseSensitivity)
+Construct a file path comparator instance with the specified case-sensitivity.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+compare(File file1,
+ File file2)
+Compare the paths of two files the specified case sensitivity.
+ |
+
File[] |
+sort(File... files)
+Sort an array of files.
+ |
+
List<File> |
+sort(List<File> files)
+Sort a List of files.
+ |
+
String |
+toString()
+String representation of this file comparator.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals
public static final Comparator<File> PATH_COMPARATOR+
IOCase.SENSITIVE
)public static final Comparator<File> PATH_REVERSE+
IOCase.SENSITIVE
)public static final Comparator<File> PATH_INSENSITIVE_COMPARATOR+
IOCase.INSENSITIVE
)public static final Comparator<File> PATH_INSENSITIVE_REVERSE+
IOCase.INSENSITIVE
)public static final Comparator<File> PATH_SYSTEM_COMPARATOR+
IOCase.SYSTEM
)public static final Comparator<File> PATH_SYSTEM_REVERSE+
IOCase.SYSTEM
)public PathFileComparator()+
public PathFileComparator(IOCase caseSensitivity)+
caseSensitivity
- how to handle case sensitivity, null means case-sensitivepublic int compare(File file1, + File file2)+
compare
in interface Comparator<File>
file1
- The first file to comparefile2
- The second file to comparepublic String toString()+
public File[] sort(File... files)+
+ This method uses Arrays.sort(Object[], Comparator)
+ and returns the original array.
files
- The files to sort, may be nullpublic List<File> sort(List<File> files)+
+ This method uses Collections.sort(List, Comparator)
+ and returns the original list.
files
- The files to sort, may be nullCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/SizeFileComparator.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/SizeFileComparator.html new file mode 100644 index 0000000..652c7cf --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/SizeFileComparator.html @@ -0,0 +1,486 @@ + + + + + +public class SizeFileComparator +extends Object +implements Serializable+
File.length()
and FileUtils.sizeOfDirectory(File)
).
+ + This comparator can be used to sort lists or arrays of files + by their length/size. +
+ Example of sorting a list of files using the
+ SIZE_COMPARATOR
singleton instance:
+
+ List<File> list = ... + ((AbstractFileComparator) SizeFileComparator.SIZE_COMPARATOR).sort(list); ++
+ Example of doing a reverse sort of an array of files using the
+ SIZE_REVERSE
singleton instance:
+
+ File[] array = ... + ((AbstractFileComparator) SizeFileComparator.SIZE_REVERSE).sort(array); ++
+ N.B. Directories are treated as zero size unless
+ sumDirectoryContents
is true
.
Modifier and Type | +Field and Description | +
---|---|
static Comparator<File> |
+SIZE_COMPARATOR
+Size comparator instance - directories are treated as zero size
+ |
+
static Comparator<File> |
+SIZE_REVERSE
+Reverse size comparator instance - directories are treated as zero size
+ |
+
static Comparator<File> |
+SIZE_SUMDIR_COMPARATOR
+Size comparator instance which sums the size of a directory's contents
+ using
+FileUtils.sizeOfDirectory(File) |
+
static Comparator<File> |
+SIZE_SUMDIR_REVERSE
+Reverse size comparator instance which sums the size of a directory's contents
+ using
+FileUtils.sizeOfDirectory(File) |
+
Constructor and Description | +
---|
SizeFileComparator()
+Construct a file size comparator instance (directories treated as zero size).
+ |
+
SizeFileComparator(boolean sumDirectoryContents)
+Construct a file size comparator instance specifying whether the size of
+ the directory contents should be aggregated.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+compare(File file1,
+ File file2)
+Compare the length of two files.
+ |
+
File[] |
+sort(File... files)
+Sort an array of files.
+ |
+
List<File> |
+sort(List<File> files)
+Sort a List of files.
+ |
+
String |
+toString()
+String representation of this file comparator.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals
public static final Comparator<File> SIZE_COMPARATOR+
public static final Comparator<File> SIZE_REVERSE+
public static final Comparator<File> SIZE_SUMDIR_COMPARATOR+
FileUtils.sizeOfDirectory(File)
public static final Comparator<File> SIZE_SUMDIR_REVERSE+
FileUtils.sizeOfDirectory(File)
public SizeFileComparator()+
public SizeFileComparator(boolean sumDirectoryContents)+
+ If the sumDirectoryContents
is true
The size of
+ directories is calculated using FileUtils.sizeOfDirectory(File)
.
sumDirectoryContents
- true
if the sum of the directoryies contents
+ should be calculated, otherwise false
if directories should be treated
+ as size zero (see FileUtils.sizeOfDirectory(File)
).public int compare(File file1, + File file2)+
compare
in interface Comparator<File>
file1
- The first file to comparefile2
- The second file to comparepublic String toString()+
public File[] sort(File... files)+
+ This method uses Arrays.sort(Object[], Comparator)
+ and returns the original array.
files
- The files to sort, may be nullpublic List<File> sort(List<File> files)+
+ This method uses Collections.sort(List, Comparator)
+ and returns the original list.
files
- The files to sort, may be nullCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/class-use/CompositeFileComparator.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/class-use/CompositeFileComparator.html new file mode 100644 index 0000000..c3222d5 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/class-use/CompositeFileComparator.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/class-use/DefaultFileComparator.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/class-use/DefaultFileComparator.html new file mode 100644 index 0000000..85b67e1 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/class-use/DefaultFileComparator.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/class-use/DirectoryFileComparator.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/class-use/DirectoryFileComparator.html new file mode 100644 index 0000000..86a37e3 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/class-use/DirectoryFileComparator.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/class-use/ExtensionFileComparator.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/class-use/ExtensionFileComparator.html new file mode 100644 index 0000000..2964be6 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/class-use/ExtensionFileComparator.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/class-use/LastModifiedFileComparator.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/class-use/LastModifiedFileComparator.html new file mode 100644 index 0000000..4797665 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/class-use/LastModifiedFileComparator.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/class-use/NameFileComparator.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/class-use/NameFileComparator.html new file mode 100644 index 0000000..c56e28c --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/class-use/NameFileComparator.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/class-use/PathFileComparator.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/class-use/PathFileComparator.html new file mode 100644 index 0000000..8d6d045 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/class-use/PathFileComparator.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/class-use/SizeFileComparator.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/class-use/SizeFileComparator.html new file mode 100644 index 0000000..4acbc13 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/class-use/SizeFileComparator.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/package-frame.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/package-frame.html new file mode 100644 index 0000000..48570e6 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/package-frame.html @@ -0,0 +1,25 @@ + + + + + +Comparator
implementations
+for File
s.See: Description
+Class | +Description | +
---|---|
CompositeFileComparator | +
+ Compare two files using a set of delegate file
+Comparator . |
+
DefaultFileComparator | +
+ Compare two files using the default
+File.compareTo(File) method. |
+
DirectoryFileComparator | +
+ Compare two files using the
+File.isDirectory() method. |
+
ExtensionFileComparator | +
+ Compare the file name extensions for order
+ (see
+FilenameUtils.getExtension(String) ). |
+
LastModifiedFileComparator | +
+ Compare the last modified date/time of two files for order
+ (see
+File.lastModified() ). |
+
NameFileComparator | +
+ Compare the names of two files for order (see
+File.getName() ). |
+
PathFileComparator | +
+ Compare the path of two files for order (see
+File.getPath() ). |
+
SizeFileComparator | +
+ Compare the length/size of two files for order (see
+
+File.length() and FileUtils.sizeOfDirectory(File) ). |
+
This package provides various Comparator
implementations
+for File
s.
+
+ All the compartors include convenience utility sort(File...)
and
+ sort(List)
methods.
+
+ For example, to sort the files in a directory by name: +
++ File[] files = dir.listFiles(); + NameFileComparator.NAME_COMPARATOR.sort(files); ++
+ ...alternatively you can do this in one line: +
++
+ File[] files = NameFileComparator.NAME_COMPARATOR.sort(dir.listFiles()); ++ + +
+ The CompositeFileComparator can be used + to compare (and sort lists or arrays of files) by combining a number other comparators. +
++ For example, to sort an array of files by type (i.e. directory or file) + and then by name: +
++
+ CompositeFileComparator comparator = + new CompositeFileComparator( + DirectoryFileComparator.DIRECTORY_COMPARATOR, + NameFileComparator.NAME_COMPARATOR); + File[] files = dir.listFiles(); + comparator.sort(files); ++ + +
+ The Comparator
implementations have some convenience
+ singleton(thread-safe) instances ready to use:
+
File.compareTo(File)
method.
+ File.compareTo(File)
method.
+ File.isDirectory()
method (directories < files).
+ File.isDirectory()
method (directories > files).
+ FilenameUtils.getExtension(String)
method.
+ FilenameUtils.getExtension(String)
method.
+ FilenameUtils.getExtension(String)
method.
+ FilenameUtils.getExtension(String)
method.
+ FilenameUtils.getExtension(String)
method.
+ FilenameUtils.getExtension(String)
method.
+ File.lastModified()
method.
+ File.lastModified()
method.
+ File.getName()
method.
+ File.getName()
method.
+ File.getName()
method.
+ File.getName()
method.
+ File.getName()
method.
+ File.getName()
method.
+ File.getPath()
method.
+ File.getPath()
method.
+ File.getPath()
method.
+ File.getPath()
method.
+ File.getPath()
method.
+ File.getPath()
method.
+ File.length()
method (directories treated as zero length).
+ File.length()
method (directories treated as zero length).
+ FileUtils.sizeOfDirectory(File)
method
+ (sums the size of a directory's contents).
+ FileUtils.sizeOfDirectory(File)
method
+ (sums the size of a directory's contents).
+ Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/package-tree.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/package-tree.html new file mode 100644 index 0000000..3eb671b --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/package-tree.html @@ -0,0 +1,135 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/package-use.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/package-use.html new file mode 100644 index 0000000..8058348 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/comparator/package-use.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/AbstractFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/AbstractFileFilter.html new file mode 100644 index 0000000..b53c303 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/AbstractFileFilter.html @@ -0,0 +1,329 @@ + + + + + +public abstract class AbstractFileFilter +extends Object +implements IOFileFilter+
+ Note that a subclass must override one of the accept methods, + otherwise your class will infinitely loop.
Constructor and Description | +
---|
AbstractFileFilter() |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+accept(File file)
+Checks to see if the File should be accepted by this filter.
+ |
+
boolean |
+accept(File dir,
+ String name)
+Checks to see if the File should be accepted by this filter.
+ |
+
String |
+toString()
+Provide a String representaion of this file filter.
+ |
+
public boolean accept(File file)+
accept
in interface FileFilter
accept
in interface IOFileFilter
file
- the File to checkpublic boolean accept(File dir, + String name)+
accept
in interface FilenameFilter
accept
in interface IOFileFilter
dir
- the directory File to checkname
- the filename within the directory to checkCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/AgeFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/AgeFileFilter.html new file mode 100644 index 0000000..1ba3200 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/AgeFileFilter.html @@ -0,0 +1,447 @@ + + + + + +public class AgeFileFilter +extends AbstractFileFilter +implements Serializable+
+ For example, to print all files and directories in the + current directory older than one day: + +
+ File dir = new File("."); + // We are interested in files older than one day + long cutoff = System.currentTimeMillis() - (24 * 60 * 60 * 1000); + String[] files = dir.list( new AgeFileFilter(cutoff) ); + for ( int i = 0; i < files.length; i++ ) { + System.out.println(files[i]); + } +
FileFilterUtils.ageFileFilter(Date)
,
+FileFilterUtils.ageFileFilter(File)
,
+FileFilterUtils.ageFileFilter(long)
,
+FileFilterUtils.ageFileFilter(Date, boolean)
,
+FileFilterUtils.ageFileFilter(File, boolean)
,
+FileFilterUtils.ageFileFilter(long, boolean)
,
+Serialized FormConstructor and Description | +
---|
AgeFileFilter(Date cutoffDate)
+Constructs a new age file filter for files older than (at or before)
+ a certain cutoff date.
+ |
+
AgeFileFilter(Date cutoffDate,
+ boolean acceptOlder)
+Constructs a new age file filter for files on any one side
+ of a certain cutoff date.
+ |
+
AgeFileFilter(File cutoffReference)
+Constructs a new age file filter for files older than (at or before)
+ a certain File (whose last modification time will be used as reference).
+ |
+
AgeFileFilter(File cutoffReference,
+ boolean acceptOlder)
+Constructs a new age file filter for files on any one side
+ of a certain File (whose last modification time will be used as
+ reference).
+ |
+
AgeFileFilter(long cutoff)
+Constructs a new age file filter for files equal to or older than
+ a certain cutoff
+ |
+
AgeFileFilter(long cutoff,
+ boolean acceptOlder)
+Constructs a new age file filter for files on any one side
+ of a certain cutoff.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+accept(File file)
+Checks to see if the last modification of the file matches cutoff
+ favorably.
+ |
+
String |
+toString()
+Provide a String representaion of this file filter.
+ |
+
accept
public AgeFileFilter(long cutoff)+
cutoff
- the threshold age of the filespublic AgeFileFilter(long cutoff, + boolean acceptOlder)+
cutoff
- the threshold age of the filesacceptOlder
- if true, older files (at or before the cutoff)
+ are accepted, else newer ones (after the cutoff).public AgeFileFilter(Date cutoffDate)+
cutoffDate
- the threshold age of the filespublic AgeFileFilter(Date cutoffDate, + boolean acceptOlder)+
cutoffDate
- the threshold age of the filesacceptOlder
- if true, older files (at or before the cutoff)
+ are accepted, else newer ones (after the cutoff).public AgeFileFilter(File cutoffReference)+
cutoffReference
- the file whose last modification
+ time is usesd as the threshold age of the filespublic AgeFileFilter(File cutoffReference, + boolean acceptOlder)+
cutoffReference
- the file whose last modification
+ time is usesd as the threshold age of the filesacceptOlder
- if true, older files (at or before the cutoff)
+ are accepted, else newer ones (after the cutoff).public boolean accept(File file)+
+ If last modification time equals cutoff and newer files are required, + file IS NOT selected. + If last modification time equals cutoff and older files are required, + file IS selected.
accept
in interface FileFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the File to checkpublic String toString()+
toString
in class AbstractFileFilter
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/AndFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/AndFileFilter.html new file mode 100644 index 0000000..e6a7e13 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/AndFileFilter.html @@ -0,0 +1,466 @@ + + + + + +public class AndFileFilter +extends AbstractFileFilter +implements ConditionalFileFilter, Serializable+
FileFilter
providing conditional AND logic across a list of
+ file filters. This filter returns true
if all filters in the
+ list return true
. Otherwise, it returns false
.
+ Checking of the file filter list stops when the first filter returns
+ false
.FileFilterUtils.and(IOFileFilter...)
,
+Serialized FormConstructor and Description | +
---|
AndFileFilter()
+Constructs a new instance of
+AndFileFilter . |
+
AndFileFilter(IOFileFilter filter1,
+ IOFileFilter filter2)
+Constructs a new file filter that ANDs the result of two other filters.
+ |
+
AndFileFilter(List<IOFileFilter> fileFilters)
+Constructs a new instance of
+AndFileFilter
+ with the specified list of filters. |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+accept(File file)
+Checks to see if the File should be accepted by this filter.
+ |
+
boolean |
+accept(File file,
+ String name)
+Checks to see if the File should be accepted by this filter.
+ |
+
void |
+addFileFilter(IOFileFilter ioFileFilter)
+Adds the specified file filter to the list of file filters at the end of
+ the list.
+ |
+
List<IOFileFilter> |
+getFileFilters()
+Returns this conditional file filter's list of file filters.
+ |
+
boolean |
+removeFileFilter(IOFileFilter ioFileFilter)
+Removes the specified file filter.
+ |
+
void |
+setFileFilters(List<IOFileFilter> fileFilters)
+Sets the list of file filters, replacing any previously configured
+ file filters on this filter.
+ |
+
String |
+toString()
+Provide a String representaion of this file filter.
+ |
+
public AndFileFilter()+
AndFileFilter
.public AndFileFilter(List<IOFileFilter> fileFilters)+
AndFileFilter
+ with the specified list of filters.fileFilters
- a List of IOFileFilter instances, copied, null ignoredpublic AndFileFilter(IOFileFilter filter1, + IOFileFilter filter2)+
filter1
- the first filter, must not be nullfilter2
- the second filter, must not be nullIllegalArgumentException
- if either filter is nullpublic void addFileFilter(IOFileFilter ioFileFilter)+
addFileFilter
in interface ConditionalFileFilter
ioFileFilter
- the filter to be addedpublic List<IOFileFilter> getFileFilters()+
getFileFilters
in interface ConditionalFileFilter
public boolean removeFileFilter(IOFileFilter ioFileFilter)+
removeFileFilter
in interface ConditionalFileFilter
ioFileFilter
- filter to be removedtrue
if the filter was found in the list,
+ false
otherwisepublic void setFileFilters(List<IOFileFilter> fileFilters)+
setFileFilters
in interface ConditionalFileFilter
fileFilters
- the list of filterspublic boolean accept(File file)+
accept
in interface FileFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the File to checkpublic boolean accept(File file, + String name)+
accept
in interface FilenameFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the directory File to checkname
- the filename within the directory to checkpublic String toString()+
toString
in class AbstractFileFilter
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/CanReadFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/CanReadFileFilter.html new file mode 100644 index 0000000..fe7b006 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/CanReadFileFilter.html @@ -0,0 +1,403 @@ + + + + + +public class CanReadFileFilter +extends AbstractFileFilter +implements Serializable+
File
s that can be read.
+ + Example, showing how to print out a list of the + current directory's readable files: + +
+ File dir = new File("."); + String[] files = dir.list( CanReadFileFilter.CAN_READ ); + for ( int i = 0; i < files.length; i++ ) { + System.out.println(files[i]); + } ++ +
+ Example, showing how to print out a list of the + current directory's un-readable files: + +
+ File dir = new File("."); + String[] files = dir.list( CanReadFileFilter.CANNOT_READ ); + for ( int i = 0; i < files.length; i++ ) { + System.out.println(files[i]); + } ++ +
+ Example, showing how to print out a list of the + current directory's read-only files: + +
+ File dir = new File("."); + String[] files = dir.list( CanReadFileFilter.READ_ONLY ); + for ( int i = 0; i < files.length; i++ ) { + System.out.println(files[i]); + } +
Modifier and Type | +Field and Description | +
---|---|
static IOFileFilter |
+CAN_READ
+Singleton instance of readable filter
+ |
+
static IOFileFilter |
+CANNOT_READ
+Singleton instance of not readable filter
+ |
+
static IOFileFilter |
+READ_ONLY
+Singleton instance of read-only filter
+ |
+
Modifier | +Constructor and Description | +
---|---|
protected |
+CanReadFileFilter()
+Restrictive consructor.
+ |
+
public static final IOFileFilter CAN_READ+
public static final IOFileFilter CANNOT_READ+
public static final IOFileFilter READ_ONLY+
protected CanReadFileFilter()+
public boolean accept(File file)+
accept
in interface FileFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the File to check.true
if the file can be
+ read, otherwise false
.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/CanWriteFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/CanWriteFileFilter.html new file mode 100644 index 0000000..250097d --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/CanWriteFileFilter.html @@ -0,0 +1,379 @@ + + + + + +public class CanWriteFileFilter +extends AbstractFileFilter +implements Serializable+
File
s that can be written to.
+ + Example, showing how to print out a list of the + current directory's writable files: + +
+ File dir = new File("."); + String[] files = dir.list( CanWriteFileFilter.CAN_WRITE ); + for ( int i = 0; i < files.length; i++ ) { + System.out.println(files[i]); + } ++ +
+ Example, showing how to print out a list of the + current directory's un-writable files: + +
+ File dir = new File("."); + String[] files = dir.list( CanWriteFileFilter.CANNOT_WRITE ); + for ( int i = 0; i < files.length; i++ ) { + System.out.println(files[i]); + } ++ +
+ N.B. For read-only files, use
+ CanReadFileFilter.READ_ONLY
.
Modifier and Type | +Field and Description | +
---|---|
static IOFileFilter |
+CAN_WRITE
+Singleton instance of writable filter
+ |
+
static IOFileFilter |
+CANNOT_WRITE
+Singleton instance of not writable filter
+ |
+
Modifier | +Constructor and Description | +
---|---|
protected |
+CanWriteFileFilter()
+Restrictive consructor.
+ |
+
public static final IOFileFilter CAN_WRITE+
public static final IOFileFilter CANNOT_WRITE+
protected CanWriteFileFilter()+
public boolean accept(File file)+
accept
in interface FileFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the File to checktrue
if the file can be
+ written to, otherwise false
.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/ConditionalFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/ConditionalFileFilter.html new file mode 100644 index 0000000..d919c0f --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/ConditionalFileFilter.html @@ -0,0 +1,280 @@ + + + + + +public interface ConditionalFileFilter
+Modifier and Type | +Method and Description | +
---|---|
void |
+addFileFilter(IOFileFilter ioFileFilter)
+Adds the specified file filter to the list of file filters at the end of
+ the list.
+ |
+
List<IOFileFilter> |
+getFileFilters()
+Returns this conditional file filter's list of file filters.
+ |
+
boolean |
+removeFileFilter(IOFileFilter ioFileFilter)
+Removes the specified file filter.
+ |
+
void |
+setFileFilters(List<IOFileFilter> fileFilters)
+Sets the list of file filters, replacing any previously configured
+ file filters on this filter.
+ |
+
void addFileFilter(IOFileFilter ioFileFilter)+
ioFileFilter
- the filter to be addedList<IOFileFilter> getFileFilters()+
boolean removeFileFilter(IOFileFilter ioFileFilter)+
ioFileFilter
- filter to be removedtrue
if the filter was found in the list,
+ false
otherwisevoid setFileFilters(List<IOFileFilter> fileFilters)+
fileFilters
- the list of filtersCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/DelegateFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/DelegateFileFilter.html new file mode 100644 index 0000000..ed94394 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/DelegateFileFilter.html @@ -0,0 +1,353 @@ + + + + + +public class DelegateFileFilter +extends AbstractFileFilter +implements Serializable+
FileFilterUtils.asFileFilter(FileFilter)
,
+FileFilterUtils.asFileFilter(FilenameFilter)
,
+Serialized FormConstructor and Description | +
---|
DelegateFileFilter(FileFilter filter)
+Constructs a delegate file filter around an existing FileFilter.
+ |
+
DelegateFileFilter(FilenameFilter filter)
+Constructs a delegate file filter around an existing FilenameFilter.
+ |
+
public DelegateFileFilter(FilenameFilter filter)+
filter
- the filter to decoratepublic DelegateFileFilter(FileFilter filter)+
filter
- the filter to decoratepublic boolean accept(File file)+
accept
in interface FileFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the file to checkpublic boolean accept(File dir, + String name)+
accept
in interface FilenameFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
dir
- the directoryname
- the filename in the directorypublic String toString()+
toString
in class AbstractFileFilter
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/DirectoryFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/DirectoryFileFilter.html new file mode 100644 index 0000000..ddcec4b --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/DirectoryFileFilter.html @@ -0,0 +1,368 @@ + + + + + +public class DirectoryFileFilter +extends AbstractFileFilter +implements Serializable+
File
s that are directories.
+ + For example, here is how to print out a list of the + current directory's subdirectories: + +
+ File dir = new File("."); + String[] files = dir.list( DirectoryFileFilter.INSTANCE ); + for ( int i = 0; i < files.length; i++ ) { + System.out.println(files[i]); + } +
FileFilterUtils.directoryFileFilter()
,
+Serialized FormModifier and Type | +Field and Description | +
---|---|
static IOFileFilter |
+DIRECTORY
+Singleton instance of directory filter.
+ |
+
static IOFileFilter |
+INSTANCE
+Singleton instance of directory filter.
+ |
+
Modifier | +Constructor and Description | +
---|---|
protected |
+DirectoryFileFilter()
+Restrictive consructor.
+ |
+
public static final IOFileFilter DIRECTORY+
public static final IOFileFilter INSTANCE+
protected DirectoryFileFilter()+
public boolean accept(File file)+
accept
in interface FileFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the File to checkCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/EmptyFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/EmptyFileFilter.html new file mode 100644 index 0000000..21cd2d9 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/EmptyFileFilter.html @@ -0,0 +1,378 @@ + + + + + +public class EmptyFileFilter +extends AbstractFileFilter +implements Serializable+
+ If the File
is a directory it checks that
+ it contains no files.
+
+ Example, showing how to print out a list of the + current directory's empty files/directories: + +
+ File dir = new File("."); + String[] files = dir.list( EmptyFileFilter.EMPTY ); + for ( int i = 0; i < files.length; i++ ) { + System.out.println(files[i]); + } ++ +
+ Example, showing how to print out a list of the + current directory's non-empty files/directories: + +
+ File dir = new File("."); + String[] files = dir.list( EmptyFileFilter.NOT_EMPTY ); + for ( int i = 0; i < files.length; i++ ) { + System.out.println(files[i]); + } +
Modifier and Type | +Field and Description | +
---|---|
static IOFileFilter |
+EMPTY
+Singleton instance of empty filter
+ |
+
static IOFileFilter |
+NOT_EMPTY
+Singleton instance of not-empty filter
+ |
+
Modifier | +Constructor and Description | +
---|---|
protected |
+EmptyFileFilter()
+Restrictive consructor.
+ |
+
public static final IOFileFilter EMPTY+
public static final IOFileFilter NOT_EMPTY+
protected EmptyFileFilter()+
public boolean accept(File file)+
accept
in interface FileFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the file or directory to checktrue
if the file or directory
+ is empty, otherwise false
.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/FalseFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/FalseFileFilter.html new file mode 100644 index 0000000..dc8dbb0 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/FalseFileFilter.html @@ -0,0 +1,368 @@ + + + + + +public class FalseFileFilter +extends Object +implements IOFileFilter, Serializable+
FileFilterUtils.falseFileFilter()
,
+Serialized FormModifier and Type | +Field and Description | +
---|---|
static IOFileFilter |
+FALSE
+Singleton instance of false filter.
+ |
+
static IOFileFilter |
+INSTANCE
+Singleton instance of false filter.
+ |
+
Modifier | +Constructor and Description | +
---|---|
protected |
+FalseFileFilter()
+Restrictive consructor.
+ |
+
public static final IOFileFilter FALSE+
public static final IOFileFilter INSTANCE+
protected FalseFileFilter()+
public boolean accept(File file)+
accept
in interface FileFilter
accept
in interface IOFileFilter
file
- the file to check (ignored)public boolean accept(File dir, + String name)+
accept
in interface FilenameFilter
accept
in interface IOFileFilter
dir
- the directory to check (ignored)name
- the filename (ignored)Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/FileFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/FileFileFilter.html new file mode 100644 index 0000000..71b691e --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/FileFileFilter.html @@ -0,0 +1,347 @@ + + + + + +public class FileFileFilter +extends AbstractFileFilter +implements Serializable+
File
s that are files (not directories).
+ + For example, here is how to print out a list of the real files + within the current directory: + +
+ File dir = new File("."); + String[] files = dir.list( FileFileFilter.FILE ); + for ( int i = 0; i < files.length; i++ ) { + System.out.println(files[i]); + } +
FileFilterUtils.fileFileFilter()
,
+Serialized FormModifier and Type | +Field and Description | +
---|---|
static IOFileFilter |
+FILE
+Singleton instance of file filter
+ |
+
Modifier | +Constructor and Description | +
---|---|
protected |
+FileFileFilter()
+Restrictive consructor.
+ |
+
public static final IOFileFilter FILE+
protected FileFileFilter()+
public boolean accept(File file)+
accept
in interface FileFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the File to checkCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/FileFilterUtils.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/FileFilterUtils.html new file mode 100644 index 0000000..d3d6576 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/FileFilterUtils.html @@ -0,0 +1,1259 @@ + + + + + +public class FileFilterUtils +extends Object+
Constructor and Description | +
---|
FileFilterUtils()
+FileFilterUtils is not normally instantiated.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static IOFileFilter |
+ageFileFilter(Date cutoffDate)
+Returns a filter that returns true if the file was last modified after
+ the specified cutoff date.
+ |
+
static IOFileFilter |
+ageFileFilter(Date cutoffDate,
+ boolean acceptOlder)
+Returns a filter that filters files based on a cutoff date.
+ |
+
static IOFileFilter |
+ageFileFilter(File cutoffReference)
+Returns a filter that returns true if the file was last modified after
+ the specified reference file.
+ |
+
static IOFileFilter |
+ageFileFilter(File cutoffReference,
+ boolean acceptOlder)
+Returns a filter that filters files based on a cutoff reference file.
+ |
+
static IOFileFilter |
+ageFileFilter(long cutoff)
+Returns a filter that returns true if the file was last modified after
+ the specified cutoff time.
+ |
+
static IOFileFilter |
+ageFileFilter(long cutoff,
+ boolean acceptOlder)
+Returns a filter that filters files based on a cutoff time.
+ |
+
static IOFileFilter |
+and(IOFileFilter... filters)
+Returns a filter that ANDs the specified filters.
+ |
+
static IOFileFilter |
+andFileFilter(IOFileFilter filter1,
+ IOFileFilter filter2)
+Deprecated.
+
+
+ |
+
static IOFileFilter |
+asFileFilter(FileFilter filter)
+Returns an
+IOFileFilter that wraps the
+ FileFilter instance. |
+
static IOFileFilter |
+asFileFilter(FilenameFilter filter)
+Returns an
+IOFileFilter that wraps the
+ FilenameFilter instance. |
+
static IOFileFilter |
+directoryFileFilter()
+Returns a filter that checks if the file is a directory.
+ |
+
static IOFileFilter |
+falseFileFilter()
+Returns a filter that always returns false.
+ |
+
static IOFileFilter |
+fileFileFilter()
+Returns a filter that checks if the file is a file (and not a directory).
+ |
+
static File[] |
+filter(IOFileFilter filter,
+ File... files)
+
+ Applies an
+IOFileFilter to the provided File
+ objects. |
+
static File[] |
+filter(IOFileFilter filter,
+ Iterable<File> files)
+
+ Applies an
+IOFileFilter to the provided File
+ objects. |
+
static List<File> |
+filterList(IOFileFilter filter,
+ File... files)
+
+ Applies an
+IOFileFilter to the provided File
+ objects. |
+
static List<File> |
+filterList(IOFileFilter filter,
+ Iterable<File> files)
+
+ Applies an
+IOFileFilter to the provided File
+ objects. |
+
static Set<File> |
+filterSet(IOFileFilter filter,
+ File... files)
+
+ Applies an
+IOFileFilter to the provided File
+ objects. |
+
static Set<File> |
+filterSet(IOFileFilter filter,
+ Iterable<File> files)
+
+ Applies an
+IOFileFilter to the provided File
+ objects. |
+
static IOFileFilter |
+magicNumberFileFilter(byte[] magicNumber)
+Returns a filter that accepts files that begin with the provided magic
+ number.
+ |
+
static IOFileFilter |
+magicNumberFileFilter(byte[] magicNumber,
+ long offset)
+Returns a filter that accepts files that contains the provided magic
+ number at a specified offset within the file.
+ |
+
static IOFileFilter |
+magicNumberFileFilter(String magicNumber)
+Returns a filter that accepts files that begin with the provided magic
+ number.
+ |
+
static IOFileFilter |
+magicNumberFileFilter(String magicNumber,
+ long offset)
+Returns a filter that accepts files that contains the provided magic
+ number at a specified offset within the file.
+ |
+
static IOFileFilter |
+makeCVSAware(IOFileFilter filter)
+Decorates a filter to make it ignore CVS directories.
+ |
+
static IOFileFilter |
+makeDirectoryOnly(IOFileFilter filter)
+Decorates a filter so that it only applies to directories and not to files.
+ |
+
static IOFileFilter |
+makeFileOnly(IOFileFilter filter)
+Decorates a filter so that it only applies to files and not to directories.
+ |
+
static IOFileFilter |
+makeSVNAware(IOFileFilter filter)
+Decorates a filter to make it ignore SVN directories.
+ |
+
static IOFileFilter |
+nameFileFilter(String name)
+Returns a filter that returns true if the filename matches the specified text.
+ |
+
static IOFileFilter |
+nameFileFilter(String name,
+ IOCase caseSensitivity)
+Returns a filter that returns true if the filename matches the specified text.
+ |
+
static IOFileFilter |
+notFileFilter(IOFileFilter filter)
+Returns a filter that NOTs the specified filter.
+ |
+
static IOFileFilter |
+or(IOFileFilter... filters)
+Returns a filter that ORs the specified filters.
+ |
+
static IOFileFilter |
+orFileFilter(IOFileFilter filter1,
+ IOFileFilter filter2)
+Deprecated.
+
+
+ |
+
static IOFileFilter |
+prefixFileFilter(String prefix)
+Returns a filter that returns true if the filename starts with the specified text.
+ |
+
static IOFileFilter |
+prefixFileFilter(String prefix,
+ IOCase caseSensitivity)
+Returns a filter that returns true if the filename starts with the specified text.
+ |
+
static IOFileFilter |
+sizeFileFilter(long threshold)
+Returns a filter that returns true if the file is bigger than a certain size.
+ |
+
static IOFileFilter |
+sizeFileFilter(long threshold,
+ boolean acceptLarger)
+Returns a filter that filters based on file size.
+ |
+
static IOFileFilter |
+sizeRangeFileFilter(long minSizeInclusive,
+ long maxSizeInclusive)
+Returns a filter that accepts files whose size is >= minimum size
+ and <= maximum size.
+ |
+
static IOFileFilter |
+suffixFileFilter(String suffix)
+Returns a filter that returns true if the filename ends with the specified text.
+ |
+
static IOFileFilter |
+suffixFileFilter(String suffix,
+ IOCase caseSensitivity)
+Returns a filter that returns true if the filename ends with the specified text.
+ |
+
static List<IOFileFilter> |
+toList(IOFileFilter... filters)
+Create a List of file filters.
+ |
+
static IOFileFilter |
+trueFileFilter()
+Returns a filter that always returns true.
+ |
+
public FileFilterUtils()+
public static File[] filter(IOFileFilter filter, + File... files)+
+ Applies an IOFileFilter
to the provided File
+ objects. The resulting array is a subset of the original file list that
+ matches the provided filter.
+
+ The Set
returned by this method is not guaranteed to be thread safe.
+
+ Set<File> allFiles = ... + Set<File> javaFiles = FileFilterUtils.filterSet(allFiles, + FileFilterUtils.suffixFileFilter(".java")); +
filter
- the filter to apply to the set of files.files
- the array of files to apply the filter to.files
that is accepted by the
+ file filter.IllegalArgumentException
- if the filter is null
+ or files
contains a null
value.public static File[] filter(IOFileFilter filter, + Iterable<File> files)+
+ Applies an IOFileFilter
to the provided File
+ objects. The resulting array is a subset of the original file list that
+ matches the provided filter.
+
+ The Set
returned by this method is not guaranteed to be thread safe.
+
+ Set<File> allFiles = ... + Set<File> javaFiles = FileFilterUtils.filterSet(allFiles, + FileFilterUtils.suffixFileFilter(".java")); +
filter
- the filter to apply to the set of files.files
- the array of files to apply the filter to.files
that is accepted by the
+ file filter.IllegalArgumentException
- if the filter is null
+ or files
contains a null
value.public static List<File> filterList(IOFileFilter filter, + Iterable<File> files)+
+ Applies an IOFileFilter
to the provided File
+ objects. The resulting list is a subset of the original files that
+ matches the provided filter.
+
+ The List
returned by this method is not guaranteed to be thread safe.
+
+ List<File> filesAndDirectories = ... + List<File> directories = FileFilterUtils.filterList(filesAndDirectories, + FileFilterUtils.directoryFileFilter()); +
filter
- the filter to apply to each files in the list.files
- the collection of files to apply the filter to.files
that is accepted by the
+ file filter.IllegalArgumentException
- if the filter is null
+ or files
contains a null
value.public static List<File> filterList(IOFileFilter filter, + File... files)+
+ Applies an IOFileFilter
to the provided File
+ objects. The resulting list is a subset of the original files that
+ matches the provided filter.
+
+ The List
returned by this method is not guaranteed to be thread safe.
+
+ List<File> filesAndDirectories = ... + List<File> directories = FileFilterUtils.filterList(filesAndDirectories, + FileFilterUtils.directoryFileFilter()); +
filter
- the filter to apply to each files in the list.files
- the collection of files to apply the filter to.files
that is accepted by the
+ file filter.IllegalArgumentException
- if the filter is null
+ or files
contains a null
value.public static Set<File> filterSet(IOFileFilter filter, + File... files)+
+ Applies an IOFileFilter
to the provided File
+ objects. The resulting set is a subset of the original file list that
+ matches the provided filter.
+
+ The Set
returned by this method is not guaranteed to be thread safe.
+
+ Set<File> allFiles = ... + Set<File> javaFiles = FileFilterUtils.filterSet(allFiles, + FileFilterUtils.suffixFileFilter(".java")); +
filter
- the filter to apply to the set of files.files
- the collection of files to apply the filter to.files
that is accepted by the
+ file filter.IllegalArgumentException
- if the filter is null
+ or files
contains a null
value.public static Set<File> filterSet(IOFileFilter filter, + Iterable<File> files)+
+ Applies an IOFileFilter
to the provided File
+ objects. The resulting set is a subset of the original file list that
+ matches the provided filter.
+
+ The Set
returned by this method is not guaranteed to be thread safe.
+
+ Set<File> allFiles = ... + Set<File> javaFiles = FileFilterUtils.filterSet(allFiles, + FileFilterUtils.suffixFileFilter(".java")); +
filter
- the filter to apply to the set of files.files
- the collection of files to apply the filter to.files
that is accepted by the
+ file filter.IllegalArgumentException
- if the filter is null
+ or files
contains a null
value.public static IOFileFilter prefixFileFilter(String prefix)+
prefix
- the filename prefixPrefixFileFilter
public static IOFileFilter prefixFileFilter(String prefix, + IOCase caseSensitivity)+
prefix
- the filename prefixcaseSensitivity
- how to handle case sensitivity, null means case-sensitivePrefixFileFilter
public static IOFileFilter suffixFileFilter(String suffix)+
suffix
- the filename suffixSuffixFileFilter
public static IOFileFilter suffixFileFilter(String suffix, + IOCase caseSensitivity)+
suffix
- the filename suffixcaseSensitivity
- how to handle case sensitivity, null means case-sensitiveSuffixFileFilter
public static IOFileFilter nameFileFilter(String name)+
name
- the filenameNameFileFilter
public static IOFileFilter nameFileFilter(String name, + IOCase caseSensitivity)+
name
- the filenamecaseSensitivity
- how to handle case sensitivity, null means case-sensitiveNameFileFilter
public static IOFileFilter directoryFileFilter()+
DirectoryFileFilter.DIRECTORY
public static IOFileFilter fileFileFilter()+
FileFileFilter.FILE
@Deprecated +public static IOFileFilter andFileFilter(IOFileFilter filter1, + IOFileFilter filter2)+
and(IOFileFilter...)
filter1
- the first filterfilter2
- the second filterand(IOFileFilter...)
,
+AndFileFilter
@Deprecated +public static IOFileFilter orFileFilter(IOFileFilter filter1, + IOFileFilter filter2)+
or(IOFileFilter...)
filter1
- the first filterfilter2
- the second filteror(IOFileFilter...)
,
+OrFileFilter
public static IOFileFilter and(IOFileFilter... filters)+
filters
- the IOFileFilters that will be ANDed together.IllegalArgumentException
- if the filters are null or contain a
+ null value.AndFileFilter
public static IOFileFilter or(IOFileFilter... filters)+
filters
- the IOFileFilters that will be ORed together.IllegalArgumentException
- if the filters are null or contain a
+ null value.OrFileFilter
public static List<IOFileFilter> toList(IOFileFilter... filters)+
filters
- The file filtersIllegalArgumentException
- if the filters are null or contain a
+ null value.public static IOFileFilter notFileFilter(IOFileFilter filter)+
filter
- the filter to invertNotFileFilter
public static IOFileFilter trueFileFilter()+
TrueFileFilter.TRUE
public static IOFileFilter falseFileFilter()+
FalseFileFilter.FALSE
public static IOFileFilter asFileFilter(FileFilter filter)+
IOFileFilter
that wraps the
+ FileFilter
instance.filter
- the filter to be wrappedDelegateFileFilter
public static IOFileFilter asFileFilter(FilenameFilter filter)+
IOFileFilter
that wraps the
+ FilenameFilter
instance.filter
- the filter to be wrappedDelegateFileFilter
public static IOFileFilter ageFileFilter(long cutoff)+
cutoff
- the time thresholdAgeFileFilter
public static IOFileFilter ageFileFilter(long cutoff, + boolean acceptOlder)+
cutoff
- the time thresholdacceptOlder
- if true, older files get accepted, if false, newerAgeFileFilter
public static IOFileFilter ageFileFilter(Date cutoffDate)+
cutoffDate
- the time thresholdAgeFileFilter
public static IOFileFilter ageFileFilter(Date cutoffDate, + boolean acceptOlder)+
cutoffDate
- the time thresholdacceptOlder
- if true, older files get accepted, if false, newerAgeFileFilter
public static IOFileFilter ageFileFilter(File cutoffReference)+
cutoffReference
- the file whose last modification
+ time is usesd as the threshold age of the filesAgeFileFilter
public static IOFileFilter ageFileFilter(File cutoffReference, + boolean acceptOlder)+
cutoffReference
- the file whose last modification
+ time is usesd as the threshold age of the filesacceptOlder
- if true, older files get accepted, if false, newerAgeFileFilter
public static IOFileFilter sizeFileFilter(long threshold)+
threshold
- the file size thresholdSizeFileFilter
public static IOFileFilter sizeFileFilter(long threshold, + boolean acceptLarger)+
threshold
- the file size thresholdacceptLarger
- if true, larger files get accepted, if false, smallerSizeFileFilter
public static IOFileFilter sizeRangeFileFilter(long minSizeInclusive, + long maxSizeInclusive)+
minSizeInclusive
- the minimum file size (inclusive)maxSizeInclusive
- the maximum file size (inclusive)SizeFileFilter
public static IOFileFilter magicNumberFileFilter(String magicNumber)+
magicNumber
- the magic number (byte sequence) to match at the
+ beginning of each file.IllegalArgumentException
- if magicNumber
is
+ null
or the empty String.MagicNumberFileFilter
public static IOFileFilter magicNumberFileFilter(String magicNumber, + long offset)+
magicNumber
- the magic number (byte sequence) to match at the
+ provided offset in each file.offset
- the offset within the files to look for the magic number.IllegalArgumentException
- if magicNumber
is
+ null
or the empty String, or if offset is a
+ negative number.MagicNumberFileFilter
public static IOFileFilter magicNumberFileFilter(byte[] magicNumber)+
magicNumber
- the magic number (byte sequence) to match at the
+ beginning of each file.IllegalArgumentException
- if magicNumber
is
+ null
or is of length zero.MagicNumberFileFilter
public static IOFileFilter magicNumberFileFilter(byte[] magicNumber, + long offset)+
magicNumber
- the magic number (byte sequence) to match at the
+ provided offset in each file.offset
- the offset within the files to look for the magic number.IllegalArgumentException
- if magicNumber
is
+ null
, or contains no bytes, or offset
+ is a negative number.MagicNumberFileFilter
public static IOFileFilter makeCVSAware(IOFileFilter filter)+
null
will return a filter that accepts everything
+ except CVS directories.filter
- the filter to decorate, null means an unrestricted filterpublic static IOFileFilter makeSVNAware(IOFileFilter filter)+
null
will return a filter that accepts everything
+ except SVN directories.filter
- the filter to decorate, null means an unrestricted filterpublic static IOFileFilter makeDirectoryOnly(IOFileFilter filter)+
filter
- the filter to decorate, null means an unrestricted filterDirectoryFileFilter.DIRECTORY
public static IOFileFilter makeFileOnly(IOFileFilter filter)+
filter
- the filter to decorate, null means an unrestricted filterFileFileFilter.FILE
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/HiddenFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/HiddenFileFilter.html new file mode 100644 index 0000000..4bca46d --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/HiddenFileFilter.html @@ -0,0 +1,375 @@ + + + + + +public class HiddenFileFilter +extends AbstractFileFilter +implements Serializable+
File
s that are hidden.
+ + Example, showing how to print out a list of the + current directory's hidden files: + +
+ File dir = new File("."); + String[] files = dir.list( HiddenFileFilter.HIDDEN ); + for ( int i = 0; i < files.length; i++ ) { + System.out.println(files[i]); + } ++ +
+ Example, showing how to print out a list of the + current directory's visible (i.e. not hidden) files: + +
+ File dir = new File("."); + String[] files = dir.list( HiddenFileFilter.VISIBLE ); + for ( int i = 0; i < files.length; i++ ) { + System.out.println(files[i]); + } +
Modifier and Type | +Field and Description | +
---|---|
static IOFileFilter |
+HIDDEN
+Singleton instance of hidden filter
+ |
+
static IOFileFilter |
+VISIBLE
+Singleton instance of visible filter
+ |
+
Modifier | +Constructor and Description | +
---|---|
protected |
+HiddenFileFilter()
+Restrictive consructor.
+ |
+
public static final IOFileFilter HIDDEN+
public static final IOFileFilter VISIBLE+
protected HiddenFileFilter()+
public boolean accept(File file)+
accept
in interface FileFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the File to checktrue
if the file is
+ hidden, otherwise false
.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/IOFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/IOFileFilter.html new file mode 100644 index 0000000..9f68c30 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/IOFileFilter.html @@ -0,0 +1,256 @@ + + + + + +public interface IOFileFilter +extends FileFilter, FilenameFilter+
boolean accept(File file)+
+ Defined in FileFilter
.
accept
in interface FileFilter
file
- the File to checkboolean accept(File dir, + String name)+
+ Defined in FilenameFilter
.
accept
in interface FilenameFilter
dir
- the directory File to checkname
- the filename within the directory to checkCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/MagicNumberFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/MagicNumberFileFilter.html new file mode 100644 index 0000000..c600a89 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/MagicNumberFileFilter.html @@ -0,0 +1,490 @@ + + + + + +public class MagicNumberFileFilter +extends AbstractFileFilter +implements Serializable+
+ File filter for matching files containing a "magic number". A magic number
+ is a unique series of bytes common to all files of a specific file format.
+ For instance, all Java class files begin with the bytes
+ 0xCAFEBABE
.
+
+ File dir = new File("."); + MagicNumberFileFilter javaClassFileFilter = + MagicNumberFileFilter(new byte[] {(byte) 0xCA, (byte) 0xFE, + (byte) 0xBA, (byte) 0xBE}); + String[] javaClassFiles = dir.list(javaClassFileFilter); + for (String javaClassFile : javaClassFiles) { + System.out.println(javaClassFile); + } ++ +
+ Sometimes, such as in the case of TAR files, the + magic number will be offset by a certain number of bytes in the file. In the + case of TAR archive files, this offset is 257 bytes. +
+ ++ File dir = new File("."); + MagicNumberFileFilter tarFileFilter = + MagicNumberFileFilter("ustar", 257); + String[] tarFiles = dir.list(tarFileFilter); + for (String tarFile : tarFiles) { + System.out.println(tarFile); + } +
Constructor and Description | +
---|
MagicNumberFileFilter(byte[] magicNumber)
+
+ Constructs a new MagicNumberFileFilter and associates it with the magic
+ number to test for in files.
+ |
+
MagicNumberFileFilter(byte[] magicNumber,
+ long offset)
+
+ Constructs a new MagicNumberFileFilter and associates it with the magic
+ number to test for in files and the byte offset location in the file to
+ to look for that magic number.
+ |
+
MagicNumberFileFilter(String magicNumber)
+
+ Constructs a new MagicNumberFileFilter and associates it with the magic
+ number to test for in files.
+ |
+
MagicNumberFileFilter(String magicNumber,
+ long offset)
+
+ Constructs a new MagicNumberFileFilter and associates it with the magic
+ number to test for in files and the byte offset location in the file to
+ to look for that magic number.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+accept(File file)
+
+ Accepts the provided file if the file contains the file filter's magic
+ number at the specified offset.
+ |
+
String |
+toString()
+Returns a String representation of the file filter, which includes the
+ magic number bytes and byte offset.
+ |
+
accept
public MagicNumberFileFilter(byte[] magicNumber)+
+ Constructs a new MagicNumberFileFilter and associates it with the magic
+ number to test for in files. This constructor assumes a starting offset
+ of 0
.
+
+ It is important to note that the array is not cloned and that + any changes to the magic number array after construction will affect the + behavior of this file filter. +
+ ++ MagicNumberFileFilter javaClassFileFilter = + MagicNumberFileFilter(new byte[] {(byte) 0xCA, (byte) 0xFE, + (byte) 0xBA, (byte) 0xBE}); +
magicNumber
- the magic number to look for in the file.IllegalArgumentException
- if magicNumber
is
+ null
, or contains no bytes.public MagicNumberFileFilter(String magicNumber)+
+ Constructs a new MagicNumberFileFilter and associates it with the magic
+ number to test for in files. This constructor assumes a starting offset
+ of 0
.
+
+ MagicNumberFileFilter xmlFileFilter =
+ MagicNumberFileFilter("<?xml");
+
+
magicNumber
- the magic number to look for in the file.
+ The string is converted to bytes using the platform default charset.IllegalArgumentException
- if magicNumber
is
+ null
or the empty String.public MagicNumberFileFilter(String magicNumber, + long offset)+
+ Constructs a new MagicNumberFileFilter and associates it with the magic + number to test for in files and the byte offset location in the file to + to look for that magic number. +
+ ++ MagicNumberFileFilter tarFileFilter = + MagicNumberFileFilter("ustar", 257); +
magicNumber
- the magic number to look for in the file.
+ The string is converted to bytes using the platform default charset.offset
- the byte offset in the file to start comparing bytes.IllegalArgumentException
- if magicNumber
is
+ null
or the empty String, or offset
is
+ a negative number.public MagicNumberFileFilter(byte[] magicNumber, + long offset)+
+ Constructs a new MagicNumberFileFilter and associates it with the magic + number to test for in files and the byte offset location in the file to + to look for that magic number. +
+ ++ MagicNumberFileFilter tarFileFilter = + MagicNumberFileFilter(new byte[] {0x75, 0x73, 0x74, 0x61, 0x72}, 257); ++ +
+ MagicNumberFileFilter javaClassFileFilter = + MagicNumberFileFilter(new byte[] {0xCA, 0xFE, 0xBA, 0xBE}, 0); +
magicNumber
- the magic number to look for in the file.offset
- the byte offset in the file to start comparing bytes.IllegalArgumentException
- if magicNumber
is
+ null
, or contains no bytes, or offset
+ is a negative number.public boolean accept(File file)+
+ Accepts the provided file if the file contains the file filter's magic + number at the specified offset. +
+ +
+ If any IOException
s occur while reading the file, the file will
+ be rejected.
+
accept
in interface FileFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the file to accept or reject.true
if the file contains the filter's magic number
+ at the specified offset, false
otherwise.public String toString()+
toString
in class AbstractFileFilter
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/NameFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/NameFileFilter.html new file mode 100644 index 0000000..39d17ad --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/NameFileFilter.html @@ -0,0 +1,451 @@ + + + + + +public class NameFileFilter +extends AbstractFileFilter +implements Serializable+
+ For example, to print all files and directories in the
+ current directory whose name is Test
:
+
+
+ File dir = new File("."); + String[] files = dir.list( new NameFileFilter("Test") ); + for ( int i = 0; i < files.length; i++ ) { + System.out.println(files[i]); + } +
FileFilterUtils.nameFileFilter(String)
,
+FileFilterUtils.nameFileFilter(String, IOCase)
,
+Serialized FormConstructor and Description | +
---|
NameFileFilter(List<String> names)
+Constructs a new case-sensitive name file filter for a list of names.
+ |
+
NameFileFilter(List<String> names,
+ IOCase caseSensitivity)
+Constructs a new name file filter for a list of names specifying case-sensitivity.
+ |
+
NameFileFilter(String name)
+Constructs a new case-sensitive name file filter for a single name.
+ |
+
NameFileFilter(String[] names)
+Constructs a new case-sensitive name file filter for an array of names.
+ |
+
NameFileFilter(String[] names,
+ IOCase caseSensitivity)
+Constructs a new name file filter for an array of names specifying case-sensitivity.
+ |
+
NameFileFilter(String name,
+ IOCase caseSensitivity)
+Construct a new name file filter specifying case-sensitivity.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+accept(File file)
+Checks to see if the filename matches.
+ |
+
boolean |
+accept(File dir,
+ String name)
+Checks to see if the filename matches.
+ |
+
String |
+toString()
+Provide a String representaion of this file filter.
+ |
+
public NameFileFilter(String name)+
name
- the name to allow, must not be nullIllegalArgumentException
- if the name is nullpublic NameFileFilter(String name, + IOCase caseSensitivity)+
name
- the name to allow, must not be nullcaseSensitivity
- how to handle case sensitivity, null means case-sensitiveIllegalArgumentException
- if the name is nullpublic NameFileFilter(String[] names)+
+ The array is not cloned, so could be changed after constructing the + instance. This would be inadvisable however.
names
- the names to allow, must not be nullIllegalArgumentException
- if the names array is nullpublic NameFileFilter(String[] names, + IOCase caseSensitivity)+
names
- the names to allow, must not be nullcaseSensitivity
- how to handle case sensitivity, null means case-sensitiveIllegalArgumentException
- if the names array is nullpublic NameFileFilter(List<String> names)+
names
- the names to allow, must not be nullIllegalArgumentException
- if the name list is nullClassCastException
- if the list does not contain Stringspublic NameFileFilter(List<String> names, + IOCase caseSensitivity)+
names
- the names to allow, must not be nullcaseSensitivity
- how to handle case sensitivity, null means case-sensitiveIllegalArgumentException
- if the name list is nullClassCastException
- if the list does not contain Stringspublic boolean accept(File file)+
accept
in interface FileFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the File to checkpublic boolean accept(File dir, + String name)+
accept
in interface FilenameFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
dir
- the File directory (ignored)name
- the filenamepublic String toString()+
toString
in class AbstractFileFilter
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/NotFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/NotFileFilter.html new file mode 100644 index 0000000..b80af6e --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/NotFileFilter.html @@ -0,0 +1,338 @@ + + + + + +public class NotFileFilter +extends AbstractFileFilter +implements Serializable+
FileFilterUtils.notFileFilter(IOFileFilter)
,
+Serialized FormConstructor and Description | +
---|
NotFileFilter(IOFileFilter filter)
+Constructs a new file filter that NOTs the result of another filter.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+accept(File file)
+Returns the logical NOT of the underlying filter's return value for the same File.
+ |
+
boolean |
+accept(File file,
+ String name)
+Returns the logical NOT of the underlying filter's return value for the same arguments.
+ |
+
String |
+toString()
+Provide a String representaion of this file filter.
+ |
+
public NotFileFilter(IOFileFilter filter)+
filter
- the filter, must not be nullIllegalArgumentException
- if the filter is nullpublic boolean accept(File file)+
accept
in interface FileFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the File to checkpublic boolean accept(File file, + String name)+
accept
in interface FilenameFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the File directoryname
- the filenamepublic String toString()+
toString
in class AbstractFileFilter
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/OrFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/OrFileFilter.html new file mode 100644 index 0000000..751ad8b --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/OrFileFilter.html @@ -0,0 +1,466 @@ + + + + + +public class OrFileFilter +extends AbstractFileFilter +implements ConditionalFileFilter, Serializable+
FileFilter
providing conditional OR logic across a list of
+ file filters. This filter returns true
if any filters in the
+ list return true
. Otherwise, it returns false
.
+ Checking of the file filter list stops when the first filter returns
+ true
.FileFilterUtils.or(IOFileFilter...)
,
+Serialized FormConstructor and Description | +
---|
OrFileFilter()
+Constructs a new instance of
+OrFileFilter . |
+
OrFileFilter(IOFileFilter filter1,
+ IOFileFilter filter2)
+Constructs a new file filter that ORs the result of two other filters.
+ |
+
OrFileFilter(List<IOFileFilter> fileFilters)
+Constructs a new instance of
+OrFileFilter
+ with the specified filters. |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+accept(File file)
+Checks to see if the File should be accepted by this filter.
+ |
+
boolean |
+accept(File file,
+ String name)
+Checks to see if the File should be accepted by this filter.
+ |
+
void |
+addFileFilter(IOFileFilter ioFileFilter)
+Adds the specified file filter to the list of file filters at the end of
+ the list.
+ |
+
List<IOFileFilter> |
+getFileFilters()
+Returns this conditional file filter's list of file filters.
+ |
+
boolean |
+removeFileFilter(IOFileFilter ioFileFilter)
+Removes the specified file filter.
+ |
+
void |
+setFileFilters(List<IOFileFilter> fileFilters)
+Sets the list of file filters, replacing any previously configured
+ file filters on this filter.
+ |
+
String |
+toString()
+Provide a String representaion of this file filter.
+ |
+
public OrFileFilter()+
OrFileFilter
.public OrFileFilter(List<IOFileFilter> fileFilters)+
OrFileFilter
+ with the specified filters.fileFilters
- the file filters for this filter, copied, null ignoredpublic OrFileFilter(IOFileFilter filter1, + IOFileFilter filter2)+
filter1
- the first filter, must not be nullfilter2
- the second filter, must not be nullIllegalArgumentException
- if either filter is nullpublic void addFileFilter(IOFileFilter ioFileFilter)+
addFileFilter
in interface ConditionalFileFilter
ioFileFilter
- the filter to be addedpublic List<IOFileFilter> getFileFilters()+
getFileFilters
in interface ConditionalFileFilter
public boolean removeFileFilter(IOFileFilter ioFileFilter)+
removeFileFilter
in interface ConditionalFileFilter
ioFileFilter
- filter to be removedtrue
if the filter was found in the list,
+ false
otherwisepublic void setFileFilters(List<IOFileFilter> fileFilters)+
setFileFilters
in interface ConditionalFileFilter
fileFilters
- the list of filterspublic boolean accept(File file)+
accept
in interface FileFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the File to checkpublic boolean accept(File file, + String name)+
accept
in interface FilenameFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the directory File to checkname
- the filename within the directory to checkpublic String toString()+
toString
in class AbstractFileFilter
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/PrefixFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/PrefixFileFilter.html new file mode 100644 index 0000000..080bfc3 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/PrefixFileFilter.html @@ -0,0 +1,460 @@ + + + + + +public class PrefixFileFilter +extends AbstractFileFilter +implements Serializable+
+ For example, to print all files and directories in the
+ current directory whose name starts with Test
:
+
+
+ File dir = new File("."); + String[] files = dir.list( new PrefixFileFilter("Test") ); + for ( int i = 0; i < files.length; i++ ) { + System.out.println(files[i]); + } +
FileFilterUtils.prefixFileFilter(String)
,
+FileFilterUtils.prefixFileFilter(String, IOCase)
,
+Serialized FormConstructor and Description | +
---|
PrefixFileFilter(List<String> prefixes)
+Constructs a new Prefix file filter for a list of prefixes.
+ |
+
PrefixFileFilter(List<String> prefixes,
+ IOCase caseSensitivity)
+Constructs a new Prefix file filter for a list of prefixes
+ specifying case-sensitivity.
+ |
+
PrefixFileFilter(String prefix)
+Constructs a new Prefix file filter for a single prefix.
+ |
+
PrefixFileFilter(String[] prefixes)
+Constructs a new Prefix file filter for any of an array of prefixes.
+ |
+
PrefixFileFilter(String[] prefixes,
+ IOCase caseSensitivity)
+Constructs a new Prefix file filter for any of an array of prefixes
+ specifying case-sensitivity.
+ |
+
PrefixFileFilter(String prefix,
+ IOCase caseSensitivity)
+Constructs a new Prefix file filter for a single prefix
+ specifying case-sensitivity.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+accept(File file)
+Checks to see if the filename starts with the prefix.
+ |
+
boolean |
+accept(File file,
+ String name)
+Checks to see if the filename starts with the prefix.
+ |
+
String |
+toString()
+Provide a String representaion of this file filter.
+ |
+
public PrefixFileFilter(String prefix)+
prefix
- the prefix to allow, must not be nullIllegalArgumentException
- if the prefix is nullpublic PrefixFileFilter(String prefix, + IOCase caseSensitivity)+
prefix
- the prefix to allow, must not be nullcaseSensitivity
- how to handle case sensitivity, null means case-sensitiveIllegalArgumentException
- if the prefix is nullpublic PrefixFileFilter(String[] prefixes)+
+ The array is not cloned, so could be changed after constructing the + instance. This would be inadvisable however.
prefixes
- the prefixes to allow, must not be nullIllegalArgumentException
- if the prefix array is nullpublic PrefixFileFilter(String[] prefixes, + IOCase caseSensitivity)+
prefixes
- the prefixes to allow, must not be nullcaseSensitivity
- how to handle case sensitivity, null means case-sensitiveIllegalArgumentException
- if the prefix is nullpublic PrefixFileFilter(List<String> prefixes)+
prefixes
- the prefixes to allow, must not be nullIllegalArgumentException
- if the prefix list is nullClassCastException
- if the list does not contain Stringspublic PrefixFileFilter(List<String> prefixes, + IOCase caseSensitivity)+
prefixes
- the prefixes to allow, must not be nullcaseSensitivity
- how to handle case sensitivity, null means case-sensitiveIllegalArgumentException
- if the prefix list is nullClassCastException
- if the list does not contain Stringspublic boolean accept(File file)+
accept
in interface FileFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the File to checkpublic boolean accept(File file, + String name)+
accept
in interface FilenameFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the File directoryname
- the filenamepublic String toString()+
toString
in class AbstractFileFilter
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/RegexFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/RegexFileFilter.html new file mode 100644 index 0000000..8edca8e --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/RegexFileFilter.html @@ -0,0 +1,371 @@ + + + + + +public class RegexFileFilter +extends AbstractFileFilter +implements Serializable+
+ See java.util.regex.Pattern for regex matching rules +
+ ++ e.g. +
+ File dir = new File("."); + FileFilter fileFilter = new RegexFileFilter("^.*[tT]est(-\\d+)?\\.java$"); + File[] files = dir.listFiles(fileFilter); + for (int i = 0; i < files.length; i++) { + System.out.println(files[i]); + } +
Constructor and Description | +
---|
RegexFileFilter(Pattern pattern)
+Construct a new regular expression filter for a compiled regular expression
+ |
+
RegexFileFilter(String pattern)
+Construct a new regular expression filter.
+ |
+
RegexFileFilter(String pattern,
+ int flags)
+Construct a new regular expression filter with the specified flags.
+ |
+
RegexFileFilter(String pattern,
+ IOCase caseSensitivity)
+Construct a new regular expression filter with the specified flags case sensitivity.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+accept(File dir,
+ String name)
+Checks to see if the filename matches one of the regular expressions.
+ |
+
accept, toString
public RegexFileFilter(String pattern)+
pattern
- regular string expression to matchIllegalArgumentException
- if the pattern is nullpublic RegexFileFilter(String pattern, + IOCase caseSensitivity)+
pattern
- regular string expression to matchcaseSensitivity
- how to handle case sensitivity, null means case-sensitiveIllegalArgumentException
- if the pattern is nullpublic RegexFileFilter(String pattern, + int flags)+
pattern
- regular string expression to matchflags
- pattern flags - e.g. Pattern.CASE_INSENSITIVE
IllegalArgumentException
- if the pattern is nullpublic RegexFileFilter(Pattern pattern)+
pattern
- regular expression to matchIllegalArgumentException
- if the pattern is nullpublic boolean accept(File dir, + String name)+
accept
in interface FilenameFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
dir
- the file directory (ignored)name
- the filenameCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/SizeFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/SizeFileFilter.html new file mode 100644 index 0000000..51da99d --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/SizeFileFilter.html @@ -0,0 +1,362 @@ + + + + + +public class SizeFileFilter +extends AbstractFileFilter +implements Serializable+
+ For example, to print all files and directories in the + current directory whose size is greater than 1 MB: + +
+ File dir = new File("."); + String[] files = dir.list( new SizeFileFilter(1024 * 1024) ); + for ( int i = 0; i < files.length; i++ ) { + System.out.println(files[i]); + } +
FileFilterUtils.sizeFileFilter(long)
,
+FileFilterUtils.sizeFileFilter(long, boolean)
,
+FileFilterUtils.sizeRangeFileFilter(long, long)
,
+Serialized FormConstructor and Description | +
---|
SizeFileFilter(long size)
+Constructs a new size file filter for files equal to or
+ larger than a certain size.
+ |
+
SizeFileFilter(long size,
+ boolean acceptLarger)
+Constructs a new size file filter for files based on a certain size
+ threshold.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+accept(File file)
+Checks to see if the size of the file is favorable.
+ |
+
String |
+toString()
+Provide a String representaion of this file filter.
+ |
+
accept
public SizeFileFilter(long size)+
size
- the threshold size of the filesIllegalArgumentException
- if the size is negativepublic SizeFileFilter(long size, + boolean acceptLarger)+
size
- the threshold size of the filesacceptLarger
- if true, files equal to or larger are accepted,
+ otherwise smaller ones (but not equal to)IllegalArgumentException
- if the size is negativepublic boolean accept(File file)+
+ If size equals threshold and smaller files are required, + file IS NOT selected. + If size equals threshold and larger files are required, + file IS selected.
accept
in interface FileFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the File to checkpublic String toString()+
toString
in class AbstractFileFilter
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/SuffixFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/SuffixFileFilter.html new file mode 100644 index 0000000..e13679e --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/SuffixFileFilter.html @@ -0,0 +1,461 @@ + + + + + +public class SuffixFileFilter +extends AbstractFileFilter +implements Serializable+
+ For example, to retrieve and print all *.java
files
+ in the current directory:
+
+
+ File dir = new File("."); + String[] files = dir.list( new SuffixFileFilter(".java") ); + for (int i = 0; i < files.length; i++) { + System.out.println(files[i]); + } +
FileFilterUtils.suffixFileFilter(String)
,
+FileFilterUtils.suffixFileFilter(String, IOCase)
,
+Serialized FormConstructor and Description | +
---|
SuffixFileFilter(List<String> suffixes)
+Constructs a new Suffix file filter for a list of suffixes.
+ |
+
SuffixFileFilter(List<String> suffixes,
+ IOCase caseSensitivity)
+Constructs a new Suffix file filter for a list of suffixes
+ specifying case-sensitivity.
+ |
+
SuffixFileFilter(String suffix)
+Constructs a new Suffix file filter for a single extension.
+ |
+
SuffixFileFilter(String[] suffixes)
+Constructs a new Suffix file filter for an array of suffixs.
+ |
+
SuffixFileFilter(String[] suffixes,
+ IOCase caseSensitivity)
+Constructs a new Suffix file filter for an array of suffixs
+ specifying case-sensitivity.
+ |
+
SuffixFileFilter(String suffix,
+ IOCase caseSensitivity)
+Constructs a new Suffix file filter for a single extension
+ specifying case-sensitivity.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+accept(File file)
+Checks to see if the filename ends with the suffix.
+ |
+
boolean |
+accept(File file,
+ String name)
+Checks to see if the filename ends with the suffix.
+ |
+
String |
+toString()
+Provide a String representaion of this file filter.
+ |
+
public SuffixFileFilter(String suffix)+
suffix
- the suffix to allow, must not be nullIllegalArgumentException
- if the suffix is nullpublic SuffixFileFilter(String suffix, + IOCase caseSensitivity)+
suffix
- the suffix to allow, must not be nullcaseSensitivity
- how to handle case sensitivity, null means case-sensitiveIllegalArgumentException
- if the suffix is nullpublic SuffixFileFilter(String[] suffixes)+
+ The array is not cloned, so could be changed after constructing the + instance. This would be inadvisable however.
suffixes
- the suffixes to allow, must not be nullIllegalArgumentException
- if the suffix array is nullpublic SuffixFileFilter(String[] suffixes, + IOCase caseSensitivity)+
suffixes
- the suffixes to allow, must not be nullcaseSensitivity
- how to handle case sensitivity, null means case-sensitiveIllegalArgumentException
- if the suffix array is nullpublic SuffixFileFilter(List<String> suffixes)+
suffixes
- the suffixes to allow, must not be nullIllegalArgumentException
- if the suffix list is nullClassCastException
- if the list does not contain Stringspublic SuffixFileFilter(List<String> suffixes, + IOCase caseSensitivity)+
suffixes
- the suffixes to allow, must not be nullcaseSensitivity
- how to handle case sensitivity, null means case-sensitiveIllegalArgumentException
- if the suffix list is nullClassCastException
- if the list does not contain Stringspublic boolean accept(File file)+
accept
in interface FileFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the File to checkpublic boolean accept(File file, + String name)+
accept
in interface FilenameFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the File directoryname
- the filenamepublic String toString()+
toString
in class AbstractFileFilter
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/TrueFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/TrueFileFilter.html new file mode 100644 index 0000000..cd19b18 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/TrueFileFilter.html @@ -0,0 +1,368 @@ + + + + + +public class TrueFileFilter +extends Object +implements IOFileFilter, Serializable+
FileFilterUtils.trueFileFilter()
,
+Serialized FormModifier and Type | +Field and Description | +
---|---|
static IOFileFilter |
+INSTANCE
+Singleton instance of true filter.
+ |
+
static IOFileFilter |
+TRUE
+Singleton instance of true filter.
+ |
+
Modifier | +Constructor and Description | +
---|---|
protected |
+TrueFileFilter()
+Restrictive constructor.
+ |
+
public static final IOFileFilter TRUE+
public static final IOFileFilter INSTANCE+
protected TrueFileFilter()+
public boolean accept(File file)+
accept
in interface FileFilter
accept
in interface IOFileFilter
file
- the file to check (ignored)public boolean accept(File dir, + String name)+
accept
in interface FilenameFilter
accept
in interface IOFileFilter
dir
- the directory to check (ignored)name
- the filename (ignored)Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/WildcardFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/WildcardFileFilter.html new file mode 100644 index 0000000..3280902 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/WildcardFileFilter.html @@ -0,0 +1,456 @@ + + + + + +public class WildcardFileFilter +extends AbstractFileFilter +implements Serializable+
+ This filter selects files and directories based on one or more wildcards. + Testing is case-sensitive by default, but this can be configured. +
+ The wildcard matcher uses the characters '?' and '*' to represent a
+ single or multiple wildcard characters.
+ This is the same as often found on Dos/Unix command lines.
+ The check is case-sensitive by default.
+ See FilenameUtils.wildcardMatchOnSystem(java.lang.String, java.lang.String)
for more information.
+
+ For example: +
+ File dir = new File("."); + FileFilter fileFilter = new WildcardFileFilter("*test*.java~*~"); + File[] files = dir.listFiles(fileFilter); + for (int i = 0; i < files.length; i++) { + System.out.println(files[i]); + } +
Constructor and Description | +
---|
WildcardFileFilter(List<String> wildcards)
+Construct a new case-sensitive wildcard filter for a list of wildcards.
+ |
+
WildcardFileFilter(List<String> wildcards,
+ IOCase caseSensitivity)
+Construct a new wildcard filter for a list of wildcards specifying case-sensitivity.
+ |
+
WildcardFileFilter(String wildcard)
+Construct a new case-sensitive wildcard filter for a single wildcard.
+ |
+
WildcardFileFilter(String[] wildcards)
+Construct a new case-sensitive wildcard filter for an array of wildcards.
+ |
+
WildcardFileFilter(String[] wildcards,
+ IOCase caseSensitivity)
+Construct a new wildcard filter for an array of wildcards specifying case-sensitivity.
+ |
+
WildcardFileFilter(String wildcard,
+ IOCase caseSensitivity)
+Construct a new wildcard filter for a single wildcard specifying case-sensitivity.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+accept(File file)
+Checks to see if the filename matches one of the wildcards.
+ |
+
boolean |
+accept(File dir,
+ String name)
+Checks to see if the filename matches one of the wildcards.
+ |
+
String |
+toString()
+Provide a String representation of this file filter.
+ |
+
public WildcardFileFilter(String wildcard)+
wildcard
- the wildcard to matchIllegalArgumentException
- if the pattern is nullpublic WildcardFileFilter(String wildcard, + IOCase caseSensitivity)+
wildcard
- the wildcard to match, not nullcaseSensitivity
- how to handle case sensitivity, null means case-sensitiveIllegalArgumentException
- if the pattern is nullpublic WildcardFileFilter(String[] wildcards)+
wildcards
- the array of wildcards to matchIllegalArgumentException
- if the pattern array is nullpublic WildcardFileFilter(String[] wildcards, + IOCase caseSensitivity)+
wildcards
- the array of wildcards to match, not nullcaseSensitivity
- how to handle case sensitivity, null means case-sensitiveIllegalArgumentException
- if the pattern array is nullpublic WildcardFileFilter(List<String> wildcards)+
wildcards
- the list of wildcards to match, not nullIllegalArgumentException
- if the pattern list is nullClassCastException
- if the list does not contain Stringspublic WildcardFileFilter(List<String> wildcards, + IOCase caseSensitivity)+
wildcards
- the list of wildcards to match, not nullcaseSensitivity
- how to handle case sensitivity, null means case-sensitiveIllegalArgumentException
- if the pattern list is nullClassCastException
- if the list does not contain Stringspublic boolean accept(File dir, + String name)+
accept
in interface FilenameFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
dir
- the file directory (ignored)name
- the filenamepublic boolean accept(File file)+
accept
in interface FileFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the file to checkpublic String toString()+
toString
in class AbstractFileFilter
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/WildcardFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/WildcardFilter.html new file mode 100644 index 0000000..bdff64a --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/WildcardFilter.html @@ -0,0 +1,395 @@ + + + + + +@Deprecated +public class WildcardFilter +extends AbstractFileFilter +implements Serializable+
+ This filter selects files, but not directories, based on one or more wildcards + and using case-sensitive comparison. +
+ The wildcard matcher uses the characters '?' and '*' to represent a
+ single or multiple wildcard characters.
+ This is the same as often found on Dos/Unix command lines.
+ The extension check is case-sensitive.
+ See FilenameUtils.wildcardMatch(String, String)
for more information.
+
+ For example: +
+ File dir = new File("."); + FileFilter fileFilter = new WildcardFilter("*test*.java~*~"); + File[] files = dir.listFiles(fileFilter); + for (int i = 0; i < files.length; i++) { + System.out.println(files[i]); + } +
Constructor and Description | +
---|
WildcardFilter(List<String> wildcards)
+Deprecated.
+Construct a new case-sensitive wildcard filter for a list of wildcards.
+ |
+
WildcardFilter(String wildcard)
+Deprecated.
+Construct a new case-sensitive wildcard filter for a single wildcard.
+ |
+
WildcardFilter(String[] wildcards)
+Deprecated.
+Construct a new case-sensitive wildcard filter for an array of wildcards.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+accept(File file)
+Deprecated.
+Checks to see if the filename matches one of the wildcards.
+ |
+
boolean |
+accept(File dir,
+ String name)
+Deprecated.
+Checks to see if the filename matches one of the wildcards.
+ |
+
toString
public WildcardFilter(String wildcard)+
wildcard
- the wildcard to matchIllegalArgumentException
- if the pattern is nullpublic WildcardFilter(String[] wildcards)+
wildcards
- the array of wildcards to matchIllegalArgumentException
- if the pattern array is nullpublic WildcardFilter(List<String> wildcards)+
wildcards
- the list of wildcards to matchIllegalArgumentException
- if the pattern list is nullClassCastException
- if the list does not contain Stringspublic boolean accept(File dir, + String name)+
accept
in interface FilenameFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
dir
- the file directoryname
- the filenamepublic boolean accept(File file)+
accept
in interface FileFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the file to checkCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/AbstractFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/AbstractFileFilter.html new file mode 100644 index 0000000..15aa021 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/AbstractFileFilter.html @@ -0,0 +1,276 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io.filefilter | +
+ This package defines an interface (IOFileFilter) that combines both
+
+FileFilter and FilenameFilter . |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+AgeFileFilter
+Filters files based on a cutoff time, can filter either newer
+ files or files equal to or older.
+ |
+
class |
+AndFileFilter
+A
+FileFilter providing conditional AND logic across a list of
+ file filters. |
+
class |
+CanReadFileFilter
+This filter accepts
+File s that can be read. |
+
class |
+CanWriteFileFilter
+This filter accepts
+File s that can be written to. |
+
class |
+DelegateFileFilter
+This class turns a Java FileFilter or FilenameFilter into an IO FileFilter.
+ |
+
class |
+DirectoryFileFilter
+This filter accepts
+File s that are directories. |
+
class |
+EmptyFileFilter
+This filter accepts files or directories that are empty.
+ |
+
class |
+FileFileFilter
+This filter accepts
+File s that are files (not directories). |
+
class |
+HiddenFileFilter
+This filter accepts
+File s that are hidden. |
+
class |
+MagicNumberFileFilter
+
+ File filter for matching files containing a "magic number".
+ |
+
class |
+NameFileFilter
+Filters filenames for a certain name.
+ |
+
class |
+NotFileFilter
+This filter produces a logical NOT of the filters specified.
+ |
+
class |
+OrFileFilter
+A
+FileFilter providing conditional OR logic across a list of
+ file filters. |
+
class |
+PrefixFileFilter
+Filters filenames for a certain prefix.
+ |
+
class |
+RegexFileFilter
+Filters files using supplied regular expression(s).
+ |
+
class |
+SizeFileFilter
+Filters files based on size, can filter either smaller files or
+ files equal to or larger than a given threshold.
+ |
+
class |
+SuffixFileFilter
+Filters files based on the suffix (what the filename ends with).
+ |
+
class |
+WildcardFileFilter
+Filters files using the supplied wildcards.
+ |
+
class |
+WildcardFilter
+Deprecated.
+
+Use WilcardFileFilter. Deprecated as this class performs directory
+ filtering which it shouldn't do, but that can't be removed due to compatability.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/AgeFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/AgeFileFilter.html new file mode 100644 index 0000000..4742086 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/AgeFileFilter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/AndFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/AndFileFilter.html new file mode 100644 index 0000000..5ee7cde --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/AndFileFilter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/CanReadFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/CanReadFileFilter.html new file mode 100644 index 0000000..ec47ee4 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/CanReadFileFilter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/CanWriteFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/CanWriteFileFilter.html new file mode 100644 index 0000000..ef36bfd --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/CanWriteFileFilter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/ConditionalFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/ConditionalFileFilter.html new file mode 100644 index 0000000..49c07e3 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/ConditionalFileFilter.html @@ -0,0 +1,168 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io.filefilter | +
+ This package defines an interface (IOFileFilter) that combines both
+
+FileFilter and FilenameFilter . |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+AndFileFilter
+A
+FileFilter providing conditional AND logic across a list of
+ file filters. |
+
class |
+OrFileFilter
+A
+FileFilter providing conditional OR logic across a list of
+ file filters. |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/DelegateFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/DelegateFileFilter.html new file mode 100644 index 0000000..34e10b3 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/DelegateFileFilter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/DirectoryFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/DirectoryFileFilter.html new file mode 100644 index 0000000..97f4c96 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/DirectoryFileFilter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/EmptyFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/EmptyFileFilter.html new file mode 100644 index 0000000..65b3712 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/EmptyFileFilter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/FalseFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/FalseFileFilter.html new file mode 100644 index 0000000..f6135bb --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/FalseFileFilter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/FileFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/FileFileFilter.html new file mode 100644 index 0000000..cf62f10 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/FileFileFilter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/FileFilterUtils.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/FileFilterUtils.html new file mode 100644 index 0000000..3f64fb7 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/FileFilterUtils.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/HiddenFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/HiddenFileFilter.html new file mode 100644 index 0000000..0c93531 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/HiddenFileFilter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/IOFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/IOFileFilter.html new file mode 100644 index 0000000..290b7ef --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/IOFileFilter.html @@ -0,0 +1,989 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io | +
+
+This package defines utility classes for working with streams, readers,
+writers and files.
+ |
+
org.apache.commons.io.filefilter | +
+ This package defines an interface (IOFileFilter) that combines both
+
+FileFilter and FilenameFilter . |
+
Modifier and Type | +Method and Description | +
---|---|
static Iterator<File> |
+FileUtils.iterateFiles(File directory,
+ IOFileFilter fileFilter,
+ IOFileFilter dirFilter)
+Allows iteration over the files in given directory (and optionally
+ its subdirectories).
+ |
+
static Iterator<File> |
+FileUtils.iterateFilesAndDirs(File directory,
+ IOFileFilter fileFilter,
+ IOFileFilter dirFilter)
+Allows iteration over the files in given directory (and optionally
+ its subdirectories).
+ |
+
static Collection<File> |
+FileUtils.listFiles(File directory,
+ IOFileFilter fileFilter,
+ IOFileFilter dirFilter)
+Finds files within a given directory (and optionally its
+ subdirectories).
+ |
+
static Collection<File> |
+FileUtils.listFilesAndDirs(File directory,
+ IOFileFilter fileFilter,
+ IOFileFilter dirFilter)
+Finds files within a given directory (and optionally its
+ subdirectories).
+ |
+
Constructor and Description | +
---|
DirectoryWalker(IOFileFilter directoryFilter,
+ IOFileFilter fileFilter,
+ int depthLimit)
+Construct an instance with a directory and a file filter and an optional
+ limit on the depth navigated to.
+ |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+AbstractFileFilter
+An abstract class which implements the Java FileFilter and FilenameFilter
+ interfaces via the IOFileFilter interface.
+ |
+
class |
+AgeFileFilter
+Filters files based on a cutoff time, can filter either newer
+ files or files equal to or older.
+ |
+
class |
+AndFileFilter
+A
+FileFilter providing conditional AND logic across a list of
+ file filters. |
+
class |
+CanReadFileFilter
+This filter accepts
+File s that can be read. |
+
class |
+CanWriteFileFilter
+This filter accepts
+File s that can be written to. |
+
class |
+DelegateFileFilter
+This class turns a Java FileFilter or FilenameFilter into an IO FileFilter.
+ |
+
class |
+DirectoryFileFilter
+This filter accepts
+File s that are directories. |
+
class |
+EmptyFileFilter
+This filter accepts files or directories that are empty.
+ |
+
class |
+FalseFileFilter
+A file filter that always returns false.
+ |
+
class |
+FileFileFilter
+This filter accepts
+File s that are files (not directories). |
+
class |
+HiddenFileFilter
+This filter accepts
+File s that are hidden. |
+
class |
+MagicNumberFileFilter
+
+ File filter for matching files containing a "magic number".
+ |
+
class |
+NameFileFilter
+Filters filenames for a certain name.
+ |
+
class |
+NotFileFilter
+This filter produces a logical NOT of the filters specified.
+ |
+
class |
+OrFileFilter
+A
+FileFilter providing conditional OR logic across a list of
+ file filters. |
+
class |
+PrefixFileFilter
+Filters filenames for a certain prefix.
+ |
+
class |
+RegexFileFilter
+Filters files using supplied regular expression(s).
+ |
+
class |
+SizeFileFilter
+Filters files based on size, can filter either smaller files or
+ files equal to or larger than a given threshold.
+ |
+
class |
+SuffixFileFilter
+Filters files based on the suffix (what the filename ends with).
+ |
+
class |
+TrueFileFilter
+A file filter that always returns true.
+ |
+
class |
+WildcardFileFilter
+Filters files using the supplied wildcards.
+ |
+
class |
+WildcardFilter
+Deprecated.
+
+Use WilcardFileFilter. Deprecated as this class performs directory
+ filtering which it shouldn't do, but that can't be removed due to compatability.
+ |
+
Modifier and Type | +Field and Description | +
---|---|
static IOFileFilter |
+CanReadFileFilter.CAN_READ
+Singleton instance of readable filter
+ |
+
static IOFileFilter |
+CanWriteFileFilter.CAN_WRITE
+Singleton instance of writable filter
+ |
+
static IOFileFilter |
+CanReadFileFilter.CANNOT_READ
+Singleton instance of not readable filter
+ |
+
static IOFileFilter |
+CanWriteFileFilter.CANNOT_WRITE
+Singleton instance of not writable filter
+ |
+
static IOFileFilter |
+DirectoryFileFilter.DIRECTORY
+Singleton instance of directory filter.
+ |
+
static IOFileFilter |
+EmptyFileFilter.EMPTY
+Singleton instance of empty filter
+ |
+
static IOFileFilter |
+FalseFileFilter.FALSE
+Singleton instance of false filter.
+ |
+
static IOFileFilter |
+FileFileFilter.FILE
+Singleton instance of file filter
+ |
+
static IOFileFilter |
+HiddenFileFilter.HIDDEN
+Singleton instance of hidden filter
+ |
+
static IOFileFilter |
+FalseFileFilter.INSTANCE
+Singleton instance of false filter.
+ |
+
static IOFileFilter |
+TrueFileFilter.INSTANCE
+Singleton instance of true filter.
+ |
+
static IOFileFilter |
+DirectoryFileFilter.INSTANCE
+Singleton instance of directory filter.
+ |
+
static IOFileFilter |
+EmptyFileFilter.NOT_EMPTY
+Singleton instance of not-empty filter
+ |
+
static IOFileFilter |
+CanReadFileFilter.READ_ONLY
+Singleton instance of read-only filter
+ |
+
static IOFileFilter |
+TrueFileFilter.TRUE
+Singleton instance of true filter.
+ |
+
static IOFileFilter |
+HiddenFileFilter.VISIBLE
+Singleton instance of visible filter
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static IOFileFilter |
+FileFilterUtils.ageFileFilter(Date cutoffDate)
+Returns a filter that returns true if the file was last modified after
+ the specified cutoff date.
+ |
+
static IOFileFilter |
+FileFilterUtils.ageFileFilter(Date cutoffDate,
+ boolean acceptOlder)
+Returns a filter that filters files based on a cutoff date.
+ |
+
static IOFileFilter |
+FileFilterUtils.ageFileFilter(File cutoffReference)
+Returns a filter that returns true if the file was last modified after
+ the specified reference file.
+ |
+
static IOFileFilter |
+FileFilterUtils.ageFileFilter(File cutoffReference,
+ boolean acceptOlder)
+Returns a filter that filters files based on a cutoff reference file.
+ |
+
static IOFileFilter |
+FileFilterUtils.ageFileFilter(long cutoff)
+Returns a filter that returns true if the file was last modified after
+ the specified cutoff time.
+ |
+
static IOFileFilter |
+FileFilterUtils.ageFileFilter(long cutoff,
+ boolean acceptOlder)
+Returns a filter that filters files based on a cutoff time.
+ |
+
static IOFileFilter |
+FileFilterUtils.and(IOFileFilter... filters)
+Returns a filter that ANDs the specified filters.
+ |
+
static IOFileFilter |
+FileFilterUtils.andFileFilter(IOFileFilter filter1,
+ IOFileFilter filter2)
+Deprecated.
+
+
+ |
+
static IOFileFilter |
+FileFilterUtils.asFileFilter(FileFilter filter)
+Returns an
+IOFileFilter that wraps the
+ FileFilter instance. |
+
static IOFileFilter |
+FileFilterUtils.asFileFilter(FilenameFilter filter)
+Returns an
+IOFileFilter that wraps the
+ FilenameFilter instance. |
+
static IOFileFilter |
+FileFilterUtils.directoryFileFilter()
+Returns a filter that checks if the file is a directory.
+ |
+
static IOFileFilter |
+FileFilterUtils.falseFileFilter()
+Returns a filter that always returns false.
+ |
+
static IOFileFilter |
+FileFilterUtils.fileFileFilter()
+Returns a filter that checks if the file is a file (and not a directory).
+ |
+
static IOFileFilter |
+FileFilterUtils.magicNumberFileFilter(byte[] magicNumber)
+Returns a filter that accepts files that begin with the provided magic
+ number.
+ |
+
static IOFileFilter |
+FileFilterUtils.magicNumberFileFilter(byte[] magicNumber,
+ long offset)
+Returns a filter that accepts files that contains the provided magic
+ number at a specified offset within the file.
+ |
+
static IOFileFilter |
+FileFilterUtils.magicNumberFileFilter(String magicNumber)
+Returns a filter that accepts files that begin with the provided magic
+ number.
+ |
+
static IOFileFilter |
+FileFilterUtils.magicNumberFileFilter(String magicNumber,
+ long offset)
+Returns a filter that accepts files that contains the provided magic
+ number at a specified offset within the file.
+ |
+
static IOFileFilter |
+FileFilterUtils.makeCVSAware(IOFileFilter filter)
+Decorates a filter to make it ignore CVS directories.
+ |
+
static IOFileFilter |
+FileFilterUtils.makeDirectoryOnly(IOFileFilter filter)
+Decorates a filter so that it only applies to directories and not to files.
+ |
+
static IOFileFilter |
+FileFilterUtils.makeFileOnly(IOFileFilter filter)
+Decorates a filter so that it only applies to files and not to directories.
+ |
+
static IOFileFilter |
+FileFilterUtils.makeSVNAware(IOFileFilter filter)
+Decorates a filter to make it ignore SVN directories.
+ |
+
static IOFileFilter |
+FileFilterUtils.nameFileFilter(String name)
+Returns a filter that returns true if the filename matches the specified text.
+ |
+
static IOFileFilter |
+FileFilterUtils.nameFileFilter(String name,
+ IOCase caseSensitivity)
+Returns a filter that returns true if the filename matches the specified text.
+ |
+
static IOFileFilter |
+FileFilterUtils.notFileFilter(IOFileFilter filter)
+Returns a filter that NOTs the specified filter.
+ |
+
static IOFileFilter |
+FileFilterUtils.or(IOFileFilter... filters)
+Returns a filter that ORs the specified filters.
+ |
+
static IOFileFilter |
+FileFilterUtils.orFileFilter(IOFileFilter filter1,
+ IOFileFilter filter2)
+Deprecated.
+
+
+ |
+
static IOFileFilter |
+FileFilterUtils.prefixFileFilter(String prefix)
+Returns a filter that returns true if the filename starts with the specified text.
+ |
+
static IOFileFilter |
+FileFilterUtils.prefixFileFilter(String prefix,
+ IOCase caseSensitivity)
+Returns a filter that returns true if the filename starts with the specified text.
+ |
+
static IOFileFilter |
+FileFilterUtils.sizeFileFilter(long threshold)
+Returns a filter that returns true if the file is bigger than a certain size.
+ |
+
static IOFileFilter |
+FileFilterUtils.sizeFileFilter(long threshold,
+ boolean acceptLarger)
+Returns a filter that filters based on file size.
+ |
+
static IOFileFilter |
+FileFilterUtils.sizeRangeFileFilter(long minSizeInclusive,
+ long maxSizeInclusive)
+Returns a filter that accepts files whose size is >= minimum size
+ and <= maximum size.
+ |
+
static IOFileFilter |
+FileFilterUtils.suffixFileFilter(String suffix)
+Returns a filter that returns true if the filename ends with the specified text.
+ |
+
static IOFileFilter |
+FileFilterUtils.suffixFileFilter(String suffix,
+ IOCase caseSensitivity)
+Returns a filter that returns true if the filename ends with the specified text.
+ |
+
static IOFileFilter |
+FileFilterUtils.trueFileFilter()
+Returns a filter that always returns true.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
List<IOFileFilter> |
+OrFileFilter.getFileFilters()
+Returns this conditional file filter's list of file filters.
+ |
+
List<IOFileFilter> |
+AndFileFilter.getFileFilters()
+Returns this conditional file filter's list of file filters.
+ |
+
List<IOFileFilter> |
+ConditionalFileFilter.getFileFilters()
+Returns this conditional file filter's list of file filters.
+ |
+
static List<IOFileFilter> |
+FileFilterUtils.toList(IOFileFilter... filters)
+Create a List of file filters.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+OrFileFilter.addFileFilter(IOFileFilter ioFileFilter)
+Adds the specified file filter to the list of file filters at the end of
+ the list.
+ |
+
void |
+AndFileFilter.addFileFilter(IOFileFilter ioFileFilter)
+Adds the specified file filter to the list of file filters at the end of
+ the list.
+ |
+
void |
+ConditionalFileFilter.addFileFilter(IOFileFilter ioFileFilter)
+Adds the specified file filter to the list of file filters at the end of
+ the list.
+ |
+
static IOFileFilter |
+FileFilterUtils.and(IOFileFilter... filters)
+Returns a filter that ANDs the specified filters.
+ |
+
static IOFileFilter |
+FileFilterUtils.andFileFilter(IOFileFilter filter1,
+ IOFileFilter filter2)
+Deprecated.
+
+
+ |
+
static File[] |
+FileFilterUtils.filter(IOFileFilter filter,
+ File... files)
+
+ Applies an
+IOFileFilter to the provided File
+ objects. |
+
static File[] |
+FileFilterUtils.filter(IOFileFilter filter,
+ Iterable<File> files)
+
+ Applies an
+IOFileFilter to the provided File
+ objects. |
+
static List<File> |
+FileFilterUtils.filterList(IOFileFilter filter,
+ File... files)
+
+ Applies an
+IOFileFilter to the provided File
+ objects. |
+
static List<File> |
+FileFilterUtils.filterList(IOFileFilter filter,
+ Iterable<File> files)
+
+ Applies an
+IOFileFilter to the provided File
+ objects. |
+
static Set<File> |
+FileFilterUtils.filterSet(IOFileFilter filter,
+ File... files)
+
+ Applies an
+IOFileFilter to the provided File
+ objects. |
+
static Set<File> |
+FileFilterUtils.filterSet(IOFileFilter filter,
+ Iterable<File> files)
+
+ Applies an
+IOFileFilter to the provided File
+ objects. |
+
static IOFileFilter |
+FileFilterUtils.makeCVSAware(IOFileFilter filter)
+Decorates a filter to make it ignore CVS directories.
+ |
+
static IOFileFilter |
+FileFilterUtils.makeDirectoryOnly(IOFileFilter filter)
+Decorates a filter so that it only applies to directories and not to files.
+ |
+
static IOFileFilter |
+FileFilterUtils.makeFileOnly(IOFileFilter filter)
+Decorates a filter so that it only applies to files and not to directories.
+ |
+
static IOFileFilter |
+FileFilterUtils.makeSVNAware(IOFileFilter filter)
+Decorates a filter to make it ignore SVN directories.
+ |
+
static IOFileFilter |
+FileFilterUtils.notFileFilter(IOFileFilter filter)
+Returns a filter that NOTs the specified filter.
+ |
+
static IOFileFilter |
+FileFilterUtils.or(IOFileFilter... filters)
+Returns a filter that ORs the specified filters.
+ |
+
static IOFileFilter |
+FileFilterUtils.orFileFilter(IOFileFilter filter1,
+ IOFileFilter filter2)
+Deprecated.
+
+
+ |
+
boolean |
+OrFileFilter.removeFileFilter(IOFileFilter ioFileFilter)
+Removes the specified file filter.
+ |
+
boolean |
+AndFileFilter.removeFileFilter(IOFileFilter ioFileFilter)
+Removes the specified file filter.
+ |
+
boolean |
+ConditionalFileFilter.removeFileFilter(IOFileFilter ioFileFilter)
+Removes the specified file filter.
+ |
+
static List<IOFileFilter> |
+FileFilterUtils.toList(IOFileFilter... filters)
+Create a List of file filters.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+OrFileFilter.setFileFilters(List<IOFileFilter> fileFilters)
+Sets the list of file filters, replacing any previously configured
+ file filters on this filter.
+ |
+
void |
+AndFileFilter.setFileFilters(List<IOFileFilter> fileFilters)
+Sets the list of file filters, replacing any previously configured
+ file filters on this filter.
+ |
+
void |
+ConditionalFileFilter.setFileFilters(List<IOFileFilter> fileFilters)
+Sets the list of file filters, replacing any previously configured
+ file filters on this filter.
+ |
+
Constructor and Description | +
---|
AndFileFilter(IOFileFilter filter1,
+ IOFileFilter filter2)
+Constructs a new file filter that ANDs the result of two other filters.
+ |
+
NotFileFilter(IOFileFilter filter)
+Constructs a new file filter that NOTs the result of another filter.
+ |
+
OrFileFilter(IOFileFilter filter1,
+ IOFileFilter filter2)
+Constructs a new file filter that ORs the result of two other filters.
+ |
+
Constructor and Description | +
---|
AndFileFilter(List<IOFileFilter> fileFilters)
+Constructs a new instance of
+AndFileFilter
+ with the specified list of filters. |
+
OrFileFilter(List<IOFileFilter> fileFilters)
+Constructs a new instance of
+OrFileFilter
+ with the specified filters. |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/MagicNumberFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/MagicNumberFileFilter.html new file mode 100644 index 0000000..6022fcd --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/MagicNumberFileFilter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/NameFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/NameFileFilter.html new file mode 100644 index 0000000..a706e07 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/NameFileFilter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/NotFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/NotFileFilter.html new file mode 100644 index 0000000..3992078 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/NotFileFilter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/OrFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/OrFileFilter.html new file mode 100644 index 0000000..ab114b1 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/OrFileFilter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/PrefixFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/PrefixFileFilter.html new file mode 100644 index 0000000..96abd5c --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/PrefixFileFilter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/RegexFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/RegexFileFilter.html new file mode 100644 index 0000000..0ef246f --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/RegexFileFilter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/SizeFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/SizeFileFilter.html new file mode 100644 index 0000000..4825ed4 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/SizeFileFilter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/SuffixFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/SuffixFileFilter.html new file mode 100644 index 0000000..9586e40 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/SuffixFileFilter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/TrueFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/TrueFileFilter.html new file mode 100644 index 0000000..1c84f85 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/TrueFileFilter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/WildcardFileFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/WildcardFileFilter.html new file mode 100644 index 0000000..ba72c0d --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/WildcardFileFilter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/WildcardFilter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/WildcardFilter.html new file mode 100644 index 0000000..6a83bfa --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/class-use/WildcardFilter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/package-frame.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/package-frame.html new file mode 100644 index 0000000..ebe7587 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/package-frame.html @@ -0,0 +1,45 @@ + + + + + +FileFilter
and FilenameFilter
.See: Description
+Interface | +Description | +
---|---|
ConditionalFileFilter | +
+ Defines operations for conditional file filters.
+ |
+
IOFileFilter | +
+ An interface which brings the FileFilter and FilenameFilter
+ interfaces together.
+ |
+
Class | +Description | +
---|---|
AbstractFileFilter | +
+ An abstract class which implements the Java FileFilter and FilenameFilter
+ interfaces via the IOFileFilter interface.
+ |
+
AgeFileFilter | +
+ Filters files based on a cutoff time, can filter either newer
+ files or files equal to or older.
+ |
+
AndFileFilter | +
+ A
+FileFilter providing conditional AND logic across a list of
+ file filters. |
+
CanReadFileFilter | +
+ This filter accepts
+File s that can be read. |
+
CanWriteFileFilter | +
+ This filter accepts
+File s that can be written to. |
+
DelegateFileFilter | +
+ This class turns a Java FileFilter or FilenameFilter into an IO FileFilter.
+ |
+
DirectoryFileFilter | +
+ This filter accepts
+File s that are directories. |
+
EmptyFileFilter | +
+ This filter accepts files or directories that are empty.
+ |
+
FalseFileFilter | +
+ A file filter that always returns false.
+ |
+
FileFileFilter | +
+ This filter accepts
+File s that are files (not directories). |
+
FileFilterUtils | +
+ Useful utilities for working with file filters.
+ |
+
HiddenFileFilter | +
+ This filter accepts
+File s that are hidden. |
+
MagicNumberFileFilter | +
+
+ File filter for matching files containing a "magic number".
+ |
+
NameFileFilter | +
+ Filters filenames for a certain name.
+ |
+
NotFileFilter | +
+ This filter produces a logical NOT of the filters specified.
+ |
+
OrFileFilter | +
+ A
+FileFilter providing conditional OR logic across a list of
+ file filters. |
+
PrefixFileFilter | +
+ Filters filenames for a certain prefix.
+ |
+
RegexFileFilter | +
+ Filters files using supplied regular expression(s).
+ |
+
SizeFileFilter | +
+ Filters files based on size, can filter either smaller files or
+ files equal to or larger than a given threshold.
+ |
+
SuffixFileFilter | +
+ Filters files based on the suffix (what the filename ends with).
+ |
+
TrueFileFilter | +
+ A file filter that always returns true.
+ |
+
WildcardFileFilter | +
+ Filters files using the supplied wildcards.
+ |
+
WildcardFilter | +Deprecated
+ Use WilcardFileFilter.
+ |
+
This package defines an interface (IOFileFilter) that combines both
+FileFilter
and FilenameFilter
. Besides
+that the package offers a series of ready-to-use implementations of the
+IOFileFilter interface including implementation that allow you to combine
+other such filters.
These filter can be used to list files or in FileDialog
,
+for example.
There are a number of 'primitive' filters:
+ +DirectoryFilter | +Only accept directories | +
PrefixFileFilter | +Filter based on a prefix | +
SuffixFileFilter | +Filter based on a suffix | +
NameFileFilter | +Filter based on a filename | +
WildcardFileFilter | +Filter based on wildcards | +
AgeFileFilter | +Filter based on last modified time of file | +
SizeFileFilter | +Filter based on file size | +
And there are five 'boolean' filters:
+ +TrueFileFilter | +Accept all files | +
FalseFileFilter | +Accept no files | +
NotFileFilter | +Applies a logical NOT to an existing filter | +
AndFileFilter | +Combines two filters using a logical AND | +
OrFileFilter | +Combines two filter using a logical OR | +
These boolean FilenameFilters can be nested, to allow arbitrary expressions. +For example, here is how one could print all non-directory files in the +current directory, starting with "A", and ending in ".java" or ".class":
+ ++ File dir = new File("."); + String[] files = dir.list( + new AndFileFilter( + new AndFileFilter( + new PrefixFileFilter("A"), + new OrFileFilter( + new SuffixFileFilter(".class"), + new SuffixFileFilter(".java") + ) + ), + new NotFileFilter( + new DirectoryFileFilter() + ) + ) + ); + for ( int i=0; i<files.length; i++ ) { + System.out.println(files[i]); + } ++ +
This package also contains a utility class: +FileFilterUtils. It allows you to use all +file filters without having to put them in the import section. Here's how the +above example will look using FileFilterUtils:
++ File dir = new File("."); + String[] files = dir.list( + FileFilterUtils.andFileFilter( + FileFilterUtils.andFileFilter( + FileFilterUtils.prefixFileFilter("A"), + FileFilterUtils.orFileFilter( + FileFilterUtils.suffixFileFilter(".class"), + FileFilterUtils.suffixFileFilter(".java") + ) + ), + FileFilterUtils.notFileFilter( + FileFilterUtils.directoryFileFilter() + ) + ) + ); + for ( int i=0; i<files.length; i++ ) { + System.out.println(files[i]); + } ++
There are a few other goodies in that class so please have a look at the +documentation in detail.
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/package-tree.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/package-tree.html new file mode 100644 index 0000000..5b33f33 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/package-tree.html @@ -0,0 +1,167 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/package-use.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/package-use.html new file mode 100644 index 0000000..ab5e3cc --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/filefilter/package-use.html @@ -0,0 +1,191 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io | +
+
+This package defines utility classes for working with streams, readers,
+writers and files.
+ |
+
org.apache.commons.io.filefilter | +
+ This package defines an interface (IOFileFilter) that combines both
+
+FileFilter and FilenameFilter . |
+
Class and Description | +
---|
IOFileFilter
+ An interface which brings the FileFilter and FilenameFilter
+ interfaces together.
+ |
+
Class and Description | +
---|
AbstractFileFilter
+ An abstract class which implements the Java FileFilter and FilenameFilter
+ interfaces via the IOFileFilter interface.
+ |
+
ConditionalFileFilter
+ Defines operations for conditional file filters.
+ |
+
IOFileFilter
+ An interface which brings the FileFilter and FilenameFilter
+ interfaces together.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/AutoCloseInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/AutoCloseInputStream.html new file mode 100644 index 0000000..3bb23e2 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/AutoCloseInputStream.html @@ -0,0 +1,385 @@ + + + + + +public class AutoCloseInputStream +extends ProxyInputStream+
+ This class is typically used to release any resources related to an open + stream as soon as possible even if the client application (by not explicitly + closing the stream when no longer needed) or the underlying stream (by not + releasing resources once the last byte has been read) do not do that.
in
Constructor and Description | +
---|
AutoCloseInputStream(InputStream in)
+Creates an automatically closing proxy for the given input stream.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+afterRead(int n)
+Automatically closes the stream if the end of stream was reached.
+ |
+
void |
+close()
+Closes the underlying input stream and replaces the reference to it
+ with a
+ClosedInputStream instance. |
+
protected void |
+finalize()
+Ensures that the stream is closed before it gets garbage-collected.
+ |
+
available, beforeRead, handleIOException, mark, markSupported, read, read, read, reset, skip
public AutoCloseInputStream(InputStream in)+
in
- underlying input streampublic void close() + throws IOException+
ClosedInputStream
instance.
+ + This method is automatically called by the read methods when the end + of input has been reached. +
+ Note that it is safe to call this method any number of times. The original + underlying input stream is closed and discarded only once when this + method is first called.
close
in interface Closeable
close
in interface AutoCloseable
close
in class ProxyInputStream
IOException
- if the underlying input stream can not be closedprotected void afterRead(int n) + throws IOException+
afterRead
in class ProxyInputStream
n
- number of bytes read, or -1 if no more bytes are availableIOException
- if the stream could not be closedCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/BOMInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/BOMInputStream.html new file mode 100644 index 0000000..920b09b --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/BOMInputStream.html @@ -0,0 +1,626 @@ + + + + + +public class BOMInputStream +extends ProxyInputStream+
ByteOrderMark
as its first bytes.
+
+ This class detects these bytes and, if required, can automatically skip them and return the subsequent byte as the
+ first byte in the stream.
+
+ The ByteOrderMark
implementation has the following pre-defined BOMs:
+ ByteOrderMark.UTF_8
ByteOrderMark.UTF_16LE
ByteOrderMark.UTF_16BE
ByteOrderMark.UTF_32LE
ByteOrderMark.UTF_32BE
+ BOMInputStream bomIn = new BOMInputStream(in); + if (bomIn.hasBOM()) { + // has a UTF-8 BOM + } ++ +
+ boolean include = true; + BOMInputStream bomIn = new BOMInputStream(in, include); + if (bomIn.hasBOM()) { + // has a UTF-8 BOM + } ++ +
+ BOMInputStream bomIn = new BOMInputStream(in, + ByteOrderMark.UTF_16LE, ByteOrderMark.UTF_16BE, + ByteOrderMark.UTF_32LE, ByteOrderMark.UTF_32BE + ); + if (bomIn.hasBOM() == false) { + // No BOM found + } else if (bomIn.hasBOM(ByteOrderMark.UTF_16LE)) { + // has a UTF-16LE BOM + } else if (bomIn.hasBOM(ByteOrderMark.UTF_16BE)) { + // has a UTF-16BE BOM + } else if (bomIn.hasBOM(ByteOrderMark.UTF_32LE)) { + // has a UTF-32LE BOM + } else if (bomIn.hasBOM(ByteOrderMark.UTF_32BE)) { + // has a UTF-32BE BOM + } +
ByteOrderMark
,
+Wikipedia - Byte Order Markin
Constructor and Description | +
---|
BOMInputStream(InputStream delegate)
+Constructs a new BOM InputStream that excludes a
+ByteOrderMark.UTF_8 BOM. |
+
BOMInputStream(InputStream delegate,
+ boolean include)
+Constructs a new BOM InputStream that detects a a
+ByteOrderMark.UTF_8 and optionally includes it. |
+
BOMInputStream(InputStream delegate,
+ boolean include,
+ ByteOrderMark... boms)
+Constructs a new BOM InputStream that detects the specified BOMs and optionally includes them.
+ |
+
BOMInputStream(InputStream delegate,
+ ByteOrderMark... boms)
+Constructs a new BOM InputStream that excludes the specified BOMs.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
ByteOrderMark |
+getBOM()
+Return the BOM (Byte Order Mark).
+ |
+
String |
+getBOMCharsetName()
+Return the BOM charset Name -
+ByteOrderMark.getCharsetName() . |
+
boolean |
+hasBOM()
+Indicates whether the stream contains one of the specified BOMs.
+ |
+
boolean |
+hasBOM(ByteOrderMark bom)
+Indicates whether the stream contains the specified BOM.
+ |
+
void |
+mark(int readlimit)
+Invokes the delegate's
+mark(int) method. |
+
int |
+read()
+Invokes the delegate's
+read() method, detecting and optionally skipping BOM. |
+
int |
+read(byte[] buf)
+Invokes the delegate's
+read(byte[]) method, detecting and optionally skipping BOM. |
+
int |
+read(byte[] buf,
+ int off,
+ int len)
+Invokes the delegate's
+read(byte[], int, int) method, detecting and optionally skipping BOM. |
+
void |
+reset()
+Invokes the delegate's
+reset() method. |
+
long |
+skip(long n)
+Invokes the delegate's
+skip(long) method, detecting and optionallyskipping BOM. |
+
afterRead, available, beforeRead, close, handleIOException, markSupported
public BOMInputStream(InputStream delegate)+
ByteOrderMark.UTF_8
BOM.delegate
- the InputStream to delegate topublic BOMInputStream(InputStream delegate, + boolean include)+
ByteOrderMark.UTF_8
and optionally includes it.delegate
- the InputStream to delegate toinclude
- true to include the UTF-8 BOM or false to exclude itpublic BOMInputStream(InputStream delegate, + ByteOrderMark... boms)+
delegate
- the InputStream to delegate toboms
- The BOMs to detect and excludepublic BOMInputStream(InputStream delegate, + boolean include, + ByteOrderMark... boms)+
delegate
- the InputStream to delegate toinclude
- true to include the specified BOMs or false to exclude themboms
- The BOMs to detect and optionally excludepublic boolean hasBOM() + throws IOException+
IOException
- if an error reading the first bytes of the stream occurspublic boolean hasBOM(ByteOrderMark bom) + throws IOException+
bom
- The BOM to check forIllegalArgumentException
- if the BOM is not one the stream is configured to detectIOException
- if an error reading the first bytes of the stream occurspublic ByteOrderMark getBOM() + throws IOException+
IOException
- if an error reading the first bytes of the stream occurspublic String getBOMCharsetName() + throws IOException+
ByteOrderMark.getCharsetName()
.IOException
- if an error reading the first bytes of the stream occurspublic int read() + throws IOException+
read()
method, detecting and optionally skipping BOM.read
in class ProxyInputStream
IOException
- if an I/O error occurspublic int read(byte[] buf, + int off, + int len) + throws IOException+
read(byte[], int, int)
method, detecting and optionally skipping BOM.read
in class ProxyInputStream
buf
- the buffer to read the bytes intooff
- The start offsetlen
- The number of bytes to read (excluding BOM)IOException
- if an I/O error occurspublic int read(byte[] buf) + throws IOException+
read(byte[])
method, detecting and optionally skipping BOM.read
in class ProxyInputStream
buf
- the buffer to read the bytes intoIOException
- if an I/O error occurspublic void mark(int readlimit)+
mark(int)
method.mark
in class ProxyInputStream
readlimit
- read ahead limitpublic void reset() + throws IOException+
reset()
method.reset
in class ProxyInputStream
IOException
- if an I/O error occurspublic long skip(long n) + throws IOException+
skip(long)
method, detecting and optionallyskipping BOM.skip
in class ProxyInputStream
n
- the number of bytes to skipIOException
- if an I/O error occursCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/BoundedInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/BoundedInputStream.html new file mode 100644 index 0000000..bf31361 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/BoundedInputStream.html @@ -0,0 +1,567 @@ + + + + + +public class BoundedInputStream +extends InputStream+
+ This is useful to wrap ServletInputStreams. The ServletInputStream will block + if you try to read content from it that isn't there, because it doesn't know + whether the content hasn't arrived yet or whether the content has finished. + So, one of these, initialized with the Content-length sent in the + ServletInputStream's header, will stop it blocking, providing it's been sent + with a correct content length.
Constructor and Description | +
---|
BoundedInputStream(InputStream in)
+Creates a new
+BoundedInputStream that wraps the given input
+ stream and is unlimited. |
+
BoundedInputStream(InputStream in,
+ long size)
+Creates a new
+BoundedInputStream that wraps the given input
+ stream and limits it to a certain size. |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+available() |
+
void |
+close()
+
+ |
+
boolean |
+isPropagateClose()
+Indicates whether the
+close() method
+ should propagate to the underling InputStream . |
+
void |
+mark(int readlimit)
+Invokes the delegate's
+mark(int) method. |
+
boolean |
+markSupported()
+Invokes the delegate's
+markSupported() method. |
+
int |
+read()
+Invokes the delegate's
+read() method if
+ the current position is less than the limit. |
+
int |
+read(byte[] b)
+Invokes the delegate's
+read(byte[]) method. |
+
int |
+read(byte[] b,
+ int off,
+ int len)
+Invokes the delegate's
+read(byte[], int, int) method. |
+
void |
+reset()
+Invokes the delegate's
+reset() method. |
+
void |
+setPropagateClose(boolean propagateClose)
+Set whether the
+close() method
+ should propagate to the underling InputStream . |
+
long |
+skip(long n)
+Invokes the delegate's
+skip(long) method. |
+
String |
+toString()
+Invokes the delegate's
+toString() method. |
+
public BoundedInputStream(InputStream in, + long size)+
BoundedInputStream
that wraps the given input
+ stream and limits it to a certain size.in
- The wrapped input streamsize
- The maximum number of bytes to returnpublic BoundedInputStream(InputStream in)+
BoundedInputStream
that wraps the given input
+ stream and is unlimited.in
- The wrapped input streampublic int read() + throws IOException+
read()
method if
+ the current position is less than the limit.read
in class InputStream
IOException
- if an I/O error occurspublic int read(byte[] b) + throws IOException+
read(byte[])
method.read
in class InputStream
b
- the buffer to read the bytes intoIOException
- if an I/O error occurspublic int read(byte[] b, + int off, + int len) + throws IOException+
read(byte[], int, int)
method.read
in class InputStream
b
- the buffer to read the bytes intooff
- The start offsetlen
- The number of bytes to readIOException
- if an I/O error occurspublic long skip(long n) + throws IOException+
skip(long)
method.skip
in class InputStream
n
- the number of bytes to skipIOException
- if an I/O error occurspublic int available() + throws IOException+
available
in class InputStream
IOException
public String toString()+
toString()
method.public void close() + throws IOException+ +
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
- if an I/O error occurspublic void reset() + throws IOException+
reset()
method.reset
in class InputStream
IOException
- if an I/O error occurspublic void mark(int readlimit)+
mark(int)
method.mark
in class InputStream
readlimit
- read ahead limitpublic boolean markSupported()+
markSupported()
method.markSupported
in class InputStream
public boolean isPropagateClose()+
close()
method
+ should propagate to the underling InputStream
.true
if calling close()
+ propagates to the close()
method of the
+ underlying stream or false
if it does not.public void setPropagateClose(boolean propagateClose)+
close()
method
+ should propagate to the underling InputStream
.propagateClose
- true
if calling
+ close()
propagates to the close()
+ method of the underlying stream or
+ false
if it does not.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/BoundedReader.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/BoundedReader.html new file mode 100644 index 0000000..8023f7c --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/BoundedReader.html @@ -0,0 +1,421 @@ + + + + + +public class BoundedReader +extends Reader+
+ One use case is to avoid overrunning the readAheadLimit supplied to + java.io.Reader#mark(int), since reading too many characters removes the + ability to do a successful reset. +
Constructor and Description | +
---|
BoundedReader(Reader target,
+ int maxCharsFromTargetReader)
+Constructs a bounded reader
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+close()
+Closes the target
+ |
+
void |
+mark(int readAheadLimit)
+marks the target stream, @see java.io.Reader#mark(int).
+ |
+
int |
+read()
+Reads a single character, @see java.io.Reader#read()
+ |
+
int |
+read(char[] cbuf,
+ int off,
+ int len)
+Reads into an array, @see java.io.Reader#read(char[], int, int)
+ |
+
void |
+reset()
+Resets the target to the latest mark, @see java.io.Reader#reset()
+ |
+
public BoundedReader(Reader target, + int maxCharsFromTargetReader) + throws IOException+
target
- The target stream that will be usedmaxCharsFromTargetReader
- The maximum number of characters that can be read from targetIOException
- if mark failspublic void close() + throws IOException+
close
in interface Closeable
close
in interface AutoCloseable
close
in class Reader
IOException
- If an I/O error occurs while calling the underlying reader's close methodpublic void reset() + throws IOException+
reset
in class Reader
IOException
- If an I/O error occurs while calling the underlying reader's reset methodpublic void mark(int readAheadLimit) + throws IOException+
mark
in class Reader
readAheadLimit
- The number of characters that can be read while
+ still retaining the ability to do #reset().
+ Note that this parameter is not validated with respect to
+ maxCharsFromTargetReader. There is no way to pass
+ past maxCharsFromTargetReader, even if this value is
+ greater.IOException
- If an I/O error occurs while calling the underlying reader's mark methodpublic int read() + throws IOException+
read
in class Reader
IOException
- If an I/O error occurs while calling the underlying reader's read methodpublic int read(char[] cbuf, + int off, + int len) + throws IOException+
read
in class Reader
cbuf
- The buffer to filloff
- The offsetlen
- The number of chars to readIOException
- If an I/O error occurs while calling the underlying reader's read methodCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/BrokenInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/BrokenInputStream.html new file mode 100644 index 0000000..efbd53b --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/BrokenInputStream.html @@ -0,0 +1,403 @@ + + + + + +public class BrokenInputStream +extends InputStream+
IOException
from
+ all the InputStream
methods where the exception is declared.
+ + This class is mostly useful for testing error handling in code that uses an + input stream.
Constructor and Description | +
---|
BrokenInputStream()
+Creates a new stream that always throws an
+IOException |
+
BrokenInputStream(IOException exception)
+Creates a new stream that always throws the given exception.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+available()
+Throws the configured exception.
+ |
+
void |
+close()
+Throws the configured exception.
+ |
+
int |
+read()
+Throws the configured exception.
+ |
+
void |
+reset()
+Throws the configured exception.
+ |
+
long |
+skip(long n)
+Throws the configured exception.
+ |
+
mark, markSupported, read, read
public BrokenInputStream(IOException exception)+
exception
- the exception to be thrownpublic BrokenInputStream()+
IOException
public int read() + throws IOException+
read
in class InputStream
IOException
- always thrownpublic int available() + throws IOException+
available
in class InputStream
IOException
- always thrownpublic long skip(long n) + throws IOException+
skip
in class InputStream
n
- ignoredIOException
- always thrownpublic void reset() + throws IOException+
reset
in class InputStream
IOException
- always thrownpublic void close() + throws IOException+
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
- always thrownCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/CharSequenceInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/CharSequenceInputStream.html new file mode 100644 index 0000000..699e275 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/CharSequenceInputStream.html @@ -0,0 +1,513 @@ + + + + + +public class CharSequenceInputStream +extends InputStream+
InputStream
implementation that can read from String, StringBuffer,
+ StringBuilder or CharBuffer.
+ Constructor and Description | +
---|
CharSequenceInputStream(CharSequence cs,
+ Charset charset)
+Constructor, calls
+CharSequenceInputStream(CharSequence, Charset, int)
+ with a buffer size of 2048. |
+
CharSequenceInputStream(CharSequence cs,
+ Charset charset,
+ int bufferSize)
+Constructor.
+ |
+
CharSequenceInputStream(CharSequence cs,
+ String charset)
+Constructor, calls
+CharSequenceInputStream(CharSequence, String, int)
+ with a buffer size of 2048. |
+
CharSequenceInputStream(CharSequence cs,
+ String charset,
+ int bufferSize)
+Constructor, calls
+CharSequenceInputStream(CharSequence, Charset, int) . |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+available()
+Return an estimate of the number of bytes remaining in the byte stream.
+ |
+
void |
+close() |
+
void |
+mark(int readlimit) |
+
boolean |
+markSupported() |
+
int |
+read() |
+
int |
+read(byte[] b) |
+
int |
+read(byte[] b,
+ int off,
+ int len) |
+
void |
+reset() |
+
long |
+skip(long n) |
+
public CharSequenceInputStream(CharSequence cs, + Charset charset, + int bufferSize)+
cs
- the input character sequencecharset
- the character set name to usebufferSize
- the buffer size to use.IllegalArgumentException
- if the buffer is not large enough to hold a complete characterpublic CharSequenceInputStream(CharSequence cs, + String charset, + int bufferSize)+
CharSequenceInputStream(CharSequence, Charset, int)
.cs
- the input character sequencecharset
- the character set name to usebufferSize
- the buffer size to use.IllegalArgumentException
- if the buffer is not large enough to hold a complete characterpublic CharSequenceInputStream(CharSequence cs, + Charset charset)+
CharSequenceInputStream(CharSequence, Charset, int)
+ with a buffer size of 2048.cs
- the input character sequencecharset
- the character set name to useIllegalArgumentException
- if the buffer is not large enough to hold a complete characterpublic CharSequenceInputStream(CharSequence cs, + String charset)+
CharSequenceInputStream(CharSequence, String, int)
+ with a buffer size of 2048.cs
- the input character sequencecharset
- the character set name to useIllegalArgumentException
- if the buffer is not large enough to hold a complete characterpublic int read(byte[] b, + int off, + int len) + throws IOException+
read
in class InputStream
IOException
public int read() + throws IOException+
read
in class InputStream
IOException
public int read(byte[] b) + throws IOException+
read
in class InputStream
IOException
public long skip(long n) + throws IOException+
skip
in class InputStream
IOException
public int available() + throws IOException+
available
in class InputStream
IOException
- if an error occurs (probably not possible)public void close() + throws IOException+
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
public void mark(int readlimit)+
mark
in class InputStream
readlimit
- max read limit (ignored)public void reset() + throws IOException+
reset
in class InputStream
IOException
public boolean markSupported()+
markSupported
in class InputStream
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/CharSequenceReader.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/CharSequenceReader.html new file mode 100644 index 0000000..1ca466e --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/CharSequenceReader.html @@ -0,0 +1,464 @@ + + + + + +public class CharSequenceReader +extends Reader +implements Serializable+
Reader
implementation that can read from String, StringBuffer,
+ StringBuilder or CharBuffer.
+ Constructor and Description | +
---|
CharSequenceReader(CharSequence charSequence)
+Construct a new instance with the specified character sequence.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+close()
+Close resets the file back to the start and removes any marked position.
+ |
+
void |
+mark(int readAheadLimit)
+Mark the current position.
+ |
+
boolean |
+markSupported()
+Mark is supported (returns true).
+ |
+
int |
+read()
+Read a single character.
+ |
+
int |
+read(char[] array,
+ int offset,
+ int length)
+Read the sepcified number of characters into the array.
+ |
+
void |
+reset()
+Reset the reader to the last marked position (or the beginning if
+ mark has not been called).
+ |
+
long |
+skip(long n)
+Skip the specified number of characters.
+ |
+
String |
+toString()
+Return a String representation of the underlying
+ character sequence.
+ |
+
public CharSequenceReader(CharSequence charSequence)+
charSequence
- The character sequence, may be null
public void close()+
public void mark(int readAheadLimit)+
public boolean markSupported()+
markSupported
in class Reader
true
public int read()+
public int read(char[] array, + int offset, + int length)+
public void reset()+
public long skip(long n)+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/ClassLoaderObjectInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/ClassLoaderObjectInputStream.html new file mode 100644 index 0000000..04e743e --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/ClassLoaderObjectInputStream.html @@ -0,0 +1,385 @@ + + + + + +public class ClassLoaderObjectInputStream +extends ObjectInputStream+
ClassLoader
rather than the system default.
+ + This is useful in dynamic container environments.
ObjectInputStream.GetField
baseWireHandle, PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, SC_BLOCK_DATA, SC_ENUM, SC_EXTERNALIZABLE, SC_SERIALIZABLE, SC_WRITE_METHOD, STREAM_MAGIC, STREAM_VERSION, SUBCLASS_IMPLEMENTATION_PERMISSION, SUBSTITUTION_PERMISSION, TC_ARRAY, TC_BASE, TC_BLOCKDATA, TC_BLOCKDATALONG, TC_CLASS, TC_CLASSDESC, TC_ENDBLOCKDATA, TC_ENUM, TC_EXCEPTION, TC_LONGSTRING, TC_MAX, TC_NULL, TC_OBJECT, TC_PROXYCLASSDESC, TC_REFERENCE, TC_RESET, TC_STRING
Constructor and Description | +
---|
ClassLoaderObjectInputStream(ClassLoader classLoader,
+ InputStream inputStream)
+Constructs a new ClassLoaderObjectInputStream.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
protected Class<?> |
+resolveClass(ObjectStreamClass objectStreamClass)
+Resolve a class specified by the descriptor using the
+ specified ClassLoader or the super ClassLoader.
+ |
+
protected Class<?> |
+resolveProxyClass(String[] interfaces)
+Create a proxy class that implements the specified interfaces using
+ the specified ClassLoader or the super ClassLoader.
+ |
+
available, close, defaultReadObject, enableResolveObject, read, read, readBoolean, readByte, readChar, readClassDescriptor, readDouble, readFields, readFloat, readFully, readFully, readInt, readLine, readLong, readObject, readObjectOverride, readShort, readStreamHeader, readUnshared, readUnsignedByte, readUnsignedShort, readUTF, registerValidation, resolveObject, skipBytes
mark, markSupported, read, reset, skip
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
read, skip
public ClassLoaderObjectInputStream(ClassLoader classLoader, + InputStream inputStream) + throws IOException, + StreamCorruptedException+
classLoader
- the ClassLoader from which classes should be loadedinputStream
- the InputStream to work onIOException
- in case of an I/O errorStreamCorruptedException
- if the stream is corruptedprotected Class<?> resolveClass(ObjectStreamClass objectStreamClass) + throws IOException, + ClassNotFoundException+
resolveClass
in class ObjectInputStream
objectStreamClass
- descriptor of the classIOException
- in case of an I/O errorClassNotFoundException
- if the Class cannot be foundprotected Class<?> resolveProxyClass(String[] interfaces) + throws IOException, + ClassNotFoundException+
resolveProxyClass
in class ObjectInputStream
interfaces
- the interfaces to implementIOException
- in case of an I/O errorClassNotFoundException
- if the Class cannot be foundObjectInputStream.resolveProxyClass(java.lang.String[])
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/CloseShieldInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/CloseShieldInputStream.html new file mode 100644 index 0000000..e145eca --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/CloseShieldInputStream.html @@ -0,0 +1,326 @@ + + + + + +public class CloseShieldInputStream +extends ProxyInputStream+
+ This class is typically used in cases where an input stream needs to be + passed to a component that wants to explicitly close the stream even if + more input would still be available to other components.
in
Constructor and Description | +
---|
CloseShieldInputStream(InputStream in)
+Creates a proxy that shields the given input stream from being
+ closed.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+close()
+Replaces the underlying input stream with a
+ClosedInputStream
+ sentinel. |
+
afterRead, available, beforeRead, handleIOException, mark, markSupported, read, read, read, reset, skip
public CloseShieldInputStream(InputStream in)+
in
- underlying input streampublic void close()+
ClosedInputStream
+ sentinel. The original input stream will remain open, but this proxy
+ will appear closed.close
in interface Closeable
close
in interface AutoCloseable
close
in class ProxyInputStream
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/ClosedInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/ClosedInputStream.html new file mode 100644 index 0000000..3738993 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/ClosedInputStream.html @@ -0,0 +1,328 @@ + + + + + +public class ClosedInputStream +extends InputStream+
+ Typically uses of this class include testing for corner cases in methods
+ that accept input streams and acting as a sentinel value instead of a
+ null
input stream.
Modifier and Type | +Field and Description | +
---|---|
static ClosedInputStream |
+CLOSED_INPUT_STREAM
+A singleton.
+ |
+
Constructor and Description | +
---|
ClosedInputStream() |
+
public static final ClosedInputStream CLOSED_INPUT_STREAM+
public int read()+
read
in class InputStream
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/CountingInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/CountingInputStream.html new file mode 100644 index 0000000..13f62ca --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/CountingInputStream.html @@ -0,0 +1,432 @@ + + + + + +public class CountingInputStream +extends ProxyInputStream+
+ A typical use case would be during debugging, to ensure that data is being + read as expected.
in
Constructor and Description | +
---|
CountingInputStream(InputStream in)
+Constructs a new CountingInputStream.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+afterRead(int n)
+Adds the number of read bytes to the count.
+ |
+
long |
+getByteCount()
+The number of bytes that have passed through this stream.
+ |
+
int |
+getCount()
+The number of bytes that have passed through this stream.
+ |
+
long |
+resetByteCount()
+Set the byte count back to 0.
+ |
+
int |
+resetCount()
+Set the byte count back to 0.
+ |
+
long |
+skip(long length)
+Skips the stream over the specified number of bytes, adding the skipped
+ amount to the count.
+ |
+
available, beforeRead, close, handleIOException, mark, markSupported, read, read, read, reset
public CountingInputStream(InputStream in)+
in
- the InputStream to delegate topublic long skip(long length) + throws IOException+
skip
in class ProxyInputStream
length
- the number of bytes to skipIOException
- if an I/O error occursInputStream.skip(long)
protected void afterRead(int n)+
afterRead
in class ProxyInputStream
n
- number of bytes read, or -1 if no more bytes are availablepublic int getCount()+
+ NOTE: From v1.3 this method throws an ArithmeticException if the
+ count is greater than can be expressed by an int
.
+ See getByteCount()
for a method using a long
.
ArithmeticException
- if the byte count is too largepublic int resetCount()+
+ NOTE: From v1.3 this method throws an ArithmeticException if the
+ count is greater than can be expressed by an int
.
+ See resetByteCount()
for a method using a long
.
ArithmeticException
- if the byte count is too largepublic long getByteCount()+
+ NOTE: This method is an alternative for getCount()
+ and was added because that method returns an integer which will
+ result in incorrect count for files over 2GB.
public long resetByteCount()+
+ NOTE: This method is an alternative for resetCount()
+ and was added because that method returns an integer which will
+ result in incorrect count for files over 2GB.
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/DemuxInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/DemuxInputStream.html new file mode 100644 index 0000000..1f9f799 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/DemuxInputStream.html @@ -0,0 +1,330 @@ + + + + + +public class DemuxInputStream +extends InputStream+
Constructor and Description | +
---|
DemuxInputStream() |
+
Modifier and Type | +Method and Description | +
---|---|
InputStream |
+bindStream(InputStream input)
+Bind the specified stream to the current thread.
+ |
+
void |
+close()
+Closes stream associated with current thread.
+ |
+
int |
+read()
+Read byte from stream associated with current thread.
+ |
+
available, mark, markSupported, read, read, reset, skip
public InputStream bindStream(InputStream input)+
input
- the stream to bindpublic void close() + throws IOException+
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
- if an error occurspublic int read() + throws IOException+
read
in class InputStream
IOException
- if an error occursCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/NullInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/NullInputStream.html new file mode 100644 index 0000000..4c25328 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/NullInputStream.html @@ -0,0 +1,631 @@ + + + + + +public class NullInputStream +extends InputStream+
InputStream
that emulates
+ a stream of a specified size.
+
+ This implementation provides a light weight
+ object for testing with an InputStream
+ where the contents don't matter.
+
+ One use case would be for testing the handling of
+ large InputStream
as it can emulate that
+ scenario without the overhead of actually processing
+ large numbers of bytes - significantly speeding up
+ test execution times.
+
+ This implementation returns zero from the method that
+ reads a byte and leaves the array unchanged in the read
+ methods that are passed a byte array.
+ If alternative data is required the processByte()
and
+ processBytes()
methods can be implemented to generate
+ data, for example:
+
+
+ public class TestInputStream extends NullInputStream { + public TestInputStream(int size) { + super(size); + } + protected int processByte() { + return ... // return required value here + } + protected void processBytes(byte[] bytes, int offset, int length) { + for (int i = offset; i < length; i++) { + bytes[i] = ... // set array value here + } + } + } +
Constructor and Description | +
---|
NullInputStream(long size)
+Create an
+InputStream that emulates a specified size
+ which supports marking and does not throw EOFException. |
+
NullInputStream(long size,
+ boolean markSupported,
+ boolean throwEofException)
+Create an
+InputStream that emulates a specified
+ size with option settings. |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+available()
+Return the number of bytes that can be read.
+ |
+
void |
+close()
+Close this input stream - resets the internal state to
+ the initial values.
+ |
+
long |
+getPosition()
+Return the current position.
+ |
+
long |
+getSize()
+Return the size this
+InputStream emulates. |
+
void |
+mark(int readlimit)
+Mark the current position.
+ |
+
boolean |
+markSupported()
+Indicates whether mark is supported.
+ |
+
protected int |
+processByte()
+Return a byte value for the
+read() method. |
+
protected void |
+processBytes(byte[] bytes,
+ int offset,
+ int length)
+Process the bytes for the
+read(byte[], offset, length)
+ method. |
+
int |
+read()
+Read a byte.
+ |
+
int |
+read(byte[] bytes)
+Read some bytes into the specified array.
+ |
+
int |
+read(byte[] bytes,
+ int offset,
+ int length)
+Read the specified number bytes into an array.
+ |
+
void |
+reset()
+Reset the stream to the point when mark was last called.
+ |
+
long |
+skip(long numberOfBytes)
+Skip a specified number of bytes.
+ |
+
public NullInputStream(long size)+
InputStream
that emulates a specified size
+ which supports marking and does not throw EOFException.size
- The size of the input stream to emulate.public NullInputStream(long size, + boolean markSupported, + boolean throwEofException)+
InputStream
that emulates a specified
+ size with option settings.size
- The size of the input stream to emulate.markSupported
- Whether this instance will support
+ the mark()
functionality.throwEofException
- Whether this implementation
+ will throw an EOFException
or return -1 when the
+ end of file is reached.public long getPosition()+
public long getSize()+
InputStream
emulates.public int available()+
available
in class InputStream
public void close() + throws IOException+
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
- If an error occurs.public void mark(int readlimit)+
mark
in class InputStream
readlimit
- The number of bytes before this marked position
+ is invalid.UnsupportedOperationException
- if mark is not supported.public boolean markSupported()+
markSupported
in class InputStream
public int read() + throws IOException+
read
in class InputStream
processByte()
+ or -1
if the end of file has been reached and
+ throwEofException
is set to false
.EOFException
- if the end of file is reached and
+ throwEofException
is set to true
.IOException
- if trying to read past the end of file.public int read(byte[] bytes) + throws IOException+
read
in class InputStream
bytes
- The byte array to read into-1
+ if the end of file has been reached and
+ throwEofException
is set to false
.EOFException
- if the end of file is reached and
+ throwEofException
is set to true
.IOException
- if trying to read past the end of file.public int read(byte[] bytes, + int offset, + int length) + throws IOException+
read
in class InputStream
bytes
- The byte array to read into.offset
- The offset to start reading bytes into.length
- The number of bytes to read.-1
+ if the end of file has been reached and
+ throwEofException
is set to false
.EOFException
- if the end of file is reached and
+ throwEofException
is set to true
.IOException
- if trying to read past the end of file.public void reset() + throws IOException+
reset
in class InputStream
UnsupportedOperationException
- if mark is not supported.IOException
- If no position has been marked
+ or the read limit has been exceed since the last position was
+ marked.public long skip(long numberOfBytes) + throws IOException+
skip
in class InputStream
numberOfBytes
- The number of bytes to skip.-1
+ if the end of file has been reached and
+ throwEofException
is set to false
.EOFException
- if the end of file is reached and
+ throwEofException
is set to true
.IOException
- if trying to read past the end of file.protected int processByte()+
read()
method.
+ + This implementation returns zero.
protected void processBytes(byte[] bytes, + int offset, + int length)+
read(byte[], offset, length)
+ method.
+ + This implementation leaves the byte array unchanged.
bytes
- The byte arrayoffset
- The offset to start at.length
- The number of bytes.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/NullReader.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/NullReader.html new file mode 100644 index 0000000..940ecee --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/NullReader.html @@ -0,0 +1,633 @@ + + + + + +public class NullReader +extends Reader+
Reader
that emulates
+ a reader of a specified size.
+
+ This implementation provides a light weight
+ object for testing with an Reader
+ where the contents don't matter.
+
+ One use case would be for testing the handling of
+ large Reader
as it can emulate that
+ scenario without the overhead of actually processing
+ large numbers of characters - significantly speeding up
+ test execution times.
+
+ This implementation returns a space from the method that
+ reads a character and leaves the array unchanged in the read
+ methods that are passed a character array.
+ If alternative data is required the processChar()
and
+ processChars()
methods can be implemented to generate
+ data, for example:
+
+
+ public class TestReader extends NullReader { + public TestReader(int size) { + super(size); + } + protected char processChar() { + return ... // return required value here + } + protected void processChars(char[] chars, int offset, int length) { + for (int i = offset; i < length; i++) { + chars[i] = ... // set array value here + } + } + } +
Constructor and Description | +
---|
NullReader(long size)
+Create a
+Reader that emulates a specified size
+ which supports marking and does not throw EOFException. |
+
NullReader(long size,
+ boolean markSupported,
+ boolean throwEofException)
+Create a
+Reader that emulates a specified
+ size with option settings. |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+close()
+Close this Reader - resets the internal state to
+ the initial values.
+ |
+
long |
+getPosition()
+Return the current position.
+ |
+
long |
+getSize()
+Return the size this
+Reader emulates. |
+
void |
+mark(int readlimit)
+Mark the current position.
+ |
+
boolean |
+markSupported()
+Indicates whether mark is supported.
+ |
+
protected int |
+processChar()
+Return a character value for the
+read() method. |
+
protected void |
+processChars(char[] chars,
+ int offset,
+ int length)
+Process the characters for the
+read(char[], offset, length)
+ method. |
+
int |
+read()
+Read a character.
+ |
+
int |
+read(char[] chars)
+Read some characters into the specified array.
+ |
+
int |
+read(char[] chars,
+ int offset,
+ int length)
+Read the specified number characters into an array.
+ |
+
void |
+reset()
+Reset the stream to the point when mark was last called.
+ |
+
long |
+skip(long numberOfChars)
+Skip a specified number of characters.
+ |
+
public NullReader(long size)+
Reader
that emulates a specified size
+ which supports marking and does not throw EOFException.size
- The size of the reader to emulate.public NullReader(long size, + boolean markSupported, + boolean throwEofException)+
Reader
that emulates a specified
+ size with option settings.size
- The size of the reader to emulate.markSupported
- Whether this instance will support
+ the mark()
functionality.throwEofException
- Whether this implementation
+ will throw an EOFException
or return -1 when the
+ end of file is reached.public long getPosition()+
public long getSize()+
Reader
emulates.public void close() + throws IOException+
close
in interface Closeable
close
in interface AutoCloseable
close
in class Reader
IOException
- If an error occurs.public void mark(int readlimit)+
mark
in class Reader
readlimit
- The number of characters before this marked position
+ is invalid.UnsupportedOperationException
- if mark is not supported.public boolean markSupported()+
markSupported
in class Reader
public int read() + throws IOException+
read
in class Reader
processChar()
+ or -1
if the end of file has been reached and
+ throwEofException
is set to false
.EOFException
- if the end of file is reached and
+ throwEofException
is set to true
.IOException
- if trying to read past the end of file.public int read(char[] chars) + throws IOException+
read
in class Reader
chars
- The character array to read into-1
+ if the end of file has been reached and
+ throwEofException
is set to false
.EOFException
- if the end of file is reached and
+ throwEofException
is set to true
.IOException
- if trying to read past the end of file.public int read(char[] chars, + int offset, + int length) + throws IOException+
read
in class Reader
chars
- The character array to read into.offset
- The offset to start reading characters into.length
- The number of characters to read.-1
+ if the end of file has been reached and
+ throwEofException
is set to false
.EOFException
- if the end of file is reached and
+ throwEofException
is set to true
.IOException
- if trying to read past the end of file.public void reset() + throws IOException+
reset
in class Reader
UnsupportedOperationException
- if mark is not supported.IOException
- If no position has been marked
+ or the read limit has been exceed since the last position was
+ marked.public long skip(long numberOfChars) + throws IOException+
skip
in class Reader
numberOfChars
- The number of characters to skip.-1
+ if the end of file has been reached and
+ throwEofException
is set to false
.EOFException
- if the end of file is reached and
+ throwEofException
is set to true
.IOException
- if trying to read past the end of file.protected int processChar()+
read()
method.
+ + This implementation returns zero.
protected void processChars(char[] chars, + int offset, + int length)+
read(char[], offset, length)
+ method.
+ + This implementation leaves the character array unchanged.
chars
- The character arrayoffset
- The offset to start at.length
- The number of characters.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/ProxyInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/ProxyInputStream.html new file mode 100644 index 0000000..f1bd83b --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/ProxyInputStream.html @@ -0,0 +1,590 @@ + + + + + +public abstract class ProxyInputStream +extends FilterInputStream+
+ It is an alternative base class to FilterInputStream + to increase reusability, because FilterInputStream changes the + methods being called, such as read(byte[]) to read(byte[], int, int). +
+ See the protected methods for ways in which a subclass can easily decorate + a stream with custom pre-, post- or error processing functionality.
in
Constructor and Description | +
---|
ProxyInputStream(InputStream proxy)
+Constructs a new ProxyInputStream.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+afterRead(int n)
+Invoked by the read methods after the proxied call has returned
+ successfully.
+ |
+
int |
+available()
+Invokes the delegate's
+available() method. |
+
protected void |
+beforeRead(int n)
+Invoked by the read methods before the call is proxied.
+ |
+
void |
+close()
+Invokes the delegate's
+close() method. |
+
protected void |
+handleIOException(IOException e)
+Handle any IOExceptions thrown.
+ |
+
void |
+mark(int readlimit)
+Invokes the delegate's
+mark(int) method. |
+
boolean |
+markSupported()
+Invokes the delegate's
+markSupported() method. |
+
int |
+read()
+Invokes the delegate's
+read() method. |
+
int |
+read(byte[] bts)
+Invokes the delegate's
+read(byte[]) method. |
+
int |
+read(byte[] bts,
+ int off,
+ int len)
+Invokes the delegate's
+read(byte[], int, int) method. |
+
void |
+reset()
+Invokes the delegate's
+reset() method. |
+
long |
+skip(long ln)
+Invokes the delegate's
+skip(long) method. |
+
public ProxyInputStream(InputStream proxy)+
proxy
- the InputStream to delegate topublic int read() + throws IOException+
read()
method.read
in class FilterInputStream
IOException
- if an I/O error occurspublic int read(byte[] bts) + throws IOException+
read(byte[])
method.read
in class FilterInputStream
bts
- the buffer to read the bytes intoIOException
- if an I/O error occurspublic int read(byte[] bts, + int off, + int len) + throws IOException+
read(byte[], int, int)
method.read
in class FilterInputStream
bts
- the buffer to read the bytes intooff
- The start offsetlen
- The number of bytes to readIOException
- if an I/O error occurspublic long skip(long ln) + throws IOException+
skip(long)
method.skip
in class FilterInputStream
ln
- the number of bytes to skipIOException
- if an I/O error occurspublic int available() + throws IOException+
available()
method.available
in class FilterInputStream
IOException
- if an I/O error occurspublic void close() + throws IOException+
close()
method.close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterInputStream
IOException
- if an I/O error occurspublic void mark(int readlimit)+
mark(int)
method.mark
in class FilterInputStream
readlimit
- read ahead limitpublic void reset() + throws IOException+
reset()
method.reset
in class FilterInputStream
IOException
- if an I/O error occurspublic boolean markSupported()+
markSupported()
method.markSupported
in class FilterInputStream
protected void beforeRead(int n) + throws IOException+
read()
+ method, buffer length for read(byte[])
, etc.) is given as
+ an argument.
+ + Subclasses can override this method to add common pre-processing + functionality without having to override all the read methods. + The default implementation does nothing. +
+ Note this method is not called from skip(long)
or
+ reset()
. You need to explicitly override those methods if
+ you want to add pre-processing steps also to them.
n
- number of bytes that the caller asked to be readIOException
- if the pre-processing failsprotected void afterRead(int n) + throws IOException+
+ Subclasses can override this method to add common post-processing + functionality without having to override all the read methods. + The default implementation does nothing. +
+ Note this method is not called from skip(long)
or
+ reset()
. You need to explicitly override those methods if
+ you want to add post-processing steps also to them.
n
- number of bytes read, or -1 if the end of stream was reachedIOException
- if the post-processing failsprotected void handleIOException(IOException e) + throws IOException+
+ This method provides a point to implement custom exception + handling. The default behaviour is to re-throw the exception.
e
- The IOException thrownIOException
- if an I/O error occursCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/ProxyReader.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/ProxyReader.html new file mode 100644 index 0000000..2d7fc06 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/ProxyReader.html @@ -0,0 +1,620 @@ + + + + + +public abstract class ProxyReader +extends FilterReader+
+ It is an alternative base class to FilterReader + to increase reusability, because FilterReader changes the + methods being called, such as read(char[]) to read(char[], int, int).
in
Constructor and Description | +
---|
ProxyReader(Reader proxy)
+Constructs a new ProxyReader.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+afterRead(int n)
+Invoked by the read methods after the proxied call has returned
+ successfully.
+ |
+
protected void |
+beforeRead(int n)
+Invoked by the read methods before the call is proxied.
+ |
+
void |
+close()
+Invokes the delegate's
+close() method. |
+
protected void |
+handleIOException(IOException e)
+Handle any IOExceptions thrown.
+ |
+
void |
+mark(int idx)
+Invokes the delegate's
+mark(int) method. |
+
boolean |
+markSupported()
+Invokes the delegate's
+markSupported() method. |
+
int |
+read()
+Invokes the delegate's
+read() method. |
+
int |
+read(char[] chr)
+Invokes the delegate's
+read(char[]) method. |
+
int |
+read(char[] chr,
+ int st,
+ int len)
+Invokes the delegate's
+read(char[], int, int) method. |
+
int |
+read(CharBuffer target)
+Invokes the delegate's
+read(CharBuffer) method. |
+
boolean |
+ready()
+Invokes the delegate's
+ready() method. |
+
void |
+reset()
+Invokes the delegate's
+reset() method. |
+
long |
+skip(long ln)
+Invokes the delegate's
+skip(long) method. |
+
public ProxyReader(Reader proxy)+
proxy
- the Reader to delegate topublic int read() + throws IOException+
read()
method.read
in class FilterReader
IOException
- if an I/O error occurspublic int read(char[] chr) + throws IOException+
read(char[])
method.read
in class Reader
chr
- the buffer to read the characters intoIOException
- if an I/O error occurspublic int read(char[] chr, + int st, + int len) + throws IOException+
read(char[], int, int)
method.read
in class FilterReader
chr
- the buffer to read the characters intost
- The start offsetlen
- The number of bytes to readIOException
- if an I/O error occurspublic int read(CharBuffer target) + throws IOException+
read(CharBuffer)
method.read
in interface Readable
read
in class Reader
target
- the char buffer to read the characters intoIOException
- if an I/O error occurspublic long skip(long ln) + throws IOException+
skip(long)
method.skip
in class FilterReader
ln
- the number of bytes to skipIOException
- if an I/O error occurspublic boolean ready() + throws IOException+
ready()
method.ready
in class FilterReader
IOException
- if an I/O error occurspublic void close() + throws IOException+
close()
method.close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterReader
IOException
- if an I/O error occurspublic void mark(int idx) + throws IOException+
mark(int)
method.mark
in class FilterReader
idx
- read ahead limitIOException
- if an I/O error occurspublic void reset() + throws IOException+
reset()
method.reset
in class FilterReader
IOException
- if an I/O error occurspublic boolean markSupported()+
markSupported()
method.markSupported
in class FilterReader
protected void beforeRead(int n) + throws IOException+
read()
+ method, buffer length for read(char[])
, etc.) is given as
+ an argument.
+ + Subclasses can override this method to add common pre-processing + functionality without having to override all the read methods. + The default implementation does nothing. +
+ Note this method is not called from skip(long)
or
+ reset()
. You need to explicitly override those methods if
+ you want to add pre-processing steps also to them.
n
- number of chars that the caller asked to be readIOException
- if the pre-processing failsprotected void afterRead(int n) + throws IOException+
+ Subclasses can override this method to add common post-processing + functionality without having to override all the read methods. + The default implementation does nothing. +
+ Note this method is not called from skip(long)
or
+ reset()
. You need to explicitly override those methods if
+ you want to add post-processing steps also to them.
n
- number of chars read, or -1 if the end of stream was reachedIOException
- if the post-processing failsprotected void handleIOException(IOException e) + throws IOException+
+ This method provides a point to implement custom exception + handling. The default behaviour is to re-throw the exception.
e
- The IOException thrownIOException
- if an I/O error occursCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/ReaderInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/ReaderInputStream.html new file mode 100644 index 0000000..871c725 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/ReaderInputStream.html @@ -0,0 +1,538 @@ + + + + + +public class ReaderInputStream +extends InputStream+
InputStream
implementation that reads a character stream from a Reader
+ and transforms it to a byte stream using a specified charset encoding. The stream
+ is transformed using a CharsetEncoder
object, guaranteeing that all charset
+ encodings supported by the JRE are handled correctly. In particular for charsets such as
+ UTF-16, the implementation ensures that one and only one byte order marker
+ is produced.
+
+ Since in general it is not possible to predict the number of characters to be read from the
+ Reader
to satisfy a read request on the ReaderInputStream
, all reads from
+ the Reader
are buffered. There is therefore no well defined correlation
+ between the current position of the Reader
and that of the ReaderInputStream
.
+ This also implies that in general there is no need to wrap the underlying Reader
+ in a BufferedReader
.
+
+ ReaderInputStream
implements the inverse transformation of InputStreamReader
;
+ in the following example, reading from in2
would return the same byte
+ sequence as reading from in
(provided that the initial byte sequence is legal
+ with respect to the charset encoding):
+
+ InputStream in = ... + Charset cs = ... + InputStreamReader reader = new InputStreamReader(in, cs); + ReaderInputStream in2 = new ReaderInputStream(reader, cs);+
ReaderInputStream
implements the same transformation as OutputStreamWriter
,
+ except that the control flow is reversed: both classes transform a character stream
+ into a byte stream, but OutputStreamWriter
pushes data to the underlying stream,
+ while ReaderInputStream
pulls it from the underlying stream.
+
+ Note that while there are use cases where there is no alternative to using
+ this class, very often the need to use this class is an indication of a flaw
+ in the design of the code. This class is typically used in situations where an existing
+ API only accepts an InputStream
, but where the most natural way to produce the data
+ is as a character stream, i.e. by providing a Reader
instance. An example of a situation
+ where this problem may appear is when implementing the DataSource
+ interface from the Java Activation Framework.
+
+ Given the fact that the Reader
class doesn't provide any way to predict whether the next
+ read operation will block or not, it is not possible to provide a meaningful
+ implementation of the InputStream.available()
method. A call to this method
+ will always return 0. Also, this class doesn't support InputStream.mark(int)
.
+
+ Instances of ReaderInputStream
are not thread safe.
WriterOutputStream
Constructor and Description | +
---|
ReaderInputStream(Reader reader)
+Deprecated.
+
+2.5 use
+ReaderInputStream(Reader, Charset) instead |
+
ReaderInputStream(Reader reader,
+ Charset charset)
+Construct a new
+ReaderInputStream with a default input buffer size of
+ 1024 characters. |
+
ReaderInputStream(Reader reader,
+ CharsetEncoder encoder)
+Construct a new
+ReaderInputStream . |
+
ReaderInputStream(Reader reader,
+ CharsetEncoder encoder,
+ int bufferSize)
+Construct a new
+ReaderInputStream . |
+
ReaderInputStream(Reader reader,
+ Charset charset,
+ int bufferSize)
+Construct a new
+ReaderInputStream . |
+
ReaderInputStream(Reader reader,
+ String charsetName)
+Construct a new
+ReaderInputStream with a default input buffer size of
+ 1024 characters. |
+
ReaderInputStream(Reader reader,
+ String charsetName,
+ int bufferSize)
+Construct a new
+ReaderInputStream . |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+close()
+Close the stream.
+ |
+
int |
+read()
+Read a single byte.
+ |
+
int |
+read(byte[] b)
+Read the specified number of bytes into an array.
+ |
+
int |
+read(byte[] b,
+ int off,
+ int len)
+Read the specified number of bytes into an array.
+ |
+
available, mark, markSupported, reset, skip
public ReaderInputStream(Reader reader, + CharsetEncoder encoder)+
ReaderInputStream
.reader
- the target Reader
encoder
- the charset encoderpublic ReaderInputStream(Reader reader, + CharsetEncoder encoder, + int bufferSize)+
ReaderInputStream
.reader
- the target Reader
encoder
- the charset encoderbufferSize
- the size of the input buffer in number of characterspublic ReaderInputStream(Reader reader, + Charset charset, + int bufferSize)+
ReaderInputStream
.reader
- the target Reader
charset
- the charset encodingbufferSize
- the size of the input buffer in number of characterspublic ReaderInputStream(Reader reader, + Charset charset)+
ReaderInputStream
with a default input buffer size of
+ 1024 characters.reader
- the target Reader
charset
- the charset encodingpublic ReaderInputStream(Reader reader, + String charsetName, + int bufferSize)+
ReaderInputStream
.reader
- the target Reader
charsetName
- the name of the charset encodingbufferSize
- the size of the input buffer in number of characterspublic ReaderInputStream(Reader reader, + String charsetName)+
ReaderInputStream
with a default input buffer size of
+ 1024 characters.reader
- the target Reader
charsetName
- the name of the charset encoding@Deprecated +public ReaderInputStream(Reader reader)+
ReaderInputStream(Reader, Charset)
insteadReaderInputStream
that uses the default character encoding
+ with a default input buffer size of 1024 characters.reader
- the target Reader
public int read(byte[] b, + int off, + int len) + throws IOException+
read
in class InputStream
b
- the byte array to read intooff
- the offset to start reading bytes intolen
- the number of bytes to read-1
+ if the end of the stream has been reachedIOException
- if an I/O error occurspublic int read(byte[] b) + throws IOException+
read
in class InputStream
b
- the byte array to read into-1
+ if the end of the stream has been reachedIOException
- if an I/O error occurspublic int read() + throws IOException+
read
in class InputStream
-1
if the end of the stream
+ has been reachedIOException
- if an I/O error occurspublic void close() + throws IOException+
Reader
+ to be closed.close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
- if an I/O error occursCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/ReversedLinesFileReader.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/ReversedLinesFileReader.html new file mode 100644 index 0000000..10fdaac --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/ReversedLinesFileReader.html @@ -0,0 +1,383 @@ + + + + + +public class ReversedLinesFileReader +extends Object +implements Closeable+
Constructor and Description | +
---|
ReversedLinesFileReader(File file)
+Deprecated.
+
+2.5 use
+ReversedLinesFileReader(File, Charset) instead |
+
ReversedLinesFileReader(File file,
+ Charset charset)
+Creates a ReversedLinesFileReader with default block size of 4KB and the
+ specified encoding.
+ |
+
ReversedLinesFileReader(File file,
+ int blockSize,
+ Charset encoding)
+Creates a ReversedLinesFileReader with the given block size and encoding.
+ |
+
ReversedLinesFileReader(File file,
+ int blockSize,
+ String encoding)
+Creates a ReversedLinesFileReader with the given block size and encoding.
+ |
+
@Deprecated +public ReversedLinesFileReader(File file) + throws IOException+
ReversedLinesFileReader(File, Charset)
insteadfile
- the file to be readIOException
- if an I/O error occurspublic ReversedLinesFileReader(File file, + Charset charset) + throws IOException+
file
- the file to be readcharset
- the encoding to useIOException
- if an I/O error occurspublic ReversedLinesFileReader(File file, + int blockSize, + Charset encoding) + throws IOException+
file
- the file to be readblockSize
- size of the internal buffer (for ideal performance this should
+ match with the block size of the underlying file system).encoding
- the encoding of the fileIOException
- if an I/O error occurspublic ReversedLinesFileReader(File file, + int blockSize, + String encoding) + throws IOException+
file
- the file to be readblockSize
- size of the internal buffer (for ideal performance this should
+ match with the block size of the underlying file system).encoding
- the encoding of the fileIOException
- if an I/O error occursUnsupportedCharsetException
- thrown instead of UnsupportedEncodingException
in
+ version 2.2 if the encoding is not supported.public String readLine() + throws IOException+
IOException
- if an I/O error occurspublic void close() + throws IOException+
close
in interface Closeable
close
in interface AutoCloseable
IOException
- if an I/O error occursCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/SwappedDataInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/SwappedDataInputStream.html new file mode 100644 index 0000000..07e6107 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/SwappedDataInputStream.html @@ -0,0 +1,676 @@ + + + + + +public class SwappedDataInputStream +extends ProxyInputStream +implements DataInput+
+ Origin of code: Avalon Excalibur (IO)
in
Constructor and Description | +
---|
SwappedDataInputStream(InputStream input)
+Constructs a SwappedDataInputStream.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+readBoolean()
+Return
+
|
+
byte |
+readByte()
+Invokes the delegate's
+read() method. |
+
char |
+readChar()
+Reads a character delegating to
+readShort() . |
+
double |
+readDouble()
+Delegates to
+EndianUtils.readSwappedDouble(InputStream) . |
+
float |
+readFloat()
+Delegates to
+EndianUtils.readSwappedFloat(InputStream) . |
+
void |
+readFully(byte[] data)
+Invokes the delegate's
+read(byte[] data, int, int) method. |
+
void |
+readFully(byte[] data,
+ int offset,
+ int length)
+Invokes the delegate's
+read(byte[] data, int, int) method. |
+
int |
+readInt()
+Delegates to
+EndianUtils.readSwappedInteger(InputStream) . |
+
String |
+readLine()
+Not currently supported - throws
+UnsupportedOperationException . |
+
long |
+readLong()
+Delegates to
+EndianUtils.readSwappedLong(InputStream) . |
+
short |
+readShort()
+Delegates to
+EndianUtils.readSwappedShort(InputStream) . |
+
int |
+readUnsignedByte()
+Invokes the delegate's
+read() method. |
+
int |
+readUnsignedShort()
+Delegates to
+EndianUtils.readSwappedUnsignedShort(InputStream) . |
+
String |
+readUTF()
+Not currently supported - throws
+UnsupportedOperationException . |
+
int |
+skipBytes(int count)
+Invokes the delegate's
+skip(int) method. |
+
afterRead, available, beforeRead, close, handleIOException, mark, markSupported, read, read, read, reset, skip
public SwappedDataInputStream(InputStream input)+
input
- InputStream to read frompublic boolean readBoolean() + throws IOException, + EOFException+
readByte()
!= 0
readBoolean
in interface DataInput
IOException
- if an I/O error occursEOFException
- if an end of file is reached unexpectedlypublic byte readByte() + throws IOException, + EOFException+
read()
method.readByte
in interface DataInput
IOException
- if an I/O error occursEOFException
- if an end of file is reached unexpectedlypublic char readChar() + throws IOException, + EOFException+
readShort()
.readChar
in interface DataInput
IOException
- if an I/O error occursEOFException
- if an end of file is reached unexpectedlypublic double readDouble() + throws IOException, + EOFException+
EndianUtils.readSwappedDouble(InputStream)
.readDouble
in interface DataInput
IOException
- if an I/O error occursEOFException
- if an end of file is reached unexpectedlypublic float readFloat() + throws IOException, + EOFException+
EndianUtils.readSwappedFloat(InputStream)
.readFloat
in interface DataInput
IOException
- if an I/O error occursEOFException
- if an end of file is reached unexpectedlypublic void readFully(byte[] data) + throws IOException, + EOFException+
read(byte[] data, int, int)
method.readFully
in interface DataInput
data
- the buffer to read the bytes intoEOFException
- if an end of file is reached unexpectedlyIOException
- if an I/O error occurspublic void readFully(byte[] data, + int offset, + int length) + throws IOException, + EOFException+
read(byte[] data, int, int)
method.readFully
in interface DataInput
data
- the buffer to read the bytes intooffset
- The start offsetlength
- The number of bytes to readEOFException
- if an end of file is reached unexpectedlyIOException
- if an I/O error occurspublic int readInt() + throws IOException, + EOFException+
EndianUtils.readSwappedInteger(InputStream)
.readInt
in interface DataInput
EOFException
- if an end of file is reached unexpectedlyIOException
- if an I/O error occurspublic String readLine() + throws IOException, + EOFException+
UnsupportedOperationException
.readLine
in interface DataInput
EOFException
- if an end of file is reached unexpectedlyIOException
- if an I/O error occurspublic long readLong() + throws IOException, + EOFException+
EndianUtils.readSwappedLong(InputStream)
.readLong
in interface DataInput
EOFException
- if an end of file is reached unexpectedlyIOException
- if an I/O error occurspublic short readShort() + throws IOException, + EOFException+
EndianUtils.readSwappedShort(InputStream)
.readShort
in interface DataInput
EOFException
- if an end of file is reached unexpectedlyIOException
- if an I/O error occurspublic int readUnsignedByte() + throws IOException, + EOFException+
read()
method.readUnsignedByte
in interface DataInput
EOFException
- if an end of file is reached unexpectedlyIOException
- if an I/O error occurspublic int readUnsignedShort() + throws IOException, + EOFException+
EndianUtils.readSwappedUnsignedShort(InputStream)
.readUnsignedShort
in interface DataInput
EOFException
- if an end of file is reached unexpectedlyIOException
- if an I/O error occurspublic String readUTF() + throws IOException, + EOFException+
UnsupportedOperationException
.readUTF
in interface DataInput
EOFException
- if an end of file is reached unexpectedlyIOException
- if an I/O error occurspublic int skipBytes(int count) + throws IOException, + EOFException+
skip(int)
method.skipBytes
in interface DataInput
count
- the number of bytes to skipEOFException
- if an end of file is reached unexpectedlyIOException
- if an I/O error occursCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/TaggedInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/TaggedInputStream.html new file mode 100644 index 0000000..df43bf1 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/TaggedInputStream.html @@ -0,0 +1,390 @@ + + + + + +public class TaggedInputStream +extends ProxyInputStream+
TaggedIOException
class to wrap all thrown
+ IOException
s. See below for an example of using this class.
+ + TaggedInputStream stream = new TaggedInputStream(...); + try { + // Processing that may throw an IOException either from this stream + // or from some other IO activity like temporary files, etc. + processStream(stream); + } catch (IOException e) { + if (stream.isCauseOf(e)) { + // The exception was caused by this stream. + // Use e.getCause() to get the original exception. + } else { + // The exception was caused by something else. + } + } ++
+ Alternatively, the throwIfCauseOf(Throwable)
method can be
+ used to let higher levels of code handle the exception caused by this
+ stream while other processing errors are being taken care of at this
+ lower level.
+
+ TaggedInputStream stream = new TaggedInputStream(...); + try { + processStream(stream); + } catch (IOException e) { + stream.throwIfCauseOf(e); + // ... or process the exception that was caused by something else + } +
TaggedIOException
in
Constructor and Description | +
---|
TaggedInputStream(InputStream proxy)
+Creates a tagging decorator for the given input stream.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+handleIOException(IOException e)
+Tags any IOExceptions thrown, wrapping and re-throwing.
+ |
+
boolean |
+isCauseOf(Throwable exception)
+Tests if the given exception was caused by this stream.
+ |
+
void |
+throwIfCauseOf(Throwable throwable)
+Re-throws the original exception thrown by this stream.
+ |
+
afterRead, available, beforeRead, close, mark, markSupported, read, read, read, reset, skip
public TaggedInputStream(InputStream proxy)+
proxy
- input stream to be decoratedpublic boolean isCauseOf(Throwable exception)+
exception
- an exceptiontrue
if the exception was thrown by this stream,
+ false
otherwisepublic void throwIfCauseOf(Throwable throwable) + throws IOException+
TaggedIOException
+ wrapper created by this decorator, and then unwraps and throws the
+ original wrapped exception. Returns normally if the exception was
+ not thrown by this stream.throwable
- an exceptionIOException
- original exception, if any, thrown by this streamprotected void handleIOException(IOException e) + throws IOException+
handleIOException
in class ProxyInputStream
e
- The IOException thrownIOException
- if an I/O error occursCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/Tailer.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/Tailer.html new file mode 100644 index 0000000..1b4d8de --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/Tailer.html @@ -0,0 +1,753 @@ + + + + + +public class Tailer +extends Object +implements Runnable+
+ First you need to create a TailerListener
implementation
+ (TailerListenerAdapter
is provided for convenience so that you don't have to
+ implement every method).
+
For example:
++ public class MyTailerListener extends TailerListenerAdapter { + public void handle(String line) { + System.out.println(line); + } + }+ +
+ You can create and use a Tailer in one of three ways: +
+ + ++ An example of each of these is shown below. +
+ ++ TailerListener listener = new MyTailerListener(); + Tailer tailer = Tailer.create(file, listener, delay);+ +
+ TailerListener listener = new MyTailerListener(); + Tailer tailer = new Tailer(file, listener, delay); + + // stupid executor impl. for demo purposes + Executor executor = new Executor() { + public void execute(Runnable command) { + command.run(); + } + }; + + executor.execute(tailer); ++ + +
+ TailerListener listener = new MyTailerListener(); + Tailer tailer = new Tailer(file, listener, delay); + Thread thread = new Thread(tailer); + thread.setDaemon(true); // optional + thread.start();+ +
Remember to stop the tailer when you have done with it:
++ tailer.stop(); ++ +
You can interrupt the thread a tailer is running on by calling Thread.interrupt()
.
+ thread.interrupt(); ++
If you interrupt a tailer, the tailer listener is called with the InterruptedException
.
The file is read using the default charset; this can be overriden if necessary
Thread.interrupt()
TailerListener
,
+TailerListenerAdapter
Constructor and Description | +
---|
Tailer(File file,
+ Charset cset,
+ TailerListener listener,
+ long delayMillis,
+ boolean end,
+ boolean reOpen,
+ int bufSize)
+Creates a Tailer for the given file, with a specified buffer size.
+ |
+
Tailer(File file,
+ TailerListener listener)
+Creates a Tailer for the given file, starting from the beginning, with the default delay of 1.0s.
+ |
+
Tailer(File file,
+ TailerListener listener,
+ long delayMillis)
+Creates a Tailer for the given file, starting from the beginning.
+ |
+
Tailer(File file,
+ TailerListener listener,
+ long delayMillis,
+ boolean end)
+Creates a Tailer for the given file, with a delay other than the default 1.0s.
+ |
+
Tailer(File file,
+ TailerListener listener,
+ long delayMillis,
+ boolean end,
+ boolean reOpen)
+Creates a Tailer for the given file, with a delay other than the default 1.0s.
+ |
+
Tailer(File file,
+ TailerListener listener,
+ long delayMillis,
+ boolean end,
+ boolean reOpen,
+ int bufSize)
+Creates a Tailer for the given file, with a specified buffer size.
+ |
+
Tailer(File file,
+ TailerListener listener,
+ long delayMillis,
+ boolean end,
+ int bufSize)
+Creates a Tailer for the given file, with a specified buffer size.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static Tailer |
+create(File file,
+ Charset charset,
+ TailerListener listener,
+ long delayMillis,
+ boolean end,
+ boolean reOpen,
+ int bufSize)
+Creates and starts a Tailer for the given file.
+ |
+
static Tailer |
+create(File file,
+ TailerListener listener)
+Creates and starts a Tailer for the given file, starting at the beginning of the file
+ with the default delay of 1.0s
+ |
+
static Tailer |
+create(File file,
+ TailerListener listener,
+ long delayMillis)
+Creates and starts a Tailer for the given file, starting at the beginning of the file
+ |
+
static Tailer |
+create(File file,
+ TailerListener listener,
+ long delayMillis,
+ boolean end)
+Creates and starts a Tailer for the given file with default buffer size.
+ |
+
static Tailer |
+create(File file,
+ TailerListener listener,
+ long delayMillis,
+ boolean end,
+ boolean reOpen)
+Creates and starts a Tailer for the given file with default buffer size.
+ |
+
static Tailer |
+create(File file,
+ TailerListener listener,
+ long delayMillis,
+ boolean end,
+ boolean reOpen,
+ int bufSize)
+Creates and starts a Tailer for the given file.
+ |
+
static Tailer |
+create(File file,
+ TailerListener listener,
+ long delayMillis,
+ boolean end,
+ int bufSize)
+Creates and starts a Tailer for the given file.
+ |
+
long |
+getDelay()
+Return the delay in milliseconds.
+ |
+
File |
+getFile()
+Return the file.
+ |
+
protected boolean |
+getRun()
+Gets whether to keep on running.
+ |
+
void |
+run()
+Follows changes in the file, calling the TailerListener's handle method for each new line.
+ |
+
void |
+stop()
+Allows the tailer to complete its current loop and return.
+ |
+
public Tailer(File file, + TailerListener listener)+
file
- The file to follow.listener
- the TailerListener to use.public Tailer(File file, + TailerListener listener, + long delayMillis)+
file
- the file to follow.listener
- the TailerListener to use.delayMillis
- the delay between checks of the file for new content in milliseconds.public Tailer(File file, + TailerListener listener, + long delayMillis, + boolean end)+
file
- the file to follow.listener
- the TailerListener to use.delayMillis
- the delay between checks of the file for new content in milliseconds.end
- Set to true to tail from the end of the file, false to tail from the beginning of the file.public Tailer(File file, + TailerListener listener, + long delayMillis, + boolean end, + boolean reOpen)+
file
- the file to follow.listener
- the TailerListener to use.delayMillis
- the delay between checks of the file for new content in milliseconds.end
- Set to true to tail from the end of the file, false to tail from the beginning of the file.reOpen
- if true, close and reopen the file between reading chunkspublic Tailer(File file, + TailerListener listener, + long delayMillis, + boolean end, + int bufSize)+
file
- the file to follow.listener
- the TailerListener to use.delayMillis
- the delay between checks of the file for new content in milliseconds.end
- Set to true to tail from the end of the file, false to tail from the beginning of the file.bufSize
- Buffer sizepublic Tailer(File file, + TailerListener listener, + long delayMillis, + boolean end, + boolean reOpen, + int bufSize)+
file
- the file to follow.listener
- the TailerListener to use.delayMillis
- the delay between checks of the file for new content in milliseconds.end
- Set to true to tail from the end of the file, false to tail from the beginning of the file.reOpen
- if true, close and reopen the file between reading chunksbufSize
- Buffer sizepublic Tailer(File file, + Charset cset, + TailerListener listener, + long delayMillis, + boolean end, + boolean reOpen, + int bufSize)+
file
- the file to follow.cset
- the Charset to be used for reading the filelistener
- the TailerListener to use.delayMillis
- the delay between checks of the file for new content in milliseconds.end
- Set to true to tail from the end of the file, false to tail from the beginning of the file.reOpen
- if true, close and reopen the file between reading chunksbufSize
- Buffer sizepublic static Tailer create(File file, + TailerListener listener, + long delayMillis, + boolean end, + int bufSize)+
file
- the file to follow.listener
- the TailerListener to use.delayMillis
- the delay between checks of the file for new content in milliseconds.end
- Set to true to tail from the end of the file, false to tail from the beginning of the file.bufSize
- buffer size.public static Tailer create(File file, + TailerListener listener, + long delayMillis, + boolean end, + boolean reOpen, + int bufSize)+
file
- the file to follow.listener
- the TailerListener to use.delayMillis
- the delay between checks of the file for new content in milliseconds.end
- Set to true to tail from the end of the file, false to tail from the beginning of the file.reOpen
- whether to close/reopen the file between chunksbufSize
- buffer size.public static Tailer create(File file, + Charset charset, + TailerListener listener, + long delayMillis, + boolean end, + boolean reOpen, + int bufSize)+
file
- the file to follow.charset
- the character set to use for reading the filelistener
- the TailerListener to use.delayMillis
- the delay between checks of the file for new content in milliseconds.end
- Set to true to tail from the end of the file, false to tail from the beginning of the file.reOpen
- whether to close/reopen the file between chunksbufSize
- buffer size.public static Tailer create(File file, + TailerListener listener, + long delayMillis, + boolean end)+
file
- the file to follow.listener
- the TailerListener to use.delayMillis
- the delay between checks of the file for new content in milliseconds.end
- Set to true to tail from the end of the file, false to tail from the beginning of the file.public static Tailer create(File file, + TailerListener listener, + long delayMillis, + boolean end, + boolean reOpen)+
file
- the file to follow.listener
- the TailerListener to use.delayMillis
- the delay between checks of the file for new content in milliseconds.end
- Set to true to tail from the end of the file, false to tail from the beginning of the file.reOpen
- whether to close/reopen the file between chunkspublic static Tailer create(File file, + TailerListener listener, + long delayMillis)+
file
- the file to follow.listener
- the TailerListener to use.delayMillis
- the delay between checks of the file for new content in milliseconds.public static Tailer create(File file, + TailerListener listener)+
file
- the file to follow.listener
- the TailerListener to use.public File getFile()+
protected boolean getRun()+
public long getDelay()+
public void run()+
public void stop()+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/TailerListener.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/TailerListener.html new file mode 100644 index 0000000..423cd86 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/TailerListener.html @@ -0,0 +1,298 @@ + + + + + +public interface TailerListener
+Tailer
.Modifier and Type | +Method and Description | +
---|---|
void |
+fileNotFound()
+This method is called if the tailed file is not found.
+ |
+
void |
+fileRotated()
+Called if a file rotation is detected.
+ |
+
void |
+handle(Exception ex)
+Handles an Exception .
+ |
+
void |
+handle(String line)
+Handles a line from a Tailer.
+ |
+
void |
+init(Tailer tailer)
+The tailer will call this method during construction,
+ giving the listener a method of stopping the tailer.
+ |
+
void init(Tailer tailer)+
tailer
- the tailer.void fileNotFound()+
+ Note: this is called from the tailer thread.
void fileRotated()+
+ Note: this is called from the tailer thread.
void handle(String line)+
+ Note: this is called from the tailer thread.
line
- the line.void handle(Exception ex)+
+ Note: this is called from the tailer thread.
ex
- the exception.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/TailerListenerAdapter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/TailerListenerAdapter.html new file mode 100644 index 0000000..f8870b5 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/TailerListenerAdapter.html @@ -0,0 +1,381 @@ + + + + + +public class TailerListenerAdapter +extends Object +implements TailerListener+
TailerListener
Adapter.Constructor and Description | +
---|
TailerListenerAdapter() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+endOfFileReached()
+Called each time the Tailer reaches the end of the file.
+ |
+
void |
+fileNotFound()
+This method is called if the tailed file is not found.
+ |
+
void |
+fileRotated()
+Called if a file rotation is detected.
+ |
+
void |
+handle(Exception ex)
+Handles an Exception .
+ |
+
void |
+handle(String line)
+Handles a line from a Tailer.
+ |
+
void |
+init(Tailer tailer)
+The tailer will call this method during construction,
+ giving the listener a method of stopping the tailer.
+ |
+
public void init(Tailer tailer)+
init
in interface TailerListener
tailer
- the tailer.public void fileNotFound()+
fileNotFound
in interface TailerListener
public void fileRotated()+
fileRotated
in interface TailerListener
public void handle(String line)+
handle
in interface TailerListener
line
- the line.public void handle(Exception ex)+
handle
in interface TailerListener
ex
- the exception.public void endOfFileReached()+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/TeeInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/TeeInputStream.html new file mode 100644 index 0000000..7636451 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/TeeInputStream.html @@ -0,0 +1,441 @@ + + + + + +public class TeeInputStream +extends ProxyInputStream+
ProxyInputStream.skip(long)
+ or ProxyInputStream.mark(int)
/ProxyInputStream.reset()
on the stream will result on some
+ bytes from the input stream being skipped or duplicated in the output
+ stream.
+
+ The proxied input stream is closed when the close()
method is
+ called on this proxy. It is configurable whether the associated output
+ stream will also closed.
in
Constructor and Description | +
---|
TeeInputStream(InputStream input,
+ OutputStream branch)
+Creates a TeeInputStream that proxies the given
+InputStream
+ and copies all read bytes to the given OutputStream . |
+
TeeInputStream(InputStream input,
+ OutputStream branch,
+ boolean closeBranch)
+Creates a TeeInputStream that proxies the given
+InputStream
+ and copies all read bytes to the given OutputStream . |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+close()
+Closes the proxied input stream and, if so configured, the associated
+ output stream.
+ |
+
int |
+read()
+Reads a single byte from the proxied input stream and writes it to
+ the associated output stream.
+ |
+
int |
+read(byte[] bts)
+Reads bytes from the proxied input stream and writes the read bytes
+ to the associated output stream.
+ |
+
int |
+read(byte[] bts,
+ int st,
+ int end)
+Reads bytes from the proxied input stream and writes the read bytes
+ to the associated output stream.
+ |
+
afterRead, available, beforeRead, handleIOException, mark, markSupported, reset, skip
public TeeInputStream(InputStream input, + OutputStream branch)+
InputStream
+ and copies all read bytes to the given OutputStream
. The given
+ output stream will not be closed when this stream gets closed.input
- input stream to be proxiedbranch
- output stream that will receive a copy of all bytes readpublic TeeInputStream(InputStream input, + OutputStream branch, + boolean closeBranch)+
InputStream
+ and copies all read bytes to the given OutputStream
. The given
+ output stream will be closed when this stream gets closed if the
+ closeBranch parameter is true
.input
- input stream to be proxiedbranch
- output stream that will receive a copy of all bytes readcloseBranch
- flag for closing also the output stream when this
+ stream is closedpublic void close() + throws IOException+
close
in interface Closeable
close
in interface AutoCloseable
close
in class ProxyInputStream
IOException
- if either of the streams could not be closedpublic int read() + throws IOException+
read
in class ProxyInputStream
IOException
- if the stream could not be read (or written)public int read(byte[] bts, + int st, + int end) + throws IOException+
read
in class ProxyInputStream
bts
- byte bufferst
- start offset within the bufferend
- maximum number of bytes to readIOException
- if the stream could not be read (or written)public int read(byte[] bts) + throws IOException+
read
in class ProxyInputStream
bts
- byte bufferIOException
- if the stream could not be read (or written)Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/UnixLineEndingInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/UnixLineEndingInputStream.html new file mode 100644 index 0000000..4ee3827 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/UnixLineEndingInputStream.html @@ -0,0 +1,330 @@ + + + + + +public class UnixLineEndingInputStream +extends InputStream+
Constructor and Description | +
---|
UnixLineEndingInputStream(InputStream in,
+ boolean ensureLineFeedAtEndOfFile)
+Create an input stream that filters another stream
+ |
+
public UnixLineEndingInputStream(InputStream in, + boolean ensureLineFeedAtEndOfFile)+
in
- The input stream to wrapensureLineFeedAtEndOfFile
- true to ensure that the file ends with LFpublic int read() + throws IOException+
read
in class InputStream
IOException
public void close() + throws IOException+
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
- upon errorpublic void mark(int readlimit)+
mark
in class InputStream
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/WindowsLineEndingInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/WindowsLineEndingInputStream.html new file mode 100644 index 0000000..ddcc045 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/WindowsLineEndingInputStream.html @@ -0,0 +1,330 @@ + + + + + +public class WindowsLineEndingInputStream +extends InputStream+
Constructor and Description | +
---|
WindowsLineEndingInputStream(InputStream in,
+ boolean ensureLineFeedAtEndOfFile)
+Create an input stream that filters another stream
+ |
+
public WindowsLineEndingInputStream(InputStream in, + boolean ensureLineFeedAtEndOfFile)+
in
- The input stream to wrapensureLineFeedAtEndOfFile
- true to ensure that the file ends with CRLFpublic int read() + throws IOException+
read
in class InputStream
IOException
public void close() + throws IOException+
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
- upon errorpublic void mark(int readlimit)+
mark
in class InputStream
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/XmlStreamReader.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/XmlStreamReader.html new file mode 100644 index 0000000..91684ff --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/XmlStreamReader.html @@ -0,0 +1,737 @@ + + + + + +public class XmlStreamReader +extends Reader+
+ IMPORTANT: This class is not related in any way to the org.xml.sax.XMLReader. + This one IS a character stream. +
+ All this has to be done without consuming characters from the stream, if not + the XML parser will not recognized the document as a valid XML. This is not + 100% true, but it's close enough (UTF-8 BOM is not handled by all parsers + right now, XmlStreamReader handles it and things work in all parsers). +
+ The XmlStreamReader class handles the charset encoding of XML documents in + Files, raw streams and HTTP streams by offering a wide set of constructors. +
+ By default the charset encoding detection is lenient, the constructor with + the lenient flag can be used for an script (following HTTP MIME and XML + specifications). All this is nicely explained by Mark Pilgrim in his blog, + Determining the character encoding of a feed. +
+ Originally developed for ROME under + Apache License 2.0.
XmlStreamWriter
Modifier and Type | +Field and Description | +
---|---|
static Pattern |
+ENCODING_PATTERN |
+
Constructor and Description | +
---|
XmlStreamReader(File file)
+Creates a Reader for a File.
+ |
+
XmlStreamReader(InputStream is)
+Creates a Reader for a raw InputStream.
+ |
+
XmlStreamReader(InputStream is,
+ boolean lenient)
+Creates a Reader for a raw InputStream.
+ |
+
XmlStreamReader(InputStream is,
+ boolean lenient,
+ String defaultEncoding)
+Creates a Reader for a raw InputStream.
+ |
+
XmlStreamReader(InputStream is,
+ String httpContentType)
+Creates a Reader using an InputStream an the associated content-type
+ header.
+ |
+
XmlStreamReader(InputStream is,
+ String httpContentType,
+ boolean lenient)
+Creates a Reader using an InputStream an the associated content-type
+ header.
+ |
+
XmlStreamReader(InputStream is,
+ String httpContentType,
+ boolean lenient,
+ String defaultEncoding)
+Creates a Reader using an InputStream an the associated content-type
+ header.
+ |
+
XmlStreamReader(URL url)
+Creates a Reader using the InputStream of a URL.
+ |
+
XmlStreamReader(URLConnection conn,
+ String defaultEncoding)
+Creates a Reader using the InputStream of a URLConnection.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+close()
+Closes the XmlStreamReader stream.
+ |
+
String |
+getDefaultEncoding()
+Returns the default encoding to use if none is set in HTTP content-type,
+ XML prolog and the rules based on content-type are not adequate.
+ |
+
String |
+getEncoding()
+Returns the charset encoding of the XmlStreamReader.
+ |
+
int |
+read(char[] buf,
+ int offset,
+ int len)
+Invokes the underlying reader's
+read(char[], int, int) method. |
+
public static final Pattern ENCODING_PATTERN+
public XmlStreamReader(File file) + throws IOException+
+ It looks for the UTF-8 BOM first, if none sniffs the XML prolog charset, + if this is also missing defaults to UTF-8. +
+ It does a lenient charset encoding detection, check the constructor with + the lenient parameter for details.
file
- File to create a Reader from.IOException
- thrown if there is a problem reading the file.public XmlStreamReader(InputStream is) + throws IOException+
+ It follows the same logic used for files. +
+ It does a lenient charset encoding detection, check the constructor with + the lenient parameter for details.
is
- InputStream to create a Reader from.IOException
- thrown if there is a problem reading the stream.public XmlStreamReader(InputStream is, + boolean lenient) + throws IOException+
+ It follows the same logic used for files. +
+ If lenient detection is indicated and the detection above fails as per + specifications it then attempts the following: +
+ If the content type was 'text/html' it replaces it with 'text/xml' and + tries the detection again. +
+ Else if the XML prolog had a charset encoding that encoding is used. +
+ Else if the content type had a charset encoding that encoding is used. +
+ Else 'UTF-8' is used. +
+ If lenient detection is indicated an XmlStreamReaderException is never + thrown.
is
- InputStream to create a Reader from.lenient
- indicates if the charset encoding detection should be
+ relaxed.IOException
- thrown if there is a problem reading the stream.XmlStreamReaderException
- thrown if the charset encoding could not
+ be determined according to the specs.public XmlStreamReader(InputStream is, + boolean lenient, + String defaultEncoding) + throws IOException+
+ It follows the same logic used for files. +
+ If lenient detection is indicated and the detection above fails as per + specifications it then attempts the following: +
+ If the content type was 'text/html' it replaces it with 'text/xml' and + tries the detection again. +
+ Else if the XML prolog had a charset encoding that encoding is used. +
+ Else if the content type had a charset encoding that encoding is used. +
+ Else 'UTF-8' is used. +
+ If lenient detection is indicated an XmlStreamReaderException is never + thrown.
is
- InputStream to create a Reader from.lenient
- indicates if the charset encoding detection should be
+ relaxed.defaultEncoding
- The default encodingIOException
- thrown if there is a problem reading the stream.XmlStreamReaderException
- thrown if the charset encoding could not
+ be determined according to the specs.public XmlStreamReader(URL url) + throws IOException+
+ If the URL is not of type HTTP and there is not 'content-type' header in + the fetched data it uses the same logic used for Files. +
+ If the URL is a HTTP Url or there is a 'content-type' header in the + fetched data it uses the same logic used for an InputStream with + content-type. +
+ It does a lenient charset encoding detection, check the constructor with + the lenient parameter for details.
url
- URL to create a Reader from.IOException
- thrown if there is a problem reading the stream of
+ the URL.public XmlStreamReader(URLConnection conn, + String defaultEncoding) + throws IOException+
+ If the URLConnection is not of type HttpURLConnection and there is not + 'content-type' header in the fetched data it uses the same logic used for + files. +
+ If the URLConnection is a HTTP Url or there is a 'content-type' header in + the fetched data it uses the same logic used for an InputStream with + content-type. +
+ It does a lenient charset encoding detection, check the constructor with + the lenient parameter for details.
conn
- URLConnection to create a Reader from.defaultEncoding
- The default encodingIOException
- thrown if there is a problem reading the stream of
+ the URLConnection.public XmlStreamReader(InputStream is, + String httpContentType) + throws IOException+
+ First it checks if the stream has BOM. If there is not BOM checks the + content-type encoding. If there is not content-type encoding checks the + XML prolog encoding. If there is not XML prolog encoding uses the default + encoding mandated by the content-type MIME type. +
+ It does a lenient charset encoding detection, check the constructor with + the lenient parameter for details.
is
- InputStream to create the reader from.httpContentType
- content-type header to use for the resolution of
+ the charset encoding.IOException
- thrown if there is a problem reading the file.public XmlStreamReader(InputStream is, + String httpContentType, + boolean lenient, + String defaultEncoding) + throws IOException+
+ First it checks if the stream has BOM. If there is not BOM checks the + content-type encoding. If there is not content-type encoding checks the + XML prolog encoding. If there is not XML prolog encoding uses the default + encoding mandated by the content-type MIME type. +
+ If lenient detection is indicated and the detection above fails as per + specifications it then attempts the following: +
+ If the content type was 'text/html' it replaces it with 'text/xml' and + tries the detection again. +
+ Else if the XML prolog had a charset encoding that encoding is used. +
+ Else if the content type had a charset encoding that encoding is used. +
+ Else 'UTF-8' is used. +
+ If lenient detection is indicated an XmlStreamReaderException is never + thrown.
is
- InputStream to create the reader from.httpContentType
- content-type header to use for the resolution of
+ the charset encoding.lenient
- indicates if the charset encoding detection should be
+ relaxed.defaultEncoding
- The default encodingIOException
- thrown if there is a problem reading the file.XmlStreamReaderException
- thrown if the charset encoding could not
+ be determined according to the specs.public XmlStreamReader(InputStream is, + String httpContentType, + boolean lenient) + throws IOException+
+ First it checks if the stream has BOM. If there is not BOM checks the + content-type encoding. If there is not content-type encoding checks the + XML prolog encoding. If there is not XML prolog encoding uses the default + encoding mandated by the content-type MIME type. +
+ If lenient detection is indicated and the detection above fails as per + specifications it then attempts the following: +
+ If the content type was 'text/html' it replaces it with 'text/xml' and + tries the detection again. +
+ Else if the XML prolog had a charset encoding that encoding is used. +
+ Else if the content type had a charset encoding that encoding is used. +
+ Else 'UTF-8' is used. +
+ If lenient detection is indicated an XmlStreamReaderException is never + thrown.
is
- InputStream to create the reader from.httpContentType
- content-type header to use for the resolution of
+ the charset encoding.lenient
- indicates if the charset encoding detection should be
+ relaxed.IOException
- thrown if there is a problem reading the file.XmlStreamReaderException
- thrown if the charset encoding could not
+ be determined according to the specs.public String getDefaultEncoding()+
+ If it is NULL the content-type based rules are used.
public String getEncoding()+
public int read(char[] buf, + int offset, + int len) + throws IOException+
read(char[], int, int)
method.read
in class Reader
buf
- the buffer to read the characters intooffset
- The start offsetlen
- The number of bytes to readIOException
- if an I/O error occurspublic void close() + throws IOException+
close
in interface Closeable
close
in interface AutoCloseable
close
in class Reader
IOException
- thrown if there was a problem closing the stream.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/XmlStreamReaderException.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/XmlStreamReaderException.html new file mode 100644 index 0000000..8a84bcf --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/XmlStreamReaderException.html @@ -0,0 +1,418 @@ + + + + + +public class XmlStreamReaderException +extends IOException+
+ The exception returns the unconsumed InputStream to allow the application to + do an alternate processing with the stream. Note that the original + InputStream given to the XmlStreamReader cannot be used as that one has been + already read.
Constructor and Description | +
---|
XmlStreamReaderException(String msg,
+ String bomEnc,
+ String xmlGuessEnc,
+ String xmlEnc)
+Creates an exception instance if the charset encoding could not be
+ determined.
+ |
+
XmlStreamReaderException(String msg,
+ String ctMime,
+ String ctEnc,
+ String bomEnc,
+ String xmlGuessEnc,
+ String xmlEnc)
+Creates an exception instance if the charset encoding could not be
+ determined.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
String |
+getBomEncoding()
+Returns the BOM encoding found in the InputStream.
+ |
+
String |
+getContentTypeEncoding()
+Returns the encoding in the content-type used to attempt determining the
+ encoding.
+ |
+
String |
+getContentTypeMime()
+Returns the MIME type in the content-type used to attempt determining the
+ encoding.
+ |
+
String |
+getXmlEncoding()
+Returns the encoding found in the XML prolog of the InputStream.
+ |
+
String |
+getXmlGuessEncoding()
+Returns the encoding guess based on the first bytes of the InputStream.
+ |
+
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public XmlStreamReaderException(String msg, + String bomEnc, + String xmlGuessEnc, + String xmlEnc)+
+ Instances of this exception are thrown by the XmlStreamReader.
msg
- message describing the reason for the exception.bomEnc
- BOM encoding.xmlGuessEnc
- XML guess encoding.xmlEnc
- XML prolog encoding.public XmlStreamReaderException(String msg, + String ctMime, + String ctEnc, + String bomEnc, + String xmlGuessEnc, + String xmlEnc)+
+ Instances of this exception are thrown by the XmlStreamReader.
msg
- message describing the reason for the exception.ctMime
- MIME type in the content-type.ctEnc
- encoding in the content-type.bomEnc
- BOM encoding.xmlGuessEnc
- XML guess encoding.xmlEnc
- XML prolog encoding.public String getBomEncoding()+
public String getXmlGuessEncoding()+
public String getXmlEncoding()+
public String getContentTypeMime()+
public String getContentTypeEncoding()+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/AutoCloseInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/AutoCloseInputStream.html new file mode 100644 index 0000000..b016cf3 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/AutoCloseInputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/BOMInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/BOMInputStream.html new file mode 100644 index 0000000..1949674 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/BOMInputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/BoundedInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/BoundedInputStream.html new file mode 100644 index 0000000..c4e320b --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/BoundedInputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/BoundedReader.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/BoundedReader.html new file mode 100644 index 0000000..da066ba --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/BoundedReader.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/BrokenInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/BrokenInputStream.html new file mode 100644 index 0000000..f0a604d --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/BrokenInputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/CharSequenceInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/CharSequenceInputStream.html new file mode 100644 index 0000000..695da93 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/CharSequenceInputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/CharSequenceReader.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/CharSequenceReader.html new file mode 100644 index 0000000..6ee51e2 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/CharSequenceReader.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/ClassLoaderObjectInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/ClassLoaderObjectInputStream.html new file mode 100644 index 0000000..e97bbdc --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/ClassLoaderObjectInputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/CloseShieldInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/CloseShieldInputStream.html new file mode 100644 index 0000000..714ed5e --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/CloseShieldInputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/ClosedInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/ClosedInputStream.html new file mode 100644 index 0000000..e41bb63 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/ClosedInputStream.html @@ -0,0 +1,161 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io.input | +
+
+This package provides implementations of input classes, such as
+
+InputStream and Reader . |
+
Modifier and Type | +Field and Description | +
---|---|
static ClosedInputStream |
+ClosedInputStream.CLOSED_INPUT_STREAM
+A singleton.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/CountingInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/CountingInputStream.html new file mode 100644 index 0000000..1832ba6 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/CountingInputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/DemuxInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/DemuxInputStream.html new file mode 100644 index 0000000..e2bd27e --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/DemuxInputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/NullInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/NullInputStream.html new file mode 100644 index 0000000..9769b48 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/NullInputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/NullReader.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/NullReader.html new file mode 100644 index 0000000..eeefa45 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/NullReader.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/ProxyInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/ProxyInputStream.html new file mode 100644 index 0000000..83fc91a --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/ProxyInputStream.html @@ -0,0 +1,201 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io.input | +
+
+This package provides implementations of input classes, such as
+
+InputStream and Reader . |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+AutoCloseInputStream
+Proxy stream that closes and discards the underlying stream as soon as the
+ end of input has been reached or when the stream is explicitly closed.
+ |
+
class |
+BOMInputStream
+This class is used to wrap a stream that includes an encoded
+ByteOrderMark as its first bytes. |
+
class |
+CloseShieldInputStream
+Proxy stream that prevents the underlying input stream from being closed.
+ |
+
class |
+CountingInputStream
+A decorating input stream that counts the number of bytes that have passed
+ through the stream so far.
+ |
+
class |
+SwappedDataInputStream
+DataInput for systems relying on little endian data formats.
+ |
+
class |
+TaggedInputStream
+An input stream decorator that tags potential exceptions so that the
+ stream that caused the exception can easily be identified.
+ |
+
class |
+TeeInputStream
+InputStream proxy that transparently writes a copy of all bytes read
+ from the proxied stream to a given OutputStream.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/ProxyReader.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/ProxyReader.html new file mode 100644 index 0000000..c4ec21d --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/ProxyReader.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/ReaderInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/ReaderInputStream.html new file mode 100644 index 0000000..4564bba --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/ReaderInputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/ReversedLinesFileReader.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/ReversedLinesFileReader.html new file mode 100644 index 0000000..1f637c2 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/ReversedLinesFileReader.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/SwappedDataInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/SwappedDataInputStream.html new file mode 100644 index 0000000..c2b54b4 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/SwappedDataInputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/TaggedInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/TaggedInputStream.html new file mode 100644 index 0000000..07a7ee0 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/TaggedInputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/Tailer.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/Tailer.html new file mode 100644 index 0000000..4bcb65d --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/Tailer.html @@ -0,0 +1,246 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io.input | +
+
+This package provides implementations of input classes, such as
+
+InputStream and Reader . |
+
Modifier and Type | +Method and Description | +
---|---|
static Tailer |
+Tailer.create(File file,
+ Charset charset,
+ TailerListener listener,
+ long delayMillis,
+ boolean end,
+ boolean reOpen,
+ int bufSize)
+Creates and starts a Tailer for the given file.
+ |
+
static Tailer |
+Tailer.create(File file,
+ TailerListener listener)
+Creates and starts a Tailer for the given file, starting at the beginning of the file
+ with the default delay of 1.0s
+ |
+
static Tailer |
+Tailer.create(File file,
+ TailerListener listener,
+ long delayMillis)
+Creates and starts a Tailer for the given file, starting at the beginning of the file
+ |
+
static Tailer |
+Tailer.create(File file,
+ TailerListener listener,
+ long delayMillis,
+ boolean end)
+Creates and starts a Tailer for the given file with default buffer size.
+ |
+
static Tailer |
+Tailer.create(File file,
+ TailerListener listener,
+ long delayMillis,
+ boolean end,
+ boolean reOpen)
+Creates and starts a Tailer for the given file with default buffer size.
+ |
+
static Tailer |
+Tailer.create(File file,
+ TailerListener listener,
+ long delayMillis,
+ boolean end,
+ boolean reOpen,
+ int bufSize)
+Creates and starts a Tailer for the given file.
+ |
+
static Tailer |
+Tailer.create(File file,
+ TailerListener listener,
+ long delayMillis,
+ boolean end,
+ int bufSize)
+Creates and starts a Tailer for the given file.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+TailerListenerAdapter.init(Tailer tailer)
+The tailer will call this method during construction,
+ giving the listener a method of stopping the tailer.
+ |
+
void |
+TailerListener.init(Tailer tailer)
+The tailer will call this method during construction,
+ giving the listener a method of stopping the tailer.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/TailerListener.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/TailerListener.html new file mode 100644 index 0000000..864e12b --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/TailerListener.html @@ -0,0 +1,306 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io.input | +
+
+This package provides implementations of input classes, such as
+
+InputStream and Reader . |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+TailerListenerAdapter
+TailerListener Adapter. |
+
Modifier and Type | +Method and Description | +
---|---|
static Tailer |
+Tailer.create(File file,
+ Charset charset,
+ TailerListener listener,
+ long delayMillis,
+ boolean end,
+ boolean reOpen,
+ int bufSize)
+Creates and starts a Tailer for the given file.
+ |
+
static Tailer |
+Tailer.create(File file,
+ TailerListener listener)
+Creates and starts a Tailer for the given file, starting at the beginning of the file
+ with the default delay of 1.0s
+ |
+
static Tailer |
+Tailer.create(File file,
+ TailerListener listener,
+ long delayMillis)
+Creates and starts a Tailer for the given file, starting at the beginning of the file
+ |
+
static Tailer |
+Tailer.create(File file,
+ TailerListener listener,
+ long delayMillis,
+ boolean end)
+Creates and starts a Tailer for the given file with default buffer size.
+ |
+
static Tailer |
+Tailer.create(File file,
+ TailerListener listener,
+ long delayMillis,
+ boolean end,
+ boolean reOpen)
+Creates and starts a Tailer for the given file with default buffer size.
+ |
+
static Tailer |
+Tailer.create(File file,
+ TailerListener listener,
+ long delayMillis,
+ boolean end,
+ boolean reOpen,
+ int bufSize)
+Creates and starts a Tailer for the given file.
+ |
+
static Tailer |
+Tailer.create(File file,
+ TailerListener listener,
+ long delayMillis,
+ boolean end,
+ int bufSize)
+Creates and starts a Tailer for the given file.
+ |
+
Constructor and Description | +
---|
Tailer(File file,
+ Charset cset,
+ TailerListener listener,
+ long delayMillis,
+ boolean end,
+ boolean reOpen,
+ int bufSize)
+Creates a Tailer for the given file, with a specified buffer size.
+ |
+
Tailer(File file,
+ TailerListener listener)
+Creates a Tailer for the given file, starting from the beginning, with the default delay of 1.0s.
+ |
+
Tailer(File file,
+ TailerListener listener,
+ long delayMillis)
+Creates a Tailer for the given file, starting from the beginning.
+ |
+
Tailer(File file,
+ TailerListener listener,
+ long delayMillis,
+ boolean end)
+Creates a Tailer for the given file, with a delay other than the default 1.0s.
+ |
+
Tailer(File file,
+ TailerListener listener,
+ long delayMillis,
+ boolean end,
+ boolean reOpen)
+Creates a Tailer for the given file, with a delay other than the default 1.0s.
+ |
+
Tailer(File file,
+ TailerListener listener,
+ long delayMillis,
+ boolean end,
+ boolean reOpen,
+ int bufSize)
+Creates a Tailer for the given file, with a specified buffer size.
+ |
+
Tailer(File file,
+ TailerListener listener,
+ long delayMillis,
+ boolean end,
+ int bufSize)
+Creates a Tailer for the given file, with a specified buffer size.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/TailerListenerAdapter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/TailerListenerAdapter.html new file mode 100644 index 0000000..587c27c --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/TailerListenerAdapter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/TeeInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/TeeInputStream.html new file mode 100644 index 0000000..3c7fb81 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/TeeInputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/UnixLineEndingInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/UnixLineEndingInputStream.html new file mode 100644 index 0000000..5b591bc --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/UnixLineEndingInputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/WindowsLineEndingInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/WindowsLineEndingInputStream.html new file mode 100644 index 0000000..8b3def0 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/WindowsLineEndingInputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/XmlStreamReader.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/XmlStreamReader.html new file mode 100644 index 0000000..6ef1ea2 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/XmlStreamReader.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/XmlStreamReaderException.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/XmlStreamReaderException.html new file mode 100644 index 0000000..b9221a9 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/class-use/XmlStreamReaderException.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/package-frame.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/package-frame.html new file mode 100644 index 0000000..2f1c20c --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/package-frame.html @@ -0,0 +1,51 @@ + + + + + +InputStream
and Reader
.See: Description
+Interface | +Description | +
---|---|
TailerListener | +
+ Listener for events from a
+Tailer . |
+
Class | +Description | +
---|---|
AutoCloseInputStream | +
+ Proxy stream that closes and discards the underlying stream as soon as the
+ end of input has been reached or when the stream is explicitly closed.
+ |
+
BOMInputStream | +
+ This class is used to wrap a stream that includes an encoded
+ByteOrderMark as its first bytes. |
+
BoundedInputStream | +
+ This is a stream that will only supply bytes up to a certain length - if its
+ position goes above that, it will stop.
+ |
+
BoundedReader | +
+ A reader that imposes a limit to the number of characters that can be read from
+ an underlying reader, returning eof when this limit is reached -regardless of state of
+ underlying reader.
+ |
+
BrokenInputStream | +
+ Broken input stream.
+ |
+
CharSequenceInputStream | +
+InputStream implementation that can read from String, StringBuffer,
+ StringBuilder or CharBuffer. |
+
CharSequenceReader | +
+Reader implementation that can read from String, StringBuffer,
+ StringBuilder or CharBuffer. |
+
ClassLoaderObjectInputStream | +
+ A special ObjectInputStream that loads a class based on a specified
+
+ClassLoader rather than the system default. |
+
ClosedInputStream | +
+ Closed input stream.
+ |
+
CloseShieldInputStream | +
+ Proxy stream that prevents the underlying input stream from being closed.
+ |
+
CountingInputStream | +
+ A decorating input stream that counts the number of bytes that have passed
+ through the stream so far.
+ |
+
DemuxInputStream | +
+ Data written to this stream is forwarded to a stream that has been associated
+ with this thread.
+ |
+
NullInputStream | +
+ A functional, light weight
+InputStream that emulates
+ a stream of a specified size. |
+
NullReader | +
+ A functional, light weight
+Reader that emulates
+ a reader of a specified size. |
+
ProxyInputStream | +
+ A Proxy stream which acts as expected, that is it passes the method
+ calls on to the proxied stream and doesn't change which methods are
+ being called.
+ |
+
ProxyReader | +
+ A Proxy stream which acts as expected, that is it passes the method
+ calls on to the proxied stream and doesn't change which methods are
+ being called.
+ |
+
ReaderInputStream | +
+InputStream implementation that reads a character stream from a Reader
+ and transforms it to a byte stream using a specified charset encoding. |
+
ReversedLinesFileReader | +
+ Reads lines in a file reversely (similar to a BufferedReader, but starting at
+ the last line).
+ |
+
SwappedDataInputStream | +
+ DataInput for systems relying on little endian data formats.
+ |
+
TaggedInputStream | +
+ An input stream decorator that tags potential exceptions so that the
+ stream that caused the exception can easily be identified.
+ |
+
Tailer | +
+ Simple implementation of the unix "tail -f" functionality.
+ |
+
TailerListenerAdapter | +
+TailerListener Adapter. |
+
TeeInputStream | +
+ InputStream proxy that transparently writes a copy of all bytes read
+ from the proxied stream to a given OutputStream.
+ |
+
UnixLineEndingInputStream | +
+ A filtering input stream that ensures the content will have unix-style line endings, LF.
+ |
+
WindowsLineEndingInputStream | +
+ A filtering input stream that ensures the content will have windows line endings, CRLF.
+ |
+
XmlStreamReader | +
+ Character stream that handles all the necessary Voodo to figure out the
+ charset encoding of the XML document within the stream.
+ |
+
Exception | +Description | +
---|---|
XmlStreamReaderException | +
+ The XmlStreamReaderException is thrown by the XmlStreamReader constructors if
+ the charset encoding can not be determined according to the XML 1.0
+ specification and RFC 3023.
+ |
+
+This package provides implementations of input classes, such as
+InputStream
and Reader
.
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/package-tree.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/package-tree.html new file mode 100644 index 0000000..f30857f --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/package-tree.html @@ -0,0 +1,193 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/package-use.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/package-use.html new file mode 100644 index 0000000..f182f2a --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/input/package-use.html @@ -0,0 +1,171 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io.input | +
+
+This package provides implementations of input classes, such as
+
+InputStream and Reader . |
+
Class and Description | +
---|
ClosedInputStream
+ Closed input stream.
+ |
+
ProxyInputStream
+ A Proxy stream which acts as expected, that is it passes the method
+ calls on to the proxied stream and doesn't change which methods are
+ being called.
+ |
+
Tailer
+ Simple implementation of the unix "tail -f" functionality.
+ |
+
TailerListener
+ Listener for events from a
+Tailer . |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/FileAlterationListener.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/FileAlterationListener.html new file mode 100644 index 0000000..bef1978 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/FileAlterationListener.html @@ -0,0 +1,341 @@ + + + + + +public interface FileAlterationListener
+
+ Register FileAlterationListener
s with a FileAlterationObserver
.
FileAlterationObserver
Modifier and Type | +Method and Description | +
---|---|
void |
+onDirectoryChange(File directory)
+Directory changed Event.
+ |
+
void |
+onDirectoryCreate(File directory)
+Directory created Event.
+ |
+
void |
+onDirectoryDelete(File directory)
+Directory deleted Event.
+ |
+
void |
+onFileChange(File file)
+File changed Event.
+ |
+
void |
+onFileCreate(File file)
+File created Event.
+ |
+
void |
+onFileDelete(File file)
+File deleted Event.
+ |
+
void |
+onStart(FileAlterationObserver observer)
+File system observer started checking event.
+ |
+
void |
+onStop(FileAlterationObserver observer)
+File system observer finished checking event.
+ |
+
void onStart(FileAlterationObserver observer)+
observer
- The file system observervoid onDirectoryCreate(File directory)+
directory
- The directory createdvoid onDirectoryChange(File directory)+
directory
- The directory changedvoid onDirectoryDelete(File directory)+
directory
- The directory deletedvoid onFileCreate(File file)+
file
- The file createdvoid onFileChange(File file)+
file
- The file changedvoid onFileDelete(File file)+
file
- The file deletedvoid onStop(FileAlterationObserver observer)+
observer
- The file system observerCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/FileAlterationListenerAdaptor.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/FileAlterationListenerAdaptor.html new file mode 100644 index 0000000..694406d --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/FileAlterationListenerAdaptor.html @@ -0,0 +1,414 @@ + + + + + +public class FileAlterationListenerAdaptor +extends Object +implements FileAlterationListener+
FileAlterationListener
implementation that does nothing.FileAlterationObserver
Constructor and Description | +
---|
FileAlterationListenerAdaptor() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+onDirectoryChange(File directory)
+Directory changed Event.
+ |
+
void |
+onDirectoryCreate(File directory)
+Directory created Event.
+ |
+
void |
+onDirectoryDelete(File directory)
+Directory deleted Event.
+ |
+
void |
+onFileChange(File file)
+File changed Event.
+ |
+
void |
+onFileCreate(File file)
+File created Event.
+ |
+
void |
+onFileDelete(File file)
+File deleted Event.
+ |
+
void |
+onStart(FileAlterationObserver observer)
+File system observer started checking event.
+ |
+
void |
+onStop(FileAlterationObserver observer)
+File system observer finished checking event.
+ |
+
public FileAlterationListenerAdaptor()+
public void onStart(FileAlterationObserver observer)+
onStart
in interface FileAlterationListener
observer
- The file system observer (ignored)public void onDirectoryCreate(File directory)+
onDirectoryCreate
in interface FileAlterationListener
directory
- The directory created (ignored)public void onDirectoryChange(File directory)+
onDirectoryChange
in interface FileAlterationListener
directory
- The directory changed (ignored)public void onDirectoryDelete(File directory)+
onDirectoryDelete
in interface FileAlterationListener
directory
- The directory deleted (ignored)public void onFileCreate(File file)+
onFileCreate
in interface FileAlterationListener
file
- The file created (ignored)public void onFileChange(File file)+
onFileChange
in interface FileAlterationListener
file
- The file changed (ignored)public void onFileDelete(File file)+
onFileDelete
in interface FileAlterationListener
file
- The file deleted (ignored)public void onStop(FileAlterationObserver observer)+
onStop
in interface FileAlterationListener
observer
- The file system observer (ignored)Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/FileAlterationMonitor.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/FileAlterationMonitor.html new file mode 100644 index 0000000..3b5d022 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/FileAlterationMonitor.html @@ -0,0 +1,461 @@ + + + + + +public final class FileAlterationMonitor +extends Object +implements Runnable+
FileAlterationObserver
at a specified interval.FileAlterationObserver
Constructor and Description | +
---|
FileAlterationMonitor()
+Construct a monitor with a default interval of 10 seconds.
+ |
+
FileAlterationMonitor(long interval)
+Construct a monitor with the specified interval.
+ |
+
FileAlterationMonitor(long interval,
+ FileAlterationObserver... observers)
+Construct a monitor with the specified interval and set of observers.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+addObserver(FileAlterationObserver observer)
+Add a file system observer to this monitor.
+ |
+
long |
+getInterval()
+Return the interval.
+ |
+
Iterable<FileAlterationObserver> |
+getObservers()
+Returns the set of
+FileAlterationObserver registered with
+ this monitor. |
+
void |
+removeObserver(FileAlterationObserver observer)
+Remove a file system observer from this monitor.
+ |
+
void |
+run()
+Run.
+ |
+
void |
+setThreadFactory(ThreadFactory threadFactory)
+Set the thread factory.
+ |
+
void |
+start()
+Start monitoring.
+ |
+
void |
+stop()
+Stop monitoring.
+ |
+
void |
+stop(long stopInterval)
+Stop monitoring.
+ |
+
public FileAlterationMonitor()+
public FileAlterationMonitor(long interval)+
interval
- The amount of time in miliseconds to wait between
+ checks of the file systempublic FileAlterationMonitor(long interval, + FileAlterationObserver... observers)+
interval
- The amount of time in miliseconds to wait between
+ checks of the file systemobservers
- The set of observers to add to the monitor.public long getInterval()+
public void setThreadFactory(ThreadFactory threadFactory)+
threadFactory
- the thread factorypublic void addObserver(FileAlterationObserver observer)+
observer
- The file system observer to addpublic void removeObserver(FileAlterationObserver observer)+
observer
- The file system observer to removepublic Iterable<FileAlterationObserver> getObservers()+
FileAlterationObserver
registered with
+ this monitor.FileAlterationObserver
public void start() + throws Exception+
Exception
- if an error occurs initializing the observerpublic void stop() + throws Exception+
Exception
- if an error occurs initializing the observerpublic void stop(long stopInterval) + throws Exception+
stopInterval
- the amount of time in milliseconds to wait for the thread to finish.
+ A value of zero will wait until the thread is finished (see Thread.join(long)
).Exception
- if an error occurs initializing the observerCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/FileAlterationObserver.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/FileAlterationObserver.html new file mode 100644 index 0000000..322bf15 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/FileAlterationObserver.html @@ -0,0 +1,629 @@ + + + + + +public class FileAlterationObserver +extends Object +implements Serializable+
+ To use this implementation: +
FileAlterationListener
implementation(s) that process
+ the file/directory create, change and delete eventsFileAlterationObserver
for
+ the appropriate directory.FileAlterationMonitor
or
+ run manually.FileAlterationObserver
for the directory and register the listeners:
+ + File directory = new File(new File("."), "src"); + FileAlterationObserver observer = new FileAlterationObserver(directory); + observer.addListener(...); + observer.addListener(...); ++ To manually observe a directory, initialize the observer and invoked the +
checkAndNotify()
method as required:
+ + // intialize + observer.init(); + ... + // invoke as required + observer.checkAndNotify(); + ... + observer.checkAndNotify(); + ... + // finished + observer.finish(); ++ Alternatively, register the oberver(s) with a
FileAlterationMonitor
,
+ which creates a new thread, invoking the observer at the specified interval:
+ + long interval = ... + FileAlterationMonitor monitor = new FileAlterationMonitor(interval); + monitor.addObserver(observer); + monitor.start(); + ... + monitor.stop(); ++ +
FileFilter
s to observe only the files and/or directories
+ that are of interest. This makes it more efficient and reduces the
+ noise from unwanted file system events.
+ + Commons IO has a good range of + useful, ready made + File Filter + implementations for this purpose. +
+ For example, to only observe 1) visible directories and 2) files with a ".java" suffix
+ in a root directory called "src" you could set up a FileAlterationObserver
in the following
+ way:
+
+ // Create a FileFilter + IOFileFilter directories = FileFilterUtils.and( + FileFilterUtils.directoryFileFilter(), + HiddenFileFilter.VISIBLE); + IOFileFilter files = FileFilterUtils.and( + FileFilterUtils.fileFileFilter(), + FileFilterUtils.suffixFileFilter(".java")); + IOFileFilter filter = FileFilterUtils.or(directories, files); + + // Create the File system observer and register File Listeners + FileAlterationObserver observer = new FileAlterationObserver(new File("src"), filter); + observer.addListener(...); + observer.addListener(...); ++ +
FileEntry
represents the state of a file or directory, capturing
+ File
attributes at a point in time. Custom implementations of
+ FileEntry
can be used to capture additional properties that the
+ basic implementation does not support. The FileEntry.refresh(File)
+ method is used to determine if a file or directory has changed since the last
+ check and stores the current state of the File
's properties.FileAlterationListener
,
+FileAlterationMonitor
,
+Serialized FormModifier | +Constructor and Description | +
---|---|
|
+FileAlterationObserver(File directory)
+Construct an observer for the specified directory.
+ |
+
protected |
+FileAlterationObserver(FileEntry rootEntry,
+ FileFilter fileFilter,
+ IOCase caseSensitivity)
+Construct an observer for the specified directory, file filter and
+ file comparator.
+ |
+
|
+FileAlterationObserver(File directory,
+ FileFilter fileFilter)
+Construct an observer for the specified directory and file filter.
+ |
+
|
+FileAlterationObserver(File directory,
+ FileFilter fileFilter,
+ IOCase caseSensitivity)
+Construct an observer for the specified directory, file filter and
+ file comparator.
+ |
+
|
+FileAlterationObserver(String directoryName)
+Construct an observer for the specified directory.
+ |
+
|
+FileAlterationObserver(String directoryName,
+ FileFilter fileFilter)
+Construct an observer for the specified directory and file filter.
+ |
+
|
+FileAlterationObserver(String directoryName,
+ FileFilter fileFilter,
+ IOCase caseSensitivity)
+Construct an observer for the specified directory, file filter and
+ file comparator.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+addListener(FileAlterationListener listener)
+Add a file system listener.
+ |
+
void |
+checkAndNotify()
+Check whether the file and its chlidren have been created, modified or deleted.
+ |
+
void |
+destroy()
+Final processing.
+ |
+
File |
+getDirectory()
+Return the directory being observed.
+ |
+
FileFilter |
+getFileFilter()
+Return the fileFilter.
+ |
+
Iterable<FileAlterationListener> |
+getListeners()
+Returns the set of registered file system listeners.
+ |
+
void |
+initialize()
+Initialize the observer.
+ |
+
void |
+removeListener(FileAlterationListener listener)
+Remove a file system listener.
+ |
+
String |
+toString()
+Provide a String representation of this observer.
+ |
+
public FileAlterationObserver(String directoryName)+
directoryName
- the name of the directory to observepublic FileAlterationObserver(String directoryName, + FileFilter fileFilter)+
directoryName
- the name of the directory to observefileFilter
- The file filter or null if nonepublic FileAlterationObserver(String directoryName, + FileFilter fileFilter, + IOCase caseSensitivity)+
directoryName
- the name of the directory to observefileFilter
- The file filter or null if nonecaseSensitivity
- what case sensitivity to use comparing file names, null means system sensitivepublic FileAlterationObserver(File directory)+
directory
- the directory to observepublic FileAlterationObserver(File directory, + FileFilter fileFilter)+
directory
- the directory to observefileFilter
- The file filter or null if nonepublic FileAlterationObserver(File directory, + FileFilter fileFilter, + IOCase caseSensitivity)+
directory
- the directory to observefileFilter
- The file filter or null if nonecaseSensitivity
- what case sensitivity to use comparing file names, null means system sensitiveprotected FileAlterationObserver(FileEntry rootEntry, + FileFilter fileFilter, + IOCase caseSensitivity)+
rootEntry
- the root directory to observefileFilter
- The file filter or null if nonecaseSensitivity
- what case sensitivity to use comparing file names, null means system sensitivepublic File getDirectory()+
public FileFilter getFileFilter()+
public void addListener(FileAlterationListener listener)+
listener
- The file system listenerpublic void removeListener(FileAlterationListener listener)+
listener
- The file system listenerpublic Iterable<FileAlterationListener> getListeners()+
public void initialize() + throws Exception+
Exception
- if an error occurspublic void destroy() + throws Exception+
Exception
- if an error occurspublic void checkAndNotify()+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/FileEntry.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/FileEntry.html new file mode 100644 index 0000000..d51dbca --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/FileEntry.html @@ -0,0 +1,604 @@ + + + + + +public class FileEntry +extends Object +implements Serializable+
File
attributes at a point in time.
+ File.getName()
)File.exists()
)File.isDirectory()
)File.lastModified()
)File.length()
) - directories treated as zeroFile.listFiles(java.io.FileFilter)
)
+ If the state of additional File
attributes is required then create a custom
+ FileEntry
with properties for those attributes. Override the
+ newChildInstance(File)
to return a new instance of the appropriate type.
+ You may also want to override the refresh(File)
method.
+
FileAlterationObserver
,
+Serialized FormConstructor and Description | +
---|
FileEntry(File file)
+Construct a new monitor for a specified
+File . |
+
FileEntry(FileEntry parent,
+ File file)
+Construct a new monitor for a specified
+File . |
+
Modifier and Type | +Method and Description | +
---|---|
FileEntry[] |
+getChildren()
+Return the directory's files.
+ |
+
File |
+getFile()
+Return the file being monitored.
+ |
+
long |
+getLastModified()
+Return the last modified time from the last time it
+ was checked.
+ |
+
long |
+getLength()
+Return the length.
+ |
+
int |
+getLevel()
+Return the level
+ |
+
String |
+getName()
+Return the file name.
+ |
+
FileEntry |
+getParent()
+Return the parent entry.
+ |
+
boolean |
+isDirectory()
+Indicate whether the file is a directory or not.
+ |
+
boolean |
+isExists()
+Indicate whether the file existed the last time it
+ was checked.
+ |
+
FileEntry |
+newChildInstance(File file)
+Create a new child instance.
+ |
+
boolean |
+refresh(File file)
+Refresh the attributes from the
+File , indicating
+ whether the file has changed. |
+
void |
+setChildren(FileEntry[] children)
+Set the directory's files.
+ |
+
void |
+setDirectory(boolean directory)
+Set whether the file is a directory or not.
+ |
+
void |
+setExists(boolean exists)
+Set whether the file existed the last time it
+ was checked.
+ |
+
void |
+setLastModified(long lastModified)
+Return the last modified time from the last time it
+ was checked.
+ |
+
void |
+setLength(long length)
+Set the length.
+ |
+
void |
+setName(String name)
+Set the file name.
+ |
+
public FileEntry(File file)+
File
.file
- The file being monitoredpublic boolean refresh(File file)+
File
, indicating
+ whether the file has changed.
+
+ This implementation refreshes the name
, exists
,
+ directory
, lastModified
and length
+ properties.
+
+ The exists
, directory
, lastModified
+ and length
properties are compared for changes
file
- the file instance to compare totrue
if the file has changed, otherwise false
public FileEntry newChildInstance(File file)+
+ Custom implementations should override this method to return + a new instance of the appropriate type.
file
- The child filepublic FileEntry getParent()+
public int getLevel()+
public FileEntry[] getChildren()+
public void setChildren(FileEntry[] children)+
children
- This directory's files, may be nullpublic File getFile()+
public String getName()+
public void setName(String name)+
name
- the file namepublic long getLastModified()+
public void setLastModified(long lastModified)+
lastModified
- The last modified timepublic long getLength()+
public void setLength(long length)+
length
- the lengthpublic boolean isExists()+
public void setExists(boolean exists)+
exists
- whether the file exists or notpublic boolean isDirectory()+
public void setDirectory(boolean directory)+
directory
- whether the file is a directory or notCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/class-use/FileAlterationListener.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/class-use/FileAlterationListener.html new file mode 100644 index 0000000..eb113da --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/class-use/FileAlterationListener.html @@ -0,0 +1,197 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io.monitor | +
+
+This package provides a component for monitoring file system events
+(directory and file create, update and delete events).
+ |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+FileAlterationListenerAdaptor
+Convenience
+FileAlterationListener implementation that does nothing. |
+
Modifier and Type | +Method and Description | +
---|---|
Iterable<FileAlterationListener> |
+FileAlterationObserver.getListeners()
+Returns the set of registered file system listeners.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+FileAlterationObserver.addListener(FileAlterationListener listener)
+Add a file system listener.
+ |
+
void |
+FileAlterationObserver.removeListener(FileAlterationListener listener)
+Remove a file system listener.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/class-use/FileAlterationListenerAdaptor.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/class-use/FileAlterationListenerAdaptor.html new file mode 100644 index 0000000..99b5936 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/class-use/FileAlterationListenerAdaptor.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/class-use/FileAlterationMonitor.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/class-use/FileAlterationMonitor.html new file mode 100644 index 0000000..1f9f648 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/class-use/FileAlterationMonitor.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/class-use/FileAlterationObserver.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/class-use/FileAlterationObserver.html new file mode 100644 index 0000000..3690a47 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/class-use/FileAlterationObserver.html @@ -0,0 +1,221 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io.monitor | +
+
+This package provides a component for monitoring file system events
+(directory and file create, update and delete events).
+ |
+
Modifier and Type | +Method and Description | +
---|---|
Iterable<FileAlterationObserver> |
+FileAlterationMonitor.getObservers()
+Returns the set of
+FileAlterationObserver registered with
+ this monitor. |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+FileAlterationMonitor.addObserver(FileAlterationObserver observer)
+Add a file system observer to this monitor.
+ |
+
void |
+FileAlterationListener.onStart(FileAlterationObserver observer)
+File system observer started checking event.
+ |
+
void |
+FileAlterationListenerAdaptor.onStart(FileAlterationObserver observer)
+File system observer started checking event.
+ |
+
void |
+FileAlterationListener.onStop(FileAlterationObserver observer)
+File system observer finished checking event.
+ |
+
void |
+FileAlterationListenerAdaptor.onStop(FileAlterationObserver observer)
+File system observer finished checking event.
+ |
+
void |
+FileAlterationMonitor.removeObserver(FileAlterationObserver observer)
+Remove a file system observer from this monitor.
+ |
+
Constructor and Description | +
---|
FileAlterationMonitor(long interval,
+ FileAlterationObserver... observers)
+Construct a monitor with the specified interval and set of observers.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/class-use/FileEntry.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/class-use/FileEntry.html new file mode 100644 index 0000000..b2e4c5c --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/class-use/FileEntry.html @@ -0,0 +1,210 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io.monitor | +
+
+This package provides a component for monitoring file system events
+(directory and file create, update and delete events).
+ |
+
Modifier and Type | +Method and Description | +
---|---|
FileEntry[] |
+FileEntry.getChildren()
+Return the directory's files.
+ |
+
FileEntry |
+FileEntry.getParent()
+Return the parent entry.
+ |
+
FileEntry |
+FileEntry.newChildInstance(File file)
+Create a new child instance.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+FileEntry.setChildren(FileEntry[] children)
+Set the directory's files.
+ |
+
Constructor and Description | +
---|
FileAlterationObserver(FileEntry rootEntry,
+ FileFilter fileFilter,
+ IOCase caseSensitivity)
+Construct an observer for the specified directory, file filter and
+ file comparator.
+ |
+
FileEntry(FileEntry parent,
+ File file)
+Construct a new monitor for a specified
+File . |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/package-frame.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/package-frame.html new file mode 100644 index 0000000..a08385c --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/package-frame.html @@ -0,0 +1,25 @@ + + + + + +See: Description
+Interface | +Description | +
---|---|
FileAlterationListener | +
+ A listener that receives events of file system modifications.
+ |
+
Class | +Description | +
---|---|
FileAlterationListenerAdaptor | +
+ Convenience
+FileAlterationListener implementation that does nothing. |
+
FileAlterationMonitor | +
+ A runnable that spawns a monitoring thread triggering any
+ registered
+FileAlterationObserver at a specified interval. |
+
FileAlterationObserver | +
+ FileAlterationObserver represents the state of files below a root directory,
+ checking the filesystem and notifying listeners of create, change or
+ delete events.
+ |
+
FileEntry | +
+ The state of a file or directory, capturing the following
+File attributes at a point in time. |
+
+This package provides a component for monitoring file system events +(directory and file create, update and delete events). +
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/package-tree.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/package-tree.html new file mode 100644 index 0000000..52f5132 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/package-tree.html @@ -0,0 +1,135 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/package-use.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/package-use.html new file mode 100644 index 0000000..e4c5f69 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/monitor/package-use.html @@ -0,0 +1,166 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io.monitor | +
+
+This package provides a component for monitoring file system events
+(directory and file create, update and delete events).
+ |
+
Class and Description | +
---|
FileAlterationListener
+ A listener that receives events of file system modifications.
+ |
+
FileAlterationObserver
+ FileAlterationObserver represents the state of files below a root directory,
+ checking the filesystem and notifying listeners of create, change or
+ delete events.
+ |
+
FileEntry
+ The state of a file or directory, capturing the following
+File attributes at a point in time. |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/AppendableOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/AppendableOutputStream.html new file mode 100644 index 0000000..125cf46 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/AppendableOutputStream.html @@ -0,0 +1,315 @@ + + + + + +public class AppendableOutputStream<T extends Appendable> +extends OutputStream+
Appendable
+ Object.
+
+ For example, can be used with any Writer
or a StringBuilder
+ or StringBuffer
.
Appendable
Constructor and Description | +
---|
AppendableOutputStream(T appendable)
+Construct a new instance with the specified appendable.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
T |
+getAppendable()
+Return the target appendable.
+ |
+
void |
+write(int b)
+Write a character to the underlying appendable.
+ |
+
public AppendableOutputStream(T appendable)+
appendable
- the appendable to write topublic void write(int b) + throws IOException+
write
in class OutputStream
b
- the character to writeIOException
- upon errorpublic T getAppendable()+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/BrokenOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/BrokenOutputStream.html new file mode 100644 index 0000000..0478f9c --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/BrokenOutputStream.html @@ -0,0 +1,358 @@ + + + + + +public class BrokenOutputStream +extends OutputStream+
IOException
from
+ all OutputStream
methods.
+ + This class is mostly useful for testing error handling in code that uses an + output stream.
Constructor and Description | +
---|
BrokenOutputStream()
+Creates a new stream that always throws an
+IOException |
+
BrokenOutputStream(IOException exception)
+Creates a new stream that always throws the given exception.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+close()
+Throws the configured exception.
+ |
+
void |
+flush()
+Throws the configured exception.
+ |
+
void |
+write(int b)
+Throws the configured exception.
+ |
+
write, write
public BrokenOutputStream(IOException exception)+
exception
- the exception to be thrownpublic BrokenOutputStream()+
IOException
public void write(int b) + throws IOException+
write
in class OutputStream
b
- ignoredIOException
- always thrownpublic void flush() + throws IOException+
flush
in interface Flushable
flush
in class OutputStream
IOException
- always thrownpublic void close() + throws IOException+
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
- always thrownCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/ByteArrayOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/ByteArrayOutputStream.html new file mode 100644 index 0000000..b8e2ef6 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/ByteArrayOutputStream.html @@ -0,0 +1,640 @@ + + + + + +public class ByteArrayOutputStream +extends OutputStream+
+ The data can be retrieved using toByteArray()
and
+ toString()
.
+
+ Closing a ByteArrayOutputStream
has no effect. The methods in
+ this class can be called after the stream has been closed without
+ generating an IOException
.
+
+ This is an alternative implementation of the ByteArrayOutputStream
+ class. The original implementation only allocates 32 bytes at the beginning.
+ As this class is designed for heavy duty it starts at 1024 bytes. In contrast
+ to the original it doesn't reallocate the whole memory block but allocates
+ additional buffers. This way no buffers need to be garbage collected and
+ the contents don't have to be copied to the new buffer. This class is
+ designed to behave exactly like the original. The only exception is the
+ deprecated toString(int) method that has been ignored.
Constructor and Description | +
---|
ByteArrayOutputStream()
+Creates a new byte array output stream.
+ |
+
ByteArrayOutputStream(int size)
+Creates a new byte array output stream, with a buffer capacity of
+ the specified size, in bytes.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+close()
+Closing a
+ByteArrayOutputStream has no effect. |
+
void |
+reset() |
+
int |
+size()
+Return the current size of the byte array.
+ |
+
static InputStream |
+toBufferedInputStream(InputStream input)
+Fetches entire contents of an
+InputStream and represent
+ same data as result InputStream. |
+
static InputStream |
+toBufferedInputStream(InputStream input,
+ int size)
+Fetches entire contents of an
+InputStream and represent
+ same data as result InputStream. |
+
byte[] |
+toByteArray()
+Gets the curent contents of this byte stream as a byte array.
+ |
+
InputStream |
+toInputStream()
+Gets the current contents of this byte stream as a Input Stream.
+ |
+
String |
+toString()
+Deprecated.
+
+2.5 use
+toString(String) instead |
+
String |
+toString(Charset charset)
+Gets the curent contents of this byte stream as a string
+ using the specified encoding.
+ |
+
String |
+toString(String enc)
+Gets the curent contents of this byte stream as a string
+ using the specified encoding.
+ |
+
void |
+write(byte[] b,
+ int off,
+ int len)
+Write the bytes to byte array.
+ |
+
int |
+write(InputStream in)
+Writes the entire contents of the specified input stream to this
+ byte stream.
+ |
+
void |
+write(int b)
+Write a byte to byte array.
+ |
+
void |
+writeTo(OutputStream out)
+Writes the entire contents of this byte stream to the
+ specified output stream.
+ |
+
flush, write
public ByteArrayOutputStream()+
public ByteArrayOutputStream(int size)+
size
- the initial sizeIllegalArgumentException
- if size is negativepublic void write(byte[] b, + int off, + int len)+
write
in class OutputStream
b
- the bytes to writeoff
- The start offsetlen
- The number of bytes to writepublic void write(int b)+
write
in class OutputStream
b
- the byte to writepublic int write(InputStream in) + throws IOException+
in
- the input stream to read fromIOException
- if an I/O error occurs while reading the input streampublic int size()+
public void close() + throws IOException+
ByteArrayOutputStream
has no effect. The methods in
+ this class can be called after the stream has been closed without
+ generating an IOException
.close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
- never (this method should not declare this exception
+ but it has to now due to backwards compatibility)public void reset()+
ByteArrayOutputStream.reset()
public void writeTo(OutputStream out) + throws IOException+
out
- the output stream to write toIOException
- if an I/O error occurs, such as if the stream is closedByteArrayOutputStream.writeTo(OutputStream)
public static InputStream toBufferedInputStream(InputStream input) + throws IOException+
InputStream
and represent
+ same data as result InputStream.
+ + This method is useful where, +
toByteArray()
, since it
+ avoids unnecessary allocation and copy of byte[].BufferedInputStream
.input
- Stream to be fully buffered.IOException
- if an I/O error occurspublic static InputStream toBufferedInputStream(InputStream input, + int size) + throws IOException+
InputStream
and represent
+ same data as result InputStream.
+ + This method is useful where, +
toByteArray()
, since it
+ avoids unnecessary allocation and copy of byte[].BufferedInputStream
.input
- Stream to be fully buffered.size
- the initial buffer sizeIOException
- if an I/O error occurspublic InputStream toInputStream()+
this
stream,
+ avoiding memory allocation and copy, thus saving space and time.ByteArrayOutputStream.toByteArray()
,
+reset()
public byte[] toByteArray()+
ByteArrayOutputStream.toByteArray()
@Deprecated +public String toString()+
toString(String)
insteadtoString
in class Object
ByteArrayOutputStream.toString()
public String toString(String enc) + throws UnsupportedEncodingException+
enc
- the name of the character encodingUnsupportedEncodingException
- if the encoding is not supportedByteArrayOutputStream.toString(String)
public String toString(Charset charset)+
charset
- the character encodingByteArrayOutputStream.toString(String)
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/ChunkedOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/ChunkedOutputStream.html new file mode 100644 index 0000000..fa6f13c --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/ChunkedOutputStream.html @@ -0,0 +1,335 @@ + + + + + +public class ChunkedOutputStream +extends FilterOutputStream+
out
Constructor and Description | +
---|
ChunkedOutputStream(OutputStream stream)
+Creates a new stream that uses a chunk size of
+DEFAULT_CHUNK_SIZE . |
+
ChunkedOutputStream(OutputStream stream,
+ int chunkSize)
+Creates a new stream that uses the specified chunk size.
+ |
+
public ChunkedOutputStream(OutputStream stream, + int chunkSize)+
stream
- the stream to wrapchunkSize
- the chunk size to use; must be a positive number.IllegalArgumentException
- if the chunk size is <= 0public ChunkedOutputStream(OutputStream stream)+
DEFAULT_CHUNK_SIZE
.stream
- the stream to wrappublic void write(byte[] data, + int srcOffset, + int length) + throws IOException+
write
in class FilterOutputStream
data
- the data to writesrcOffset
- the offsetlength
- the length of data to writeIOException
- if an I/O error occurs.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/ChunkedWriter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/ChunkedWriter.html new file mode 100644 index 0000000..c2683fc --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/ChunkedWriter.html @@ -0,0 +1,349 @@ + + + + + +public class ChunkedWriter +extends FilterWriter+
out
Constructor and Description | +
---|
ChunkedWriter(Writer writer)
+Creates a new writer that uses a chunk size of
+DEFAULT_CHUNK_SIZE |
+
ChunkedWriter(Writer writer,
+ int chunkSize)
+Creates a new writer that uses the specified chunk size.
+ |
+
public ChunkedWriter(Writer writer, + int chunkSize)+
writer
- the writer to wrapchunkSize
- the chunk size to use; must be a positive number.IllegalArgumentException
- if the chunk size is <= 0public ChunkedWriter(Writer writer)+
DEFAULT_CHUNK_SIZE
writer
- the writer to wrappublic void write(char[] data, + int srcOffset, + int length) + throws IOException+
write
in class FilterWriter
data
- The datasrcOffset
- the offsetlength
- the number of bytes to writeIOException
- upon errorCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/CloseShieldOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/CloseShieldOutputStream.html new file mode 100644 index 0000000..02d6fb2 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/CloseShieldOutputStream.html @@ -0,0 +1,327 @@ + + + + + +public class CloseShieldOutputStream +extends ProxyOutputStream+
+ This class is typically used in cases where an output stream needs to be + passed to a component that wants to explicitly close the stream even if + other components would still use the stream for output. +
out
Constructor and Description | +
---|
CloseShieldOutputStream(OutputStream out)
+Creates a proxy that shields the given output stream from being
+ closed.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+close()
+Replaces the underlying output stream with a
+ClosedOutputStream
+ sentinel. |
+
afterWrite, beforeWrite, flush, handleIOException, write, write, write
public CloseShieldOutputStream(OutputStream out)+
out
- underlying output streampublic void close()+
ClosedOutputStream
+ sentinel. The original output stream will remain open, but this proxy
+ will appear closed.close
in interface Closeable
close
in interface AutoCloseable
close
in class ProxyOutputStream
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/ClosedOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/ClosedOutputStream.html new file mode 100644 index 0000000..57966f9 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/ClosedOutputStream.html @@ -0,0 +1,331 @@ + + + + + +public class ClosedOutputStream +extends OutputStream+
+ Typically uses of this class include testing for corner cases in methods
+ that accept an output stream and acting as a sentinel value instead of
+ a null
output stream.
Modifier and Type | +Field and Description | +
---|---|
static ClosedOutputStream |
+CLOSED_OUTPUT_STREAM
+A singleton.
+ |
+
Constructor and Description | +
---|
ClosedOutputStream() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+write(int b)
+Throws an
+IOException to indicate that the stream is closed. |
+
public static final ClosedOutputStream CLOSED_OUTPUT_STREAM+
public void write(int b) + throws IOException+
IOException
to indicate that the stream is closed.write
in class OutputStream
b
- ignoredIOException
- always thrownCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/CountingOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/CountingOutputStream.html new file mode 100644 index 0000000..0620f56 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/CountingOutputStream.html @@ -0,0 +1,406 @@ + + + + + +public class CountingOutputStream +extends ProxyOutputStream+
+ A typical use case would be during debugging, to ensure that data is being + written as expected.
out
Constructor and Description | +
---|
CountingOutputStream(OutputStream out)
+Constructs a new CountingOutputStream.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+beforeWrite(int n)
+Updates the count with the number of bytes that are being written.
+ |
+
long |
+getByteCount()
+The number of bytes that have passed through this stream.
+ |
+
int |
+getCount()
+The number of bytes that have passed through this stream.
+ |
+
long |
+resetByteCount()
+Set the byte count back to 0.
+ |
+
int |
+resetCount()
+Set the byte count back to 0.
+ |
+
afterWrite, close, flush, handleIOException, write, write, write
public CountingOutputStream(OutputStream out)+
out
- the OutputStream to write toprotected void beforeWrite(int n)+
beforeWrite
in class ProxyOutputStream
n
- number of bytes to be written to the streampublic int getCount()+
+ NOTE: From v1.3 this method throws an ArithmeticException if the
+ count is greater than can be expressed by an int
.
+ See getByteCount()
for a method using a long
.
ArithmeticException
- if the byte count is too largepublic int resetCount()+
+ NOTE: From v1.3 this method throws an ArithmeticException if the
+ count is greater than can be expressed by an int
.
+ See resetByteCount()
for a method using a long
.
ArithmeticException
- if the byte count is too largepublic long getByteCount()+
+ NOTE: This method is an alternative for getCount()
.
+ It was added because that method returns an integer which will
+ result in incorrect count for files over 2GB.
public long resetByteCount()+
+ NOTE: This method is an alternative for resetCount()
.
+ It was added because that method returns an integer which will
+ result in incorrect count for files over 2GB.
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/DeferredFileOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/DeferredFileOutputStream.html new file mode 100644 index 0000000..af26916 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/DeferredFileOutputStream.html @@ -0,0 +1,474 @@ + + + + + +public class DeferredFileOutputStream +extends ThresholdingOutputStream+
+ This class originated in FileUpload processing. In this use case, you do + not know in advance the size of the file being uploaded. If the file is small + you want to store it in memory (for speed), but if the file is large you want + to store it to file (to avoid memory issues).
Constructor and Description | +
---|
DeferredFileOutputStream(int threshold,
+ File outputFile)
+Constructs an instance of this class which will trigger an event at the
+ specified threshold, and save data to a file beyond that point.
+ |
+
DeferredFileOutputStream(int threshold,
+ String prefix,
+ String suffix,
+ File directory)
+Constructs an instance of this class which will trigger an event at the
+ specified threshold, and save data to a temporary file beyond that point.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+close()
+Closes underlying output stream, and mark this as closed
+ |
+
byte[] |
+getData()
+Returns the data for this output stream as an array of bytes, assuming
+ that the data has been retained in memory.
+ |
+
File |
+getFile()
+Returns either the output file specified in the constructor or
+ the temporary file created or null.
+ |
+
protected OutputStream |
+getStream()
+Returns the current output stream.
+ |
+
boolean |
+isInMemory()
+Determines whether or not the data for this output stream has been
+ retained in memory.
+ |
+
protected void |
+thresholdReached()
+Switches the underlying output stream from a memory based stream to one
+ that is backed by disk.
+ |
+
void |
+writeTo(OutputStream out)
+Writes the data from this output stream to the specified output stream,
+ after it has been closed.
+ |
+
checkThreshold, flush, getByteCount, getThreshold, isThresholdExceeded, resetByteCount, setByteCount, write, write, write
public DeferredFileOutputStream(int threshold, + File outputFile)+
threshold
- The number of bytes at which to trigger an event.outputFile
- The file to which data is saved beyond the threshold.public DeferredFileOutputStream(int threshold, + String prefix, + String suffix, + File directory)+
threshold
- The number of bytes at which to trigger an event.prefix
- Prefix to use for the temporary file.suffix
- Suffix to use for the temporary file.directory
- Temporary file directory.protected OutputStream getStream() + throws IOException+
getStream
in class ThresholdingOutputStream
IOException
- if an error occurs.protected void thresholdReached() + throws IOException+
thresholdReached
in class ThresholdingOutputStream
IOException
- if an error occurs.public boolean isInMemory()+
true
if the data is available in memory;
+ false
otherwise.public byte[] getData()+
null
.null
if no such
+ data is available.public File getFile()+
+ If the constructor specifying the file is used then it returns that + same output file, even when threshold has not been reached. +
+ If constructor specifying a temporary file prefix/suffix is used
+ then the temporary file created once the threshold is reached is returned
+ If the threshold was not reached then null
is returned.
null
if no such
+ file exists.public void close() + throws IOException+
close
in interface Closeable
close
in interface AutoCloseable
close
in class ThresholdingOutputStream
IOException
- if an error occurs.public void writeTo(OutputStream out) + throws IOException+
out
- output stream to write to.IOException
- if this stream is not yet closed or an error occurs.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/DemuxOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/DemuxOutputStream.html new file mode 100644 index 0000000..0408e7a --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/DemuxOutputStream.html @@ -0,0 +1,353 @@ + + + + + +public class DemuxOutputStream +extends OutputStream+
Constructor and Description | +
---|
DemuxOutputStream() |
+
Modifier and Type | +Method and Description | +
---|---|
OutputStream |
+bindStream(OutputStream output)
+Binds the specified stream to the current thread.
+ |
+
void |
+close()
+Closes stream associated with current thread.
+ |
+
void |
+flush()
+Flushes stream associated with current thread.
+ |
+
void |
+write(int ch)
+Writes byte to stream associated with current thread.
+ |
+
write, write
public OutputStream bindStream(OutputStream output)+
output
- the stream to bindpublic void close() + throws IOException+
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
- if an error occurspublic void flush() + throws IOException+
flush
in interface Flushable
flush
in class OutputStream
IOException
- if an error occurspublic void write(int ch) + throws IOException+
write
in class OutputStream
ch
- the byte to write to streamIOException
- if an error occursCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/FileWriterWithEncoding.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/FileWriterWithEncoding.html new file mode 100644 index 0000000..2391262 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/FileWriterWithEncoding.html @@ -0,0 +1,728 @@ + + + + + +public class FileWriterWithEncoding +extends Writer+
+ This class provides a simple alternative to FileWriter
+ that allows an encoding to be set. Unfortunately, it cannot subclass
+ FileWriter
.
+
+ By default, the file will be overwritten, but this may be changed to append. +
+ The encoding must be specified using either the name of the Charset
,
+ the Charset
, or a CharsetEncoder
. If the default encoding
+ is required then use the FileWriter
directly, rather than
+ this implementation.
+
Constructor and Description | +
---|
FileWriterWithEncoding(File file,
+ Charset encoding)
+Constructs a FileWriterWithEncoding with a file encoding.
+ |
+
FileWriterWithEncoding(File file,
+ Charset encoding,
+ boolean append)
+Constructs a FileWriterWithEncoding with a file encoding.
+ |
+
FileWriterWithEncoding(File file,
+ CharsetEncoder encoding)
+Constructs a FileWriterWithEncoding with a file encoding.
+ |
+
FileWriterWithEncoding(File file,
+ CharsetEncoder encoding,
+ boolean append)
+Constructs a FileWriterWithEncoding with a file encoding.
+ |
+
FileWriterWithEncoding(File file,
+ String encoding)
+Constructs a FileWriterWithEncoding with a file encoding.
+ |
+
FileWriterWithEncoding(File file,
+ String encoding,
+ boolean append)
+Constructs a FileWriterWithEncoding with a file encoding.
+ |
+
FileWriterWithEncoding(String filename,
+ Charset encoding)
+Constructs a FileWriterWithEncoding with a file encoding.
+ |
+
FileWriterWithEncoding(String filename,
+ Charset encoding,
+ boolean append)
+Constructs a FileWriterWithEncoding with a file encoding.
+ |
+
FileWriterWithEncoding(String filename,
+ CharsetEncoder encoding)
+Constructs a FileWriterWithEncoding with a file encoding.
+ |
+
FileWriterWithEncoding(String filename,
+ CharsetEncoder encoding,
+ boolean append)
+Constructs a FileWriterWithEncoding with a file encoding.
+ |
+
FileWriterWithEncoding(String filename,
+ String encoding)
+Constructs a FileWriterWithEncoding with a file encoding.
+ |
+
FileWriterWithEncoding(String filename,
+ String encoding,
+ boolean append)
+Constructs a FileWriterWithEncoding with a file encoding.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+close()
+Close the stream.
+ |
+
void |
+flush()
+Flush the stream.
+ |
+
void |
+write(char[] chr)
+Write the characters from an array.
+ |
+
void |
+write(char[] chr,
+ int st,
+ int end)
+Write the specified characters from an array.
+ |
+
void |
+write(int idx)
+Write a character.
+ |
+
void |
+write(String str)
+Write the characters from a string.
+ |
+
void |
+write(String str,
+ int st,
+ int end)
+Write the specified characters from a string.
+ |
+
public FileWriterWithEncoding(String filename, + String encoding) + throws IOException+
filename
- the name of the file to write to, not nullencoding
- the encoding to use, not nullNullPointerException
- if the file name or encoding is nullIOException
- in case of an I/O errorpublic FileWriterWithEncoding(String filename, + String encoding, + boolean append) + throws IOException+
filename
- the name of the file to write to, not nullencoding
- the encoding to use, not nullappend
- true if content should be appended, false to overwriteNullPointerException
- if the file name or encoding is nullIOException
- in case of an I/O errorpublic FileWriterWithEncoding(String filename, + Charset encoding) + throws IOException+
filename
- the name of the file to write to, not nullencoding
- the encoding to use, not nullNullPointerException
- if the file name or encoding is nullIOException
- in case of an I/O errorpublic FileWriterWithEncoding(String filename, + Charset encoding, + boolean append) + throws IOException+
filename
- the name of the file to write to, not nullencoding
- the encoding to use, not nullappend
- true if content should be appended, false to overwriteNullPointerException
- if the file name or encoding is nullIOException
- in case of an I/O errorpublic FileWriterWithEncoding(String filename, + CharsetEncoder encoding) + throws IOException+
filename
- the name of the file to write to, not nullencoding
- the encoding to use, not nullNullPointerException
- if the file name or encoding is nullIOException
- in case of an I/O errorpublic FileWriterWithEncoding(String filename, + CharsetEncoder encoding, + boolean append) + throws IOException+
filename
- the name of the file to write to, not nullencoding
- the encoding to use, not nullappend
- true if content should be appended, false to overwriteNullPointerException
- if the file name or encoding is nullIOException
- in case of an I/O errorpublic FileWriterWithEncoding(File file, + String encoding) + throws IOException+
file
- the file to write to, not nullencoding
- the encoding to use, not nullNullPointerException
- if the file or encoding is nullIOException
- in case of an I/O errorpublic FileWriterWithEncoding(File file, + String encoding, + boolean append) + throws IOException+
file
- the file to write to, not nullencoding
- the encoding to use, not nullappend
- true if content should be appended, false to overwriteNullPointerException
- if the file or encoding is nullIOException
- in case of an I/O errorpublic FileWriterWithEncoding(File file, + Charset encoding) + throws IOException+
file
- the file to write to, not nullencoding
- the encoding to use, not nullNullPointerException
- if the file or encoding is nullIOException
- in case of an I/O errorpublic FileWriterWithEncoding(File file, + Charset encoding, + boolean append) + throws IOException+
file
- the file to write to, not nullencoding
- the encoding to use, not nullappend
- true if content should be appended, false to overwriteNullPointerException
- if the file or encoding is nullIOException
- in case of an I/O errorpublic FileWriterWithEncoding(File file, + CharsetEncoder encoding) + throws IOException+
file
- the file to write to, not nullencoding
- the encoding to use, not nullNullPointerException
- if the file or encoding is nullIOException
- in case of an I/O errorpublic FileWriterWithEncoding(File file, + CharsetEncoder encoding, + boolean append) + throws IOException+
file
- the file to write to, not nullencoding
- the encoding to use, not nullappend
- true if content should be appended, false to overwriteNullPointerException
- if the file or encoding is nullIOException
- in case of an I/O errorpublic void write(int idx) + throws IOException+
write
in class Writer
idx
- the character to writeIOException
- if an I/O error occurspublic void write(char[] chr) + throws IOException+
write
in class Writer
chr
- the characters to writeIOException
- if an I/O error occurspublic void write(char[] chr, + int st, + int end) + throws IOException+
write
in class Writer
chr
- the characters to writest
- The start offsetend
- The number of characters to writeIOException
- if an I/O error occurspublic void write(String str) + throws IOException+
write
in class Writer
str
- the string to writeIOException
- if an I/O error occurspublic void write(String str, + int st, + int end) + throws IOException+
write
in class Writer
str
- the string to writest
- The start offsetend
- The number of characters to writeIOException
- if an I/O error occurspublic void flush() + throws IOException+
flush
in interface Flushable
flush
in class Writer
IOException
- if an I/O error occurspublic void close() + throws IOException+
close
in interface Closeable
close
in interface AutoCloseable
close
in class Writer
IOException
- if an I/O error occursCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/LockableFileWriter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/LockableFileWriter.html new file mode 100644 index 0000000..b7feb3c --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/LockableFileWriter.html @@ -0,0 +1,693 @@ + + + + + +public class LockableFileWriter +extends Writer+
+ This class provides a simple alternative to FileWriter
+ that will use a lock file to prevent duplicate writes.
+
+ N.B. the lock file is deleted when close()
is called
+ - or if the main file cannot be opened initially.
+ In the (unlikely) event that the lockfile cannot be deleted,
+ this is not reported, and subsequent requests using
+ the same lockfile will fail.
+
+ By default, the file will be overwritten, but this may be changed to append.
+ The lock directory may be specified, but defaults to the system property
+ java.io.tmpdir
.
+ The encoding may also be specified, and defaults to the platform default.
Constructor and Description | +
---|
LockableFileWriter(File file)
+Constructs a LockableFileWriter.
+ |
+
LockableFileWriter(File file,
+ boolean append)
+Constructs a LockableFileWriter.
+ |
+
LockableFileWriter(File file,
+ boolean append,
+ String lockDir)
+Deprecated.
+
+2.5 use
+LockableFileWriter(File, Charset, boolean, String) instead |
+
LockableFileWriter(File file,
+ Charset encoding)
+Constructs a LockableFileWriter with a file encoding.
+ |
+
LockableFileWriter(File file,
+ Charset encoding,
+ boolean append,
+ String lockDir)
+Constructs a LockableFileWriter with a file encoding.
+ |
+
LockableFileWriter(File file,
+ String encoding)
+Constructs a LockableFileWriter with a file encoding.
+ |
+
LockableFileWriter(File file,
+ String encoding,
+ boolean append,
+ String lockDir)
+Constructs a LockableFileWriter with a file encoding.
+ |
+
LockableFileWriter(String fileName)
+Constructs a LockableFileWriter.
+ |
+
LockableFileWriter(String fileName,
+ boolean append)
+Constructs a LockableFileWriter.
+ |
+
LockableFileWriter(String fileName,
+ boolean append,
+ String lockDir)
+Constructs a LockableFileWriter.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+close()
+Closes the file writer and deletes the lockfile (if possible).
+ |
+
void |
+flush()
+Flush the stream.
+ |
+
void |
+write(char[] chr)
+Write the characters from an array.
+ |
+
void |
+write(char[] chr,
+ int st,
+ int end)
+Write the specified characters from an array.
+ |
+
void |
+write(int idx)
+Write a character.
+ |
+
void |
+write(String str)
+Write the characters from a string.
+ |
+
void |
+write(String str,
+ int st,
+ int end)
+Write the specified characters from a string.
+ |
+
public LockableFileWriter(String fileName) + throws IOException+
fileName
- the file to write to, not nullNullPointerException
- if the file is nullIOException
- in case of an I/O errorpublic LockableFileWriter(String fileName, + boolean append) + throws IOException+
fileName
- file to write to, not nullappend
- true if content should be appended, false to overwriteNullPointerException
- if the file is nullIOException
- in case of an I/O errorpublic LockableFileWriter(String fileName, + boolean append, + String lockDir) + throws IOException+
fileName
- the file to write to, not nullappend
- true if content should be appended, false to overwritelockDir
- the directory in which the lock file should be heldNullPointerException
- if the file is nullIOException
- in case of an I/O errorpublic LockableFileWriter(File file) + throws IOException+
file
- the file to write to, not nullNullPointerException
- if the file is nullIOException
- in case of an I/O errorpublic LockableFileWriter(File file, + boolean append) + throws IOException+
file
- the file to write to, not nullappend
- true if content should be appended, false to overwriteNullPointerException
- if the file is nullIOException
- in case of an I/O error@Deprecated +public LockableFileWriter(File file, + boolean append, + String lockDir) + throws IOException+
LockableFileWriter(File, Charset, boolean, String)
insteadfile
- the file to write to, not nullappend
- true if content should be appended, false to overwritelockDir
- the directory in which the lock file should be heldNullPointerException
- if the file is nullIOException
- in case of an I/O errorpublic LockableFileWriter(File file, + Charset encoding) + throws IOException+
file
- the file to write to, not nullencoding
- the encoding to use, null means platform defaultNullPointerException
- if the file is nullIOException
- in case of an I/O errorpublic LockableFileWriter(File file, + String encoding) + throws IOException+
file
- the file to write to, not nullencoding
- the encoding to use, null means platform defaultNullPointerException
- if the file is nullIOException
- in case of an I/O errorUnsupportedCharsetException
- thrown instead of UnsupportedEncodingException
in version 2.2 if the encoding is not
+ supported.public LockableFileWriter(File file, + Charset encoding, + boolean append, + String lockDir) + throws IOException+
file
- the file to write to, not nullencoding
- the encoding to use, null means platform defaultappend
- true if content should be appended, false to overwritelockDir
- the directory in which the lock file should be heldNullPointerException
- if the file is nullIOException
- in case of an I/O errorpublic LockableFileWriter(File file, + String encoding, + boolean append, + String lockDir) + throws IOException+
file
- the file to write to, not nullencoding
- the encoding to use, null means platform defaultappend
- true if content should be appended, false to overwritelockDir
- the directory in which the lock file should be heldNullPointerException
- if the file is nullIOException
- in case of an I/O errorUnsupportedCharsetException
- thrown instead of UnsupportedEncodingException
in version 2.2 if the encoding is not
+ supported.public void close() + throws IOException+
close
in interface Closeable
close
in interface AutoCloseable
close
in class Writer
IOException
- if an I/O error occurspublic void write(int idx) + throws IOException+
write
in class Writer
idx
- the character to writeIOException
- if an I/O error occurspublic void write(char[] chr) + throws IOException+
write
in class Writer
chr
- the characters to writeIOException
- if an I/O error occurspublic void write(char[] chr, + int st, + int end) + throws IOException+
write
in class Writer
chr
- the characters to writest
- The start offsetend
- The number of characters to writeIOException
- if an I/O error occurspublic void write(String str) + throws IOException+
write
in class Writer
str
- the string to writeIOException
- if an I/O error occurspublic void write(String str, + int st, + int end) + throws IOException+
write
in class Writer
str
- the string to writest
- The start offsetend
- The number of characters to writeIOException
- if an I/O error occurspublic void flush() + throws IOException+
flush
in interface Flushable
flush
in class Writer
IOException
- if an I/O error occursCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/NullOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/NullOutputStream.html new file mode 100644 index 0000000..b934a0e --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/NullOutputStream.html @@ -0,0 +1,372 @@ + + + + + +public class NullOutputStream +extends OutputStream+
+ This output stream has no destination (file/socket etc.) and all + bytes written to it are ignored and lost. +
Modifier and Type | +Field and Description | +
---|---|
static NullOutputStream |
+NULL_OUTPUT_STREAM
+A singleton.
+ |
+
Constructor and Description | +
---|
NullOutputStream() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+write(byte[] b)
+Does nothing - output to
+/dev/null . |
+
void |
+write(byte[] b,
+ int off,
+ int len)
+Does nothing - output to
+/dev/null . |
+
void |
+write(int b)
+Does nothing - output to
+/dev/null . |
+
close, flush
public static final NullOutputStream NULL_OUTPUT_STREAM+
public void write(byte[] b, + int off, + int len)+
/dev/null
.write
in class OutputStream
b
- The bytes to writeoff
- The start offsetlen
- The number of bytes to writepublic void write(int b)+
/dev/null
.write
in class OutputStream
b
- The byte to writepublic void write(byte[] b) + throws IOException+
/dev/null
.write
in class OutputStream
b
- The bytes to writeIOException
- neverCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/NullWriter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/NullWriter.html new file mode 100644 index 0000000..f71956b --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/NullWriter.html @@ -0,0 +1,531 @@ + + + + + +public class NullWriter +extends Writer+
Writer
writes all data to the famous /dev/null.
+
+ This Writer
has no destination (file/socket etc.) and all
+ characters written to it are ignored and lost.
Modifier and Type | +Field and Description | +
---|---|
static NullWriter |
+NULL_WRITER
+A singleton.
+ |
+
Constructor and Description | +
---|
NullWriter()
+Constructs a new NullWriter.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
Writer |
+append(char c)
+Does nothing - output to
+/dev/null . |
+
Writer |
+append(CharSequence csq)
+Does nothing - output to
+/dev/null . |
+
Writer |
+append(CharSequence csq,
+ int start,
+ int end)
+Does nothing - output to
+/dev/null . |
+
void |
+close() |
+
void |
+flush() |
+
void |
+write(char[] chr)
+Does nothing - output to
+/dev/null . |
+
void |
+write(char[] chr,
+ int st,
+ int end)
+Does nothing - output to
+/dev/null . |
+
void |
+write(int idx)
+Does nothing - output to
+/dev/null . |
+
void |
+write(String str)
+Does nothing - output to
+/dev/null . |
+
void |
+write(String str,
+ int st,
+ int end)
+Does nothing - output to
+/dev/null . |
+
public static final NullWriter NULL_WRITER+
public NullWriter()+
public Writer append(char c)+
/dev/null
.append
in interface Appendable
append
in class Writer
c
- The character to writepublic Writer append(CharSequence csq, + int start, + int end)+
/dev/null
.append
in interface Appendable
append
in class Writer
csq
- The character sequence to writestart
- The index of the first character to writeend
- The index of the first character to write (exclusive)public Writer append(CharSequence csq)+
/dev/null
.append
in interface Appendable
append
in class Writer
csq
- The character sequence to writepublic void write(int idx)+
/dev/null
.public void write(char[] chr)+
/dev/null
.public void write(char[] chr, + int st, + int end)+
/dev/null
.public void write(String str)+
/dev/null
.public void write(String str, + int st, + int end)+
/dev/null
.public void flush()+
flush
in interface Flushable
flush
in class Writer
Writer.flush()
public void close()+
close
in interface Closeable
close
in interface AutoCloseable
close
in class Writer
Writer.close()
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/ProxyOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/ProxyOutputStream.html new file mode 100644 index 0000000..0d99df0 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/ProxyOutputStream.html @@ -0,0 +1,492 @@ + + + + + +public class ProxyOutputStream +extends FilterOutputStream+
+ See the protected methods for ways in which a subclass can easily decorate + a stream with custom pre-, post- or error processing functionality.
out
Constructor and Description | +
---|
ProxyOutputStream(OutputStream proxy)
+Constructs a new ProxyOutputStream.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+afterWrite(int n)
+Invoked by the write methods after the proxied call has returned
+ successfully.
+ |
+
protected void |
+beforeWrite(int n)
+Invoked by the write methods before the call is proxied.
+ |
+
void |
+close()
+Invokes the delegate's
+close() method. |
+
void |
+flush()
+Invokes the delegate's
+flush() method. |
+
protected void |
+handleIOException(IOException e)
+Handle any IOExceptions thrown.
+ |
+
void |
+write(byte[] bts)
+Invokes the delegate's
+write(byte[]) method. |
+
void |
+write(byte[] bts,
+ int st,
+ int end)
+Invokes the delegate's
+write(byte[]) method. |
+
void |
+write(int idx)
+Invokes the delegate's
+write(int) method. |
+
public ProxyOutputStream(OutputStream proxy)+
proxy
- the OutputStream to delegate topublic void write(int idx) + throws IOException+
write(int)
method.write
in class FilterOutputStream
idx
- the byte to writeIOException
- if an I/O error occurspublic void write(byte[] bts) + throws IOException+
write(byte[])
method.write
in class FilterOutputStream
bts
- the bytes to writeIOException
- if an I/O error occurspublic void write(byte[] bts, + int st, + int end) + throws IOException+
write(byte[])
method.write
in class FilterOutputStream
bts
- the bytes to writest
- The start offsetend
- The number of bytes to writeIOException
- if an I/O error occurspublic void flush() + throws IOException+
flush()
method.flush
in interface Flushable
flush
in class FilterOutputStream
IOException
- if an I/O error occurspublic void close() + throws IOException+
close()
method.close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterOutputStream
IOException
- if an I/O error occursprotected void beforeWrite(int n) + throws IOException+
write(int)
method, buffer
+ length for write(byte[])
, etc.) is given as an argument.
+ + Subclasses can override this method to add common pre-processing + functionality without having to override all the write methods. + The default implementation does nothing.
n
- number of bytes to be writtenIOException
- if the pre-processing failsprotected void afterWrite(int n) + throws IOException+
write(int)
method, buffer length for write(byte[])
,
+ etc.) is given as an argument.
+ + Subclasses can override this method to add common post-processing + functionality without having to override all the write methods. + The default implementation does nothing.
n
- number of bytes writtenIOException
- if the post-processing failsprotected void handleIOException(IOException e) + throws IOException+
+ This method provides a point to implement custom exception + handling. The default behaviour is to re-throw the exception.
e
- The IOException thrownIOException
- if an I/O error occursCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/ProxyWriter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/ProxyWriter.html new file mode 100644 index 0000000..bb12da7 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/ProxyWriter.html @@ -0,0 +1,629 @@ + + + + + +public class ProxyWriter +extends FilterWriter+
out
Constructor and Description | +
---|
ProxyWriter(Writer proxy)
+Constructs a new ProxyWriter.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+afterWrite(int n)
+Invoked by the write methods after the proxied call has returned
+ successfully.
+ |
+
Writer |
+append(char c)
+Invokes the delegate's
+append(char) method. |
+
Writer |
+append(CharSequence csq)
+Invokes the delegate's
+append(CharSequence) method. |
+
Writer |
+append(CharSequence csq,
+ int start,
+ int end)
+Invokes the delegate's
+append(CharSequence, int, int) method. |
+
protected void |
+beforeWrite(int n)
+Invoked by the write methods before the call is proxied.
+ |
+
void |
+close()
+Invokes the delegate's
+close() method. |
+
void |
+flush()
+Invokes the delegate's
+flush() method. |
+
protected void |
+handleIOException(IOException e)
+Handle any IOExceptions thrown.
+ |
+
void |
+write(char[] chr)
+Invokes the delegate's
+write(char[]) method. |
+
void |
+write(char[] chr,
+ int st,
+ int len)
+Invokes the delegate's
+write(char[], int, int) method. |
+
void |
+write(int idx)
+Invokes the delegate's
+write(int) method. |
+
void |
+write(String str)
+Invokes the delegate's
+write(String) method. |
+
void |
+write(String str,
+ int st,
+ int len)
+Invokes the delegate's
+write(String) method. |
+
public ProxyWriter(Writer proxy)+
proxy
- the Writer to delegate topublic Writer append(char c) + throws IOException+
append(char)
method.append
in interface Appendable
append
in class Writer
c
- The character to writeIOException
- if an I/O error occurspublic Writer append(CharSequence csq, + int start, + int end) + throws IOException+
append(CharSequence, int, int)
method.append
in interface Appendable
append
in class Writer
csq
- The character sequence to writestart
- The index of the first character to writeend
- The index of the first character to write (exclusive)IOException
- if an I/O error occurspublic Writer append(CharSequence csq) + throws IOException+
append(CharSequence)
method.append
in interface Appendable
append
in class Writer
csq
- The character sequence to writeIOException
- if an I/O error occurspublic void write(int idx) + throws IOException+
write(int)
method.write
in class FilterWriter
idx
- the character to writeIOException
- if an I/O error occurspublic void write(char[] chr) + throws IOException+
write(char[])
method.write
in class Writer
chr
- the characters to writeIOException
- if an I/O error occurspublic void write(char[] chr, + int st, + int len) + throws IOException+
write(char[], int, int)
method.write
in class FilterWriter
chr
- the characters to writest
- The start offsetlen
- The number of characters to writeIOException
- if an I/O error occurspublic void write(String str) + throws IOException+
write(String)
method.write
in class Writer
str
- the string to writeIOException
- if an I/O error occurspublic void write(String str, + int st, + int len) + throws IOException+
write(String)
method.write
in class FilterWriter
str
- the string to writest
- The start offsetlen
- The number of characters to writeIOException
- if an I/O error occurspublic void flush() + throws IOException+
flush()
method.flush
in interface Flushable
flush
in class FilterWriter
IOException
- if an I/O error occurspublic void close() + throws IOException+
close()
method.close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterWriter
IOException
- if an I/O error occursprotected void beforeWrite(int n) + throws IOException+
write(int)
method, buffer
+ length for write(char[])
, etc.) is given as an argument.
+ + Subclasses can override this method to add common pre-processing + functionality without having to override all the write methods. + The default implementation does nothing.
n
- number of chars to be writtenIOException
- if the pre-processing failsprotected void afterWrite(int n) + throws IOException+
write(int)
method, buffer length for write(char[])
,
+ etc.) is given as an argument.
+ + Subclasses can override this method to add common post-processing + functionality without having to override all the write methods. + The default implementation does nothing.
n
- number of chars writtenIOException
- if the post-processing failsprotected void handleIOException(IOException e) + throws IOException+
+ This method provides a point to implement custom exception + handling. The default behaviour is to re-throw the exception.
e
- The IOException thrownIOException
- if an I/O error occursCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/StringBuilderWriter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/StringBuilderWriter.html new file mode 100644 index 0000000..a0ebea0 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/StringBuilderWriter.html @@ -0,0 +1,524 @@ + + + + + +public class StringBuilderWriter +extends Writer +implements Serializable+
Writer
implementation that outputs to a StringBuilder
.
+
+ NOTE: This implementation, as an alternative to
+ java.io.StringWriter
, provides an un-synchronized
+ (i.e. for use in a single thread) implementation for better performance.
+ For safe usage with multiple Thread
s then
+ java.io.StringWriter
should be used.
Constructor and Description | +
---|
StringBuilderWriter()
+Constructs a new
+StringBuilder instance with default capacity. |
+
StringBuilderWriter(int capacity)
+Constructs a new
+StringBuilder instance with the specified capacity. |
+
StringBuilderWriter(StringBuilder builder)
+Constructs a new instance with the specified
+StringBuilder . |
+
Modifier and Type | +Method and Description | +
---|---|
Writer |
+append(char value)
+Appends a single character to this Writer.
+ |
+
Writer |
+append(CharSequence value)
+Appends a character sequence to this Writer.
+ |
+
Writer |
+append(CharSequence value,
+ int start,
+ int end)
+Appends a portion of a character sequence to the
+StringBuilder . |
+
void |
+close()
+Closing this writer has no effect.
+ |
+
void |
+flush()
+Flushing this writer has no effect.
+ |
+
StringBuilder |
+getBuilder()
+Returns the underlying builder.
+ |
+
String |
+toString()
+Returns
+StringBuilder.toString() . |
+
void |
+write(char[] value,
+ int offset,
+ int length)
+Writes a portion of a character array to the
+StringBuilder . |
+
void |
+write(String value)
+Writes a String to the
+StringBuilder . |
+
public StringBuilderWriter()+
StringBuilder
instance with default capacity.public StringBuilderWriter(int capacity)+
StringBuilder
instance with the specified capacity.capacity
- The initial capacity of the underlying StringBuilder
public StringBuilderWriter(StringBuilder builder)+
StringBuilder
.
+
+ If builder
is null a new instance with default capacity will be created.
builder
- The String builder. May be null.public Writer append(char value)+
append
in interface Appendable
append
in class Writer
value
- The character to appendpublic Writer append(CharSequence value)+
append
in interface Appendable
append
in class Writer
value
- The character to appendpublic Writer append(CharSequence value, + int start, + int end)+
StringBuilder
.append
in interface Appendable
append
in class Writer
value
- The character to appendstart
- The index of the first characterend
- The index of the last character + 1public void close()+
public void flush()+
public void write(String value)+
StringBuilder
.public void write(char[] value, + int offset, + int length)+
StringBuilder
.public StringBuilder getBuilder()+
public String toString()+
StringBuilder.toString()
.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/TaggedOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/TaggedOutputStream.html new file mode 100644 index 0000000..0d3b0b2 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/TaggedOutputStream.html @@ -0,0 +1,390 @@ + + + + + +public class TaggedOutputStream +extends ProxyOutputStream+
TaggedIOException
class to wrap all thrown
+ IOException
s. See below for an example of using this class.
+ + TaggedOutputStream stream = new TaggedOutputStream(...); + try { + // Processing that may throw an IOException either from this stream + // or from some other IO activity like temporary files, etc. + writeToStream(stream); + } catch (IOException e) { + if (stream.isCauseOf(e)) { + // The exception was caused by this stream. + // Use e.getCause() to get the original exception. + } else { + // The exception was caused by something else. + } + } ++
+ Alternatively, the throwIfCauseOf(Exception)
method can be
+ used to let higher levels of code handle the exception caused by this
+ stream while other processing errors are being taken care of at this
+ lower level.
+
+ TaggedOutputStream stream = new TaggedOutputStream(...); + try { + writeToStream(stream); + } catch (IOException e) { + stream.throwIfCauseOf(e); + // ... or process the exception that was caused by something else + } +
TaggedIOException
out
Constructor and Description | +
---|
TaggedOutputStream(OutputStream proxy)
+Creates a tagging decorator for the given output stream.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+handleIOException(IOException e)
+Tags any IOExceptions thrown, wrapping and re-throwing.
+ |
+
boolean |
+isCauseOf(Exception exception)
+Tests if the given exception was caused by this stream.
+ |
+
void |
+throwIfCauseOf(Exception exception)
+Re-throws the original exception thrown by this stream.
+ |
+
afterWrite, beforeWrite, close, flush, write, write, write
public TaggedOutputStream(OutputStream proxy)+
proxy
- output stream to be decoratedpublic boolean isCauseOf(Exception exception)+
exception
- an exceptiontrue
if the exception was thrown by this stream,
+ false
otherwisepublic void throwIfCauseOf(Exception exception) + throws IOException+
TaggedIOException
+ wrapper created by this decorator, and then unwraps and throws the
+ original wrapped exception. Returns normally if the exception was
+ not thrown by this stream.exception
- an exceptionIOException
- original exception, if any, thrown by this streamprotected void handleIOException(IOException e) + throws IOException+
handleIOException
in class ProxyOutputStream
e
- The IOException thrownIOException
- if an I/O error occursCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/TeeOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/TeeOutputStream.html new file mode 100644 index 0000000..f4a70a4 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/TeeOutputStream.html @@ -0,0 +1,454 @@ + + + + + +public class TeeOutputStream +extends ProxyOutputStream+
Modifier and Type | +Field and Description | +
---|---|
protected OutputStream |
+branch
+the second OutputStream to write to
+ |
+
out
Constructor and Description | +
---|
TeeOutputStream(OutputStream out,
+ OutputStream branch)
+Constructs a TeeOutputStream.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+close()
+Closes both output streams.
+ |
+
void |
+flush()
+Flushes both streams.
+ |
+
void |
+write(byte[] b)
+Write the bytes to both streams.
+ |
+
void |
+write(byte[] b,
+ int off,
+ int len)
+Write the specified bytes to both streams.
+ |
+
void |
+write(int b)
+Write a byte to both streams.
+ |
+
afterWrite, beforeWrite, handleIOException
protected OutputStream branch+
public TeeOutputStream(OutputStream out, + OutputStream branch)+
out
- the main OutputStreambranch
- the second OutputStreampublic void write(byte[] b) + throws IOException+
write
in class ProxyOutputStream
b
- the bytes to writeIOException
- if an I/O error occurspublic void write(byte[] b, + int off, + int len) + throws IOException+
write
in class ProxyOutputStream
b
- the bytes to writeoff
- The start offsetlen
- The number of bytes to writeIOException
- if an I/O error occurspublic void write(int b) + throws IOException+
write
in class ProxyOutputStream
b
- the byte to writeIOException
- if an I/O error occurspublic void flush() + throws IOException+
flush
in interface Flushable
flush
in class ProxyOutputStream
IOException
- if an I/O error occurspublic void close() + throws IOException+
close
in interface Closeable
close
in interface AutoCloseable
close
in class ProxyOutputStream
IOException
- if an I/O error occursCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/ThresholdingOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/ThresholdingOutputStream.html new file mode 100644 index 0000000..dd31578 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/ThresholdingOutputStream.html @@ -0,0 +1,566 @@ + + + + + +public abstract class ThresholdingOutputStream +extends OutputStream+
+ This class overrides all OutputStream
methods. However, these
+ overrides ultimately call the corresponding methods in the underlying output
+ stream implementation.
+
+ NOTE: This implementation may trigger the event before the threshold + is actually reached, since it triggers when a pending write operation would + cause the threshold to be exceeded.
Constructor and Description | +
---|
ThresholdingOutputStream(int threshold)
+Constructs an instance of this class which will trigger an event at the
+ specified threshold.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+checkThreshold(int count)
+Checks to see if writing the specified number of bytes would cause the
+ configured threshold to be exceeded.
+ |
+
void |
+close()
+Closes this output stream and releases any system resources associated
+ with this stream.
+ |
+
void |
+flush()
+Flushes this output stream and forces any buffered output bytes to be
+ written out.
+ |
+
long |
+getByteCount()
+Returns the number of bytes that have been written to this output stream.
+ |
+
protected abstract OutputStream |
+getStream()
+Returns the underlying output stream, to which the corresponding
+
+OutputStream methods in this class will ultimately delegate. |
+
int |
+getThreshold()
+Returns the threshold, in bytes, at which an event will be triggered.
+ |
+
boolean |
+isThresholdExceeded()
+Determines whether or not the configured threshold has been exceeded for
+ this output stream.
+ |
+
protected void |
+resetByteCount()
+Resets the byteCount to zero.
+ |
+
protected void |
+setByteCount(long count)
+Sets the byteCount to count.
+ |
+
protected abstract void |
+thresholdReached()
+Indicates that the configured threshold has been reached, and that a
+ subclass should take whatever action necessary on this event.
+ |
+
void |
+write(byte[] b)
+Writes
+b.length bytes from the specified byte array to this
+ output stream. |
+
void |
+write(byte[] b,
+ int off,
+ int len)
+Writes
+len bytes from the specified byte array starting at
+ offset off to this output stream. |
+
void |
+write(int b)
+Writes the specified byte to this output stream.
+ |
+
public ThresholdingOutputStream(int threshold)+
threshold
- The number of bytes at which to trigger an event.public void write(int b) + throws IOException+
write
in class OutputStream
b
- The byte to be written.IOException
- if an error occurs.public void write(byte[] b) + throws IOException+
b.length
bytes from the specified byte array to this
+ output stream.write
in class OutputStream
b
- The array of bytes to be written.IOException
- if an error occurs.public void write(byte[] b, + int off, + int len) + throws IOException+
len
bytes from the specified byte array starting at
+ offset off
to this output stream.write
in class OutputStream
b
- The byte array from which the data will be written.off
- The start offset in the byte array.len
- The number of bytes to write.IOException
- if an error occurs.public void flush() + throws IOException+
flush
in interface Flushable
flush
in class OutputStream
IOException
- if an error occurs.public void close() + throws IOException+
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
- if an error occurs.public int getThreshold()+
public long getByteCount()+
public boolean isThresholdExceeded()+
true
if the threshold has been reached;
+ false
otherwise.protected void checkThreshold(int count) + throws IOException+
count
- The number of bytes about to be written to the underlying
+ output stream.IOException
- if an error occurs.protected void resetByteCount()+
thresholdReached()
if you want the event to be triggered again.protected void setByteCount(long count)+
count
- The number of bytes that have already been written to the
+ output streamprotected abstract OutputStream getStream() + throws IOException+
OutputStream
methods in this class will ultimately delegate.IOException
- if an error occurs.protected abstract void thresholdReached() + throws IOException+
IOException
- if an error occurs.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/WriterOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/WriterOutputStream.html new file mode 100644 index 0000000..37f0713 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/WriterOutputStream.html @@ -0,0 +1,573 @@ + + + + + +public class WriterOutputStream +extends OutputStream+
OutputStream
implementation that transforms a byte stream to a
+ character stream using a specified charset encoding and writes the resulting
+ stream to a Writer
. The stream is transformed using a
+ CharsetDecoder
object, guaranteeing that all charset
+ encodings supported by the JRE are handled correctly.
+
+ The output of the CharsetDecoder
is buffered using a fixed size buffer.
+ This implies that the data is written to the underlying Writer
in chunks
+ that are no larger than the size of this buffer. By default, the buffer is
+ flushed only when it overflows or when flush()
or close()
+ is called. In general there is therefore no need to wrap the underlying Writer
+ in a BufferedWriter
. WriterOutputStream
can also
+ be instructed to flush the buffer after each write operation. In this case, all
+ available data is written immediately to the underlying Writer
, implying that
+ the current position of the Writer
is correlated to the current position
+ of the WriterOutputStream
.
+
+ WriterOutputStream
implements the inverse transformation of OutputStreamWriter
;
+ in the following example, writing to out2
would have the same result as writing to
+ out
directly (provided that the byte sequence is legal with respect to the
+ charset encoding):
+
+ OutputStream out = ... + Charset cs = ... + OutputStreamWriter writer = new OutputStreamWriter(out, cs); + WriterOutputStream out2 = new WriterOutputStream(writer, cs);+
WriterOutputStream
implements the same transformation as InputStreamReader
,
+ except that the control flow is reversed: both classes transform a byte stream
+ into a character stream, but InputStreamReader
pulls data from the underlying stream,
+ while WriterOutputStream
pushes it to the underlying stream.
+
+ Note that while there are use cases where there is no alternative to using
+ this class, very often the need to use this class is an indication of a flaw
+ in the design of the code. This class is typically used in situations where an existing
+ API only accepts an OutputStream
object, but where the stream is known to represent
+ character data that must be decoded for further use.
+
+ Instances of WriterOutputStream
are not thread safe.
ReaderInputStream
Constructor and Description | +
---|
WriterOutputStream(Writer writer)
+Deprecated.
+
+2.5 use
+WriterOutputStream(Writer, Charset) instead |
+
WriterOutputStream(Writer writer,
+ Charset charset)
+Constructs a new
+WriterOutputStream with a default output buffer size of
+ 1024 characters. |
+
WriterOutputStream(Writer writer,
+ CharsetDecoder decoder)
+Constructs a new
+WriterOutputStream with a default output buffer size of
+ 1024 characters. |
+
WriterOutputStream(Writer writer,
+ CharsetDecoder decoder,
+ int bufferSize,
+ boolean writeImmediately)
+Constructs a new
+WriterOutputStream . |
+
WriterOutputStream(Writer writer,
+ Charset charset,
+ int bufferSize,
+ boolean writeImmediately)
+Constructs a new
+WriterOutputStream . |
+
WriterOutputStream(Writer writer,
+ String charsetName)
+Constructs a new
+WriterOutputStream with a default output buffer size of
+ 1024 characters. |
+
WriterOutputStream(Writer writer,
+ String charsetName,
+ int bufferSize,
+ boolean writeImmediately)
+Constructs a new
+WriterOutputStream . |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+close()
+Close the stream.
+ |
+
void |
+flush()
+Flush the stream.
+ |
+
void |
+write(byte[] b)
+Write bytes from the specified byte array to the stream.
+ |
+
void |
+write(byte[] b,
+ int off,
+ int len)
+Write bytes from the specified byte array to the stream.
+ |
+
void |
+write(int b)
+Write a single byte to the stream.
+ |
+
public WriterOutputStream(Writer writer, + CharsetDecoder decoder)+
WriterOutputStream
with a default output buffer size of
+ 1024 characters. The output buffer will only be flushed when it overflows or when
+ flush()
or close()
is called.writer
- the target Writer
decoder
- the charset decoderpublic WriterOutputStream(Writer writer, + CharsetDecoder decoder, + int bufferSize, + boolean writeImmediately)+
WriterOutputStream
.writer
- the target Writer
decoder
- the charset decoderbufferSize
- the size of the output buffer in number of characterswriteImmediately
- If true
the output buffer will be flushed after each
+ write operation, i.e. all available data will be written to the
+ underlying Writer
immediately. If false
, the
+ output buffer will only be flushed when it overflows or when
+ flush()
or close()
is called.public WriterOutputStream(Writer writer, + Charset charset, + int bufferSize, + boolean writeImmediately)+
WriterOutputStream
.writer
- the target Writer
charset
- the charset encodingbufferSize
- the size of the output buffer in number of characterswriteImmediately
- If true
the output buffer will be flushed after each
+ write operation, i.e. all available data will be written to the
+ underlying Writer
immediately. If false
, the
+ output buffer will only be flushed when it overflows or when
+ flush()
or close()
is called.public WriterOutputStream(Writer writer, + Charset charset)+
WriterOutputStream
with a default output buffer size of
+ 1024 characters. The output buffer will only be flushed when it overflows or when
+ flush()
or close()
is called.writer
- the target Writer
charset
- the charset encodingpublic WriterOutputStream(Writer writer, + String charsetName, + int bufferSize, + boolean writeImmediately)+
WriterOutputStream
.writer
- the target Writer
charsetName
- the name of the charset encodingbufferSize
- the size of the output buffer in number of characterswriteImmediately
- If true
the output buffer will be flushed after each
+ write operation, i.e. all available data will be written to the
+ underlying Writer
immediately. If false
, the
+ output buffer will only be flushed when it overflows or when
+ flush()
or close()
is called.public WriterOutputStream(Writer writer, + String charsetName)+
WriterOutputStream
with a default output buffer size of
+ 1024 characters. The output buffer will only be flushed when it overflows or when
+ flush()
or close()
is called.writer
- the target Writer
charsetName
- the name of the charset encoding@Deprecated +public WriterOutputStream(Writer writer)+
WriterOutputStream(Writer, Charset)
insteadWriterOutputStream
that uses the default character encoding
+ and with a default output buffer size of 1024 characters. The output buffer will only
+ be flushed when it overflows or when flush()
or close()
is called.writer
- the target Writer
public void write(byte[] b, + int off, + int len) + throws IOException+
write
in class OutputStream
b
- the byte array containing the bytes to writeoff
- the start offset in the byte arraylen
- the number of bytes to writeIOException
- if an I/O error occurspublic void write(byte[] b) + throws IOException+
write
in class OutputStream
b
- the byte array containing the bytes to writeIOException
- if an I/O error occurspublic void write(int b) + throws IOException+
write
in class OutputStream
b
- the byte to writeIOException
- if an I/O error occurspublic void flush() + throws IOException+
Writer
. After that
+ Writer.flush()
will be called.flush
in interface Flushable
flush
in class OutputStream
IOException
- if an I/O error occurspublic void close() + throws IOException+
Writer
. After that
+ Writer.close()
will be called.close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
- if an I/O error occursCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/XmlStreamWriter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/XmlStreamWriter.html new file mode 100644 index 0000000..ae2faac --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/XmlStreamWriter.html @@ -0,0 +1,464 @@ + + + + + +public class XmlStreamWriter +extends Writer+
XmlStreamReader
Constructor and Description | +
---|
XmlStreamWriter(File file)
+Construct an new XML stream writer for the specified file
+ with a default encoding of UTF-8.
+ |
+
XmlStreamWriter(File file,
+ String defaultEncoding)
+Construct an new XML stream writer for the specified file
+ with the specified default encoding.
+ |
+
XmlStreamWriter(OutputStream out)
+Construct an new XML stream writer for the specified output stream
+ with a default encoding of UTF-8.
+ |
+
XmlStreamWriter(OutputStream out,
+ String defaultEncoding)
+Construct an new XML stream writer for the specified output stream
+ with the specified default encoding.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+close()
+Close the underlying writer.
+ |
+
void |
+flush()
+Flush the underlying writer.
+ |
+
String |
+getDefaultEncoding()
+Return the default encoding.
+ |
+
String |
+getEncoding()
+Return the detected encoding.
+ |
+
void |
+write(char[] cbuf,
+ int off,
+ int len)
+Write the characters to the underlying writer, detecing encoding.
+ |
+
public XmlStreamWriter(OutputStream out)+
out
- The output streampublic XmlStreamWriter(OutputStream out, + String defaultEncoding)+
out
- The output streamdefaultEncoding
- The default encoding if not encoding could be detectedpublic XmlStreamWriter(File file) + throws FileNotFoundException+
file
- The file to write toFileNotFoundException
- if there is an error creating or
+ opening the filepublic XmlStreamWriter(File file, + String defaultEncoding) + throws FileNotFoundException+
file
- The file to write todefaultEncoding
- The default encoding if not encoding could be detectedFileNotFoundException
- if there is an error creating or
+ opening the filepublic String getEncoding()+
public String getDefaultEncoding()+
public void close() + throws IOException+
close
in interface Closeable
close
in interface AutoCloseable
close
in class Writer
IOException
- if an error occurs closing the underlying writerpublic void flush() + throws IOException+
flush
in interface Flushable
flush
in class Writer
IOException
- if an error occurs flushing the underlying writerpublic void write(char[] cbuf, + int off, + int len) + throws IOException+
write
in class Writer
cbuf
- the buffer to write the characters fromoff
- The start offsetlen
- The number of characters to writeIOException
- if an error occurs detecting the encodingCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/AppendableOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/AppendableOutputStream.html new file mode 100644 index 0000000..9f09f73 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/AppendableOutputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/BrokenOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/BrokenOutputStream.html new file mode 100644 index 0000000..97d04af --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/BrokenOutputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/ByteArrayOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/ByteArrayOutputStream.html new file mode 100644 index 0000000..7a028b5 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/ByteArrayOutputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/ChunkedOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/ChunkedOutputStream.html new file mode 100644 index 0000000..9095654 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/ChunkedOutputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/ChunkedWriter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/ChunkedWriter.html new file mode 100644 index 0000000..21d3311 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/ChunkedWriter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/CloseShieldOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/CloseShieldOutputStream.html new file mode 100644 index 0000000..00afc5a --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/CloseShieldOutputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/ClosedOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/ClosedOutputStream.html new file mode 100644 index 0000000..b473359 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/ClosedOutputStream.html @@ -0,0 +1,161 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io.output | +
+
+This package provides implementations of output classes, such as
+
+OutputStream and Writer . |
+
Modifier and Type | +Field and Description | +
---|---|
static ClosedOutputStream |
+ClosedOutputStream.CLOSED_OUTPUT_STREAM
+A singleton.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/CountingOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/CountingOutputStream.html new file mode 100644 index 0000000..50edf43 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/CountingOutputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/DeferredFileOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/DeferredFileOutputStream.html new file mode 100644 index 0000000..a1d2fd9 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/DeferredFileOutputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/DemuxOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/DemuxOutputStream.html new file mode 100644 index 0000000..ff9ba7d --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/DemuxOutputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/FileWriterWithEncoding.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/FileWriterWithEncoding.html new file mode 100644 index 0000000..83c3cb4 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/FileWriterWithEncoding.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/LockableFileWriter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/LockableFileWriter.html new file mode 100644 index 0000000..70a2fba --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/LockableFileWriter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/NullOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/NullOutputStream.html new file mode 100644 index 0000000..f7d494b --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/NullOutputStream.html @@ -0,0 +1,161 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io.output | +
+
+This package provides implementations of output classes, such as
+
+OutputStream and Writer . |
+
Modifier and Type | +Field and Description | +
---|---|
static NullOutputStream |
+NullOutputStream.NULL_OUTPUT_STREAM
+A singleton.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/NullWriter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/NullWriter.html new file mode 100644 index 0000000..b2c8c05 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/NullWriter.html @@ -0,0 +1,161 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io.output | +
+
+This package provides implementations of output classes, such as
+
+OutputStream and Writer . |
+
Modifier and Type | +Field and Description | +
---|---|
static NullWriter |
+NullWriter.NULL_WRITER
+A singleton.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/ProxyOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/ProxyOutputStream.html new file mode 100644 index 0000000..d45de06 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/ProxyOutputStream.html @@ -0,0 +1,181 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io.output | +
+
+This package provides implementations of output classes, such as
+
+OutputStream and Writer . |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+CloseShieldOutputStream
+Proxy stream that prevents the underlying output stream from being closed.
+ |
+
class |
+CountingOutputStream
+A decorating output stream that counts the number of bytes that have passed
+ through the stream so far.
+ |
+
class |
+TaggedOutputStream
+An output stream decorator that tags potential exceptions so that the
+ stream that caused the exception can easily be identified.
+ |
+
class |
+TeeOutputStream
+Classic splitter of OutputStream.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/ProxyWriter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/ProxyWriter.html new file mode 100644 index 0000000..20707c7 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/ProxyWriter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/StringBuilderWriter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/StringBuilderWriter.html new file mode 100644 index 0000000..df2bb74 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/StringBuilderWriter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/TaggedOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/TaggedOutputStream.html new file mode 100644 index 0000000..a55c5d9 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/TaggedOutputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/TeeOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/TeeOutputStream.html new file mode 100644 index 0000000..850cbfd --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/TeeOutputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/ThresholdingOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/ThresholdingOutputStream.html new file mode 100644 index 0000000..8a06407 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/ThresholdingOutputStream.html @@ -0,0 +1,162 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io.output | +
+
+This package provides implementations of output classes, such as
+
+OutputStream and Writer . |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+DeferredFileOutputStream
+An output stream which will retain data in memory until a specified
+ threshold is reached, and only then commit it to disk.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/WriterOutputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/WriterOutputStream.html new file mode 100644 index 0000000..be25656 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/WriterOutputStream.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/XmlStreamWriter.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/XmlStreamWriter.html new file mode 100644 index 0000000..f1f260e --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/class-use/XmlStreamWriter.html @@ -0,0 +1,115 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/package-frame.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/package-frame.html new file mode 100644 index 0000000..6c5a4c2 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/package-frame.html @@ -0,0 +1,39 @@ + + + + + +OutputStream
and Writer
.See: Description
+Class | +Description | +
---|---|
AppendableOutputStream<T extends Appendable> | +
+ OutputStream implementation that writes the data to an
+Appendable
+ Object. |
+
BrokenOutputStream | +
+ Broken output stream.
+ |
+
ByteArrayOutputStream | +
+ This class implements an output stream in which the data is
+ written into a byte array.
+ |
+
ChunkedOutputStream | +
+ OutputStream which breaks larger output blocks into chunks.
+ |
+
ChunkedWriter | +
+ Writer which breaks larger output blocks into chunks.
+ |
+
ClosedOutputStream | +
+ Closed output stream.
+ |
+
CloseShieldOutputStream | +
+ Proxy stream that prevents the underlying output stream from being closed.
+ |
+
CountingOutputStream | +
+ A decorating output stream that counts the number of bytes that have passed
+ through the stream so far.
+ |
+
DeferredFileOutputStream | +
+ An output stream which will retain data in memory until a specified
+ threshold is reached, and only then commit it to disk.
+ |
+
DemuxOutputStream | +
+ Forwards data to a stream that has been associated with this thread.
+ |
+
FileWriterWithEncoding | +
+ Writer of files that allows the encoding to be set.
+ |
+
LockableFileWriter | +
+ FileWriter that will create and honor lock files to allow simple
+ cross thread file lock handling.
+ |
+
NullOutputStream | +
+ This OutputStream writes all data to the famous /dev/null.
+ |
+
NullWriter | +
+ This
+Writer writes all data to the famous /dev/null. |
+
ProxyOutputStream | +
+ A Proxy stream which acts as expected, that is it passes the method
+ calls on to the proxied stream and doesn't change which methods are
+ being called.
+ |
+
ProxyWriter | +
+ A Proxy stream which acts as expected, that is it passes the method
+ calls on to the proxied stream and doesn't change which methods are
+ being called.
+ |
+
StringBuilderWriter | +
+Writer implementation that outputs to a StringBuilder . |
+
TaggedOutputStream | +
+ An output stream decorator that tags potential exceptions so that the
+ stream that caused the exception can easily be identified.
+ |
+
TeeOutputStream | +
+ Classic splitter of OutputStream.
+ |
+
ThresholdingOutputStream | +
+ An output stream which triggers an event when a specified number of bytes of
+ data have been written to it.
+ |
+
WriterOutputStream | +
+OutputStream implementation that transforms a byte stream to a
+ character stream using a specified charset encoding and writes the resulting
+ stream to a Writer . |
+
XmlStreamWriter | +
+ Character stream that handles all the necessary Voodo to figure out the
+ charset encoding of the XML document written to the stream.
+ |
+
+This package provides implementations of output classes, such as
+OutputStream
and Writer
.
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/package-tree.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/package-tree.html new file mode 100644 index 0000000..91f5230 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/package-tree.html @@ -0,0 +1,171 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/package-use.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/package-use.html new file mode 100644 index 0000000..86907aa --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/output/package-use.html @@ -0,0 +1,177 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io.output | +
+
+This package provides implementations of output classes, such as
+
+OutputStream and Writer . |
+
Class and Description | +
---|
ClosedOutputStream
+ Closed output stream.
+ |
+
NullOutputStream
+ This OutputStream writes all data to the famous /dev/null.
+ |
+
NullWriter
+ This
+Writer writes all data to the famous /dev/null. |
+
ProxyOutputStream
+ A Proxy stream which acts as expected, that is it passes the method
+ calls on to the proxied stream and doesn't change which methods are
+ being called.
+ |
+
ThresholdingOutputStream
+ An output stream which triggers an event when a specified number of bytes of
+ data have been written to it.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/package-frame.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/package-frame.html new file mode 100644 index 0000000..6ea3e18 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/package-frame.html @@ -0,0 +1,42 @@ + + + + + +See: Description
+Class | +Description | +
---|---|
ByteOrderMark | +
+ Byte Order Mark (BOM) representation - see
+BOMInputStream . |
+
Charsets | +
+ Charsets required of every implementation of the Java platform.
+ |
+
CopyUtils | +Deprecated
+ Use IOUtils.
+ |
+
DirectoryWalker<T> | +
+ Abstract class that walks through a directory hierarchy and provides
+ subclasses with convenient hooks to add specific behaviour.
+ |
+
EndianUtils | +
+ Utility code for dealing with different endian systems.
+ |
+
FileCleaner | +Deprecated + + | +
FileCleaningTracker | +
+ Keeps track of files awaiting deletion, and deletes them when an associated
+ marker object is reclaimed by the garbage collector.
+ |
+
FileDeleteStrategy | +
+ Strategy for deleting files.
+ |
+
FilenameUtils | +
+ General filename and filepath manipulation utilities.
+ |
+
FileSystemUtils | +
+ General File System utilities.
+ |
+
FileUtils | +
+ General file manipulation utilities.
+ |
+
HexDump | +
+ Dumps data in hexadecimal format.
+ |
+
IOUtils | +
+ General IO stream manipulation utilities.
+ |
+
LineIterator | +
+ An Iterator over the lines in a
+Reader . |
+
Enum | +Description | +
---|---|
IOCase | +
+ Enumeration of IO case sensitivity.
+ |
+
Exception | +Description | +
---|---|
DirectoryWalker.CancelException | +
+ CancelException is thrown in DirectoryWalker to cancel the current
+ processing.
+ |
+
FileExistsException | +
+ Indicates that a file already exists.
+ |
+
IOExceptionWithCause | +Deprecated
+ (since 2.5) use
+IOException instead |
+
TaggedIOException | +
+ An
+IOException decorator that adds a serializable tag to the
+ wrapped exception. |
+
+This package defines utility classes for working with streams, readers, +writers and files. The most commonly used classes are described here: +
++IOUtils is the most frequently used class. +It provides operations to read, write, copy and close streams. +
++FileUtils provides operations based around the JDK File class. +These include reading, writing, copying, comparing and deleting. +
++FilenameUtils provides utilities based on filenames. +This utility class manipulates filenames without using File objects. +It aims to simplify the transition between Windows and Unix. +Before using this class however, you should consider whether you should +be using File objects. +
++FileSystemUtils allows access to the filing system in ways the JDK +does not support. At present this allows you to get the free space on a drive. +
++EndianUtils swaps data between Big-Endian and Little-Endian formats. +
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/package-tree.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/package-tree.html new file mode 100644 index 0000000..6215d52 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/package-tree.html @@ -0,0 +1,172 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/package-use.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/package-use.html new file mode 100644 index 0000000..8f29ded --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/package-use.html @@ -0,0 +1,286 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io | +
+
+This package defines utility classes for working with streams, readers,
+writers and files.
+ |
+
org.apache.commons.io.comparator | +
+ This package provides various
+Comparator implementations
+for File s. |
+
org.apache.commons.io.filefilter | +
+ This package defines an interface (IOFileFilter) that combines both
+
+FileFilter and FilenameFilter . |
+
org.apache.commons.io.input | +
+
+This package provides implementations of input classes, such as
+
+InputStream and Reader . |
+
org.apache.commons.io.monitor | +
+
+This package provides a component for monitoring file system events
+(directory and file create, update and delete events).
+ |
+
Class and Description | +
---|
ByteOrderMark
+ Byte Order Mark (BOM) representation - see
+BOMInputStream . |
+
DirectoryWalker.CancelException
+ CancelException is thrown in DirectoryWalker to cancel the current
+ processing.
+ |
+
FileCleaningTracker
+ Keeps track of files awaiting deletion, and deletes them when an associated
+ marker object is reclaimed by the garbage collector.
+ |
+
FileDeleteStrategy
+ Strategy for deleting files.
+ |
+
IOCase
+ Enumeration of IO case sensitivity.
+ |
+
IOExceptionWithCause
+ Deprecated.
+
+(since 2.5) use
+IOException instead |
+
LineIterator
+ An Iterator over the lines in a
+Reader . |
+
Class and Description | +
---|
IOCase
+ Enumeration of IO case sensitivity.
+ |
+
Class and Description | +
---|
IOCase
+ Enumeration of IO case sensitivity.
+ |
+
Class and Description | +
---|
ByteOrderMark
+ Byte Order Mark (BOM) representation - see
+BOMInputStream . |
+
Class and Description | +
---|
IOCase
+ Enumeration of IO case sensitivity.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/serialization/ClassNameMatcher.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/serialization/ClassNameMatcher.html new file mode 100644 index 0000000..adb4f6c --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/serialization/ClassNameMatcher.html @@ -0,0 +1,212 @@ + + + + + +public interface ClassNameMatcher
+Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/serialization/ValidatingObjectInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/serialization/ValidatingObjectInputStream.html new file mode 100644 index 0000000..22801f4 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/serialization/ValidatingObjectInputStream.html @@ -0,0 +1,537 @@ + + + + + +public class ValidatingObjectInputStream +extends ObjectInputStream+
ObjectInputStream
that's restricted to deserialize
+ a limited set of classes.
+
+ + Various accept/reject methods allow for specifying which classes + can be deserialized. +
+ ++ Design inspired by IBM + DeveloperWorks Article. +
ObjectInputStream.GetField
baseWireHandle, PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, SC_BLOCK_DATA, SC_ENUM, SC_EXTERNALIZABLE, SC_SERIALIZABLE, SC_WRITE_METHOD, STREAM_MAGIC, STREAM_VERSION, SUBCLASS_IMPLEMENTATION_PERMISSION, SUBSTITUTION_PERMISSION, TC_ARRAY, TC_BASE, TC_BLOCKDATA, TC_BLOCKDATALONG, TC_CLASS, TC_CLASSDESC, TC_ENDBLOCKDATA, TC_ENUM, TC_EXCEPTION, TC_LONGSTRING, TC_MAX, TC_NULL, TC_OBJECT, TC_PROXYCLASSDESC, TC_REFERENCE, TC_RESET, TC_STRING
Constructor and Description | +
---|
ValidatingObjectInputStream(InputStream input)
+Constructs an object to deserialize the specified input stream.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
ValidatingObjectInputStream |
+accept(Class<?>... classes)
+Accept the specified classes for deserialization, unless they
+ are otherwise rejected.
+ |
+
ValidatingObjectInputStream |
+accept(ClassNameMatcher m)
+Accept class names where the supplied ClassNameMatcher matches for
+ deserialization, unless they are otherwise rejected.
+ |
+
ValidatingObjectInputStream |
+accept(Pattern pattern)
+Accept class names that match the supplied pattern for
+ deserialization, unless they are otherwise rejected.
+ |
+
ValidatingObjectInputStream |
+accept(String... patterns)
+Accept the wildcard specified classes for deserialization,
+ unless they are otherwise rejected.
+ |
+
protected void |
+invalidClassNameFound(String className)
+Called to throw
+InvalidClassException if an invalid
+ class name is found during deserialization. |
+
ValidatingObjectInputStream |
+reject(Class<?>... classes)
+Reject the specified classes for deserialization, even if they
+ are otherwise accepted.
+ |
+
ValidatingObjectInputStream |
+reject(ClassNameMatcher m)
+Reject class names where the supplied ClassNameMatcher matches for
+ deserialization, even if they are otherwise accepted.
+ |
+
ValidatingObjectInputStream |
+reject(Pattern pattern)
+Reject class names that match the supplied pattern for
+ deserialization, even if they are otherwise accepted.
+ |
+
ValidatingObjectInputStream |
+reject(String... patterns)
+Reject the wildcard specified classes for deserialization,
+ even if they are otherwise accepted.
+ |
+
protected Class<?> |
+resolveClass(ObjectStreamClass osc) |
+
available, close, defaultReadObject, enableResolveObject, read, read, readBoolean, readByte, readChar, readClassDescriptor, readDouble, readFields, readFloat, readFully, readFully, readInt, readLine, readLong, readObject, readObjectOverride, readShort, readStreamHeader, readUnshared, readUnsignedByte, readUnsignedShort, readUTF, registerValidation, resolveObject, resolveProxyClass, skipBytes
mark, markSupported, read, reset, skip
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
read, skip
public ValidatingObjectInputStream(InputStream input) + throws IOException+
input
- an input streamIOException
- if an I/O error occurs while reading stream headerprotected void invalidClassNameFound(String className) + throws InvalidClassException+
InvalidClassException
if an invalid
+ class name is found during deserialization. Can be overridden, for example
+ to log those class names.className
- name of the invalid classInvalidClassException
- if the specified class is not allowedprotected Class<?> resolveClass(ObjectStreamClass osc) + throws IOException, + ClassNotFoundException+
resolveClass
in class ObjectInputStream
IOException
ClassNotFoundException
public ValidatingObjectInputStream accept(Class<?>... classes)+
classes
- Classes to acceptpublic ValidatingObjectInputStream reject(Class<?>... classes)+
classes
- Classes to rejectpublic ValidatingObjectInputStream accept(String... patterns)+
patterns
- Wildcard filename patterns as defined by
+ FilenameUtils.wildcardMatch
public ValidatingObjectInputStream reject(String... patterns)+
patterns
- Wildcard filename patterns as defined by
+ FilenameUtils.wildcardMatch
public ValidatingObjectInputStream accept(Pattern pattern)+
pattern
- standard Java regexppublic ValidatingObjectInputStream reject(Pattern pattern)+
pattern
- standard Java regexppublic ValidatingObjectInputStream accept(ClassNameMatcher m)+
m
- the matcher to usepublic ValidatingObjectInputStream reject(ClassNameMatcher m)+
m
- the matcher to useCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/serialization/class-use/ClassNameMatcher.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/serialization/class-use/ClassNameMatcher.html new file mode 100644 index 0000000..1eed0bf --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/serialization/class-use/ClassNameMatcher.html @@ -0,0 +1,168 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io.serialization | +
+
+This package provides a framework for controlling the deserialization of classes.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
ValidatingObjectInputStream |
+ValidatingObjectInputStream.accept(ClassNameMatcher m)
+Accept class names where the supplied ClassNameMatcher matches for
+ deserialization, unless they are otherwise rejected.
+ |
+
ValidatingObjectInputStream |
+ValidatingObjectInputStream.reject(ClassNameMatcher m)
+Reject class names where the supplied ClassNameMatcher matches for
+ deserialization, even if they are otherwise accepted.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/serialization/class-use/ValidatingObjectInputStream.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/serialization/class-use/ValidatingObjectInputStream.html new file mode 100644 index 0000000..167ea28 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/serialization/class-use/ValidatingObjectInputStream.html @@ -0,0 +1,210 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io.serialization | +
+
+This package provides a framework for controlling the deserialization of classes.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
ValidatingObjectInputStream |
+ValidatingObjectInputStream.accept(Class<?>... classes)
+Accept the specified classes for deserialization, unless they
+ are otherwise rejected.
+ |
+
ValidatingObjectInputStream |
+ValidatingObjectInputStream.accept(ClassNameMatcher m)
+Accept class names where the supplied ClassNameMatcher matches for
+ deserialization, unless they are otherwise rejected.
+ |
+
ValidatingObjectInputStream |
+ValidatingObjectInputStream.accept(Pattern pattern)
+Accept class names that match the supplied pattern for
+ deserialization, unless they are otherwise rejected.
+ |
+
ValidatingObjectInputStream |
+ValidatingObjectInputStream.accept(String... patterns)
+Accept the wildcard specified classes for deserialization,
+ unless they are otherwise rejected.
+ |
+
ValidatingObjectInputStream |
+ValidatingObjectInputStream.reject(Class<?>... classes)
+Reject the specified classes for deserialization, even if they
+ are otherwise accepted.
+ |
+
ValidatingObjectInputStream |
+ValidatingObjectInputStream.reject(ClassNameMatcher m)
+Reject class names where the supplied ClassNameMatcher matches for
+ deserialization, even if they are otherwise accepted.
+ |
+
ValidatingObjectInputStream |
+ValidatingObjectInputStream.reject(Pattern pattern)
+Reject class names that match the supplied pattern for
+ deserialization, even if they are otherwise accepted.
+ |
+
ValidatingObjectInputStream |
+ValidatingObjectInputStream.reject(String... patterns)
+Reject the wildcard specified classes for deserialization,
+ even if they are otherwise accepted.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/serialization/package-frame.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/serialization/package-frame.html new file mode 100644 index 0000000..153475a --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/serialization/package-frame.html @@ -0,0 +1,22 @@ + + + + + +See: Description
+Interface | +Description | +
---|---|
ClassNameMatcher | +
+ An object that matches a Class name to a condition.
+ |
+
Class | +Description | +
---|---|
ValidatingObjectInputStream | +
+ An
+ObjectInputStream that's restricted to deserialize
+ a limited set of classes. |
+
+This package provides a framework for controlling the deserialization of classes. +
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/serialization/package-tree.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/serialization/package-tree.html new file mode 100644 index 0000000..3ec4239 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/serialization/package-tree.html @@ -0,0 +1,140 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/org/apache/commons/io/serialization/package-use.html b/docs/licenses/Apache Commons/docs/org/apache/commons/io/serialization/package-use.html new file mode 100644 index 0000000..b4bb2e3 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/org/apache/commons/io/serialization/package-use.html @@ -0,0 +1,159 @@ + + + + + +Package | +Description | +
---|---|
org.apache.commons.io.serialization | +
+
+This package provides a framework for controlling the deserialization of classes.
+ |
+
Class and Description | +
---|
ClassNameMatcher
+ An object that matches a Class name to a condition.
+ |
+
ValidatingObjectInputStream
+ An
+ObjectInputStream that's restricted to deserialize
+ a limited set of classes. |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/overview-frame.html b/docs/licenses/Apache Commons/docs/overview-frame.html new file mode 100644 index 0000000..a83a177 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/overview-frame.html @@ -0,0 +1,25 @@ + + + + + ++ + diff --git a/docs/licenses/Apache Commons/docs/overview-summary.html b/docs/licenses/Apache Commons/docs/overview-summary.html new file mode 100644 index 0000000..e98ab32 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/overview-summary.html @@ -0,0 +1,178 @@ + + + + + +
Package | +Description | +
---|---|
org.apache.commons.io | +
+
+This package defines utility classes for working with streams, readers,
+writers and files.
+ |
+
org.apache.commons.io.comparator | +
+ This package provides various
+Comparator implementations
+for File s. |
+
org.apache.commons.io.filefilter | +
+ This package defines an interface (IOFileFilter) that combines both
+
+FileFilter and FilenameFilter . |
+
org.apache.commons.io.input | +
+
+This package provides implementations of input classes, such as
+
+InputStream and Reader . |
+
org.apache.commons.io.monitor | +
+
+This package provides a component for monitoring file system events
+(directory and file create, update and delete events).
+ |
+
org.apache.commons.io.output | +
+
+This package provides implementations of output classes, such as
+
+OutputStream and Writer . |
+
org.apache.commons.io.serialization | +
+
+This package provides a framework for controlling the deserialization of classes.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/overview-tree.html b/docs/licenses/Apache Commons/docs/overview-tree.html new file mode 100644 index 0000000..fa85417 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/overview-tree.html @@ -0,0 +1,328 @@ + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/package-list b/docs/licenses/Apache Commons/docs/package-list new file mode 100644 index 0000000..48871b7 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/package-list @@ -0,0 +1,7 @@ +org.apache.commons.io +org.apache.commons.io.comparator +org.apache.commons.io.filefilter +org.apache.commons.io.input +org.apache.commons.io.monitor +org.apache.commons.io.output +org.apache.commons.io.serialization diff --git a/docs/licenses/Apache Commons/docs/resources/background.gif b/docs/licenses/Apache Commons/docs/resources/background.gif new file mode 100644 index 0000000..f471940 Binary files /dev/null and b/docs/licenses/Apache Commons/docs/resources/background.gif differ diff --git a/docs/licenses/Apache Commons/docs/resources/tab.gif b/docs/licenses/Apache Commons/docs/resources/tab.gif new file mode 100644 index 0000000..1a73a83 Binary files /dev/null and b/docs/licenses/Apache Commons/docs/resources/tab.gif differ diff --git a/docs/licenses/Apache Commons/docs/resources/titlebar.gif b/docs/licenses/Apache Commons/docs/resources/titlebar.gif new file mode 100644 index 0000000..17443b3 Binary files /dev/null and b/docs/licenses/Apache Commons/docs/resources/titlebar.gif differ diff --git a/docs/licenses/Apache Commons/docs/resources/titlebar_end.gif b/docs/licenses/Apache Commons/docs/resources/titlebar_end.gif new file mode 100644 index 0000000..3ad78d4 Binary files /dev/null and b/docs/licenses/Apache Commons/docs/resources/titlebar_end.gif differ diff --git a/docs/licenses/Apache Commons/docs/serialized-form.html b/docs/licenses/Apache Commons/docs/serialized-form.html new file mode 100644 index 0000000..de34cc4 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/serialized-form.html @@ -0,0 +1,972 @@ + + + + + +Serializable tag+
Comparator<T>[] delegates+
boolean sumDirectoryContents+
long cutoff+
boolean acceptOlder+
FilenameFilter filenameFilter+
FileFilter fileFilter+
byte[] magicNumbers+
long byteOffset+
IOFileFilter filter+
long size+
boolean acceptLarger+
CharSequence charSequence+
int idx+
int mark+
List<E> listeners+
FileEntry rootEntry+
FileFilter fileFilter+
Comparator<T> comparator+
StringBuilder builder+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache Commons/docs/stylesheet.css b/docs/licenses/Apache Commons/docs/stylesheet.css new file mode 100644 index 0000000..0aeaa97 --- /dev/null +++ b/docs/licenses/Apache Commons/docs/stylesheet.css @@ -0,0 +1,474 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ +body { + background-color:#ffffff; + color:#353833; + font-family:Arial, Helvetica, sans-serif; + font-size:76%; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4c6b87; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4c6b87; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-size:1.3em; +} +h1 { + font-size:1.8em; +} +h2 { + font-size:1.5em; +} +h3 { + font-size:1.4em; +} +h4 { + font-size:1.3em; +} +h5 { + font-size:1.2em; +} +h6 { + font-size:1.1em; +} +ul { + list-style-type:disc; +} +code, tt { + font-size:1.2em; +} +dt code { + font-size:1.2em; +} +table tr td dt code { + font-size:1.2em; + vertical-align:top; +} +sup { + font-size:.6em; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:.8em; + z-index:200; + margin-top:-7px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + background-image:url(resources/titlebar.gif); + background-position:left top; + background-repeat:no-repeat; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:1em; + margin:0; +} +.topNav { + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; +} +.bottomNav { + margin-top:10px; + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; +} +.subNav { + background-color:#dee3e9; + border-bottom:1px solid #9eadc0; + float:left; + width:100%; + overflow:hidden; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding:3px 6px; +} +ul.subNavList li{ + list-style:none; + float:left; + font-size:90%; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; +} +.navBarCell1Rev { + background-image:url(resources/tab.gif); + background-color:#a88834; + color:#FFFFFF; + margin: auto 5px; + border:1px solid #c9aa44; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader h1 { + font-size:1.3em; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 25px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:1.2em; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + margin:0 0 6px -8px; + padding:2px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + margin:0 0 6px -8px; + padding:2px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:1.0em; +} +.indexContainer h2 { + font-size:1.1em; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:1.1em; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:10px 0 10px 20px; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:25px; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #9eadc0; + background-color:#f9f9f9; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:1px solid #9eadc0; + border-top:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; + border-bottom:1px solid #9eadc0; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.contentContainer table, .classUseContainer table, .constantValuesContainer table { + border-bottom:1px solid #9eadc0; + width:100%; +} +.contentContainer ul li table, .classUseContainer ul li table, .constantValuesContainer ul li table { + width:100%; +} +.contentContainer .description table, .contentContainer .details table { + border-bottom:none; +} +.contentContainer ul li table th.colOne, .contentContainer ul li table th.colFirst, .contentContainer ul li table th.colLast, .classUseContainer ul li table th, .constantValuesContainer ul li table th, .contentContainer ul li table td.colOne, .contentContainer ul li table td.colFirst, .contentContainer ul li table td.colLast, .classUseContainer ul li table td, .constantValuesContainer ul li table td{ + vertical-align:top; + padding-right:20px; +} +.contentContainer ul li table th.colLast, .classUseContainer ul li table th.colLast,.constantValuesContainer ul li table th.colLast, +.contentContainer ul li table td.colLast, .classUseContainer ul li table td.colLast,.constantValuesContainer ul li table td.colLast, +.contentContainer ul li table th.colOne, .classUseContainer ul li table th.colOne, +.contentContainer ul li table td.colOne, .classUseContainer ul li table td.colOne { + padding-right:3px; +} +.overviewSummary caption, .packageSummary caption, .contentContainer ul.blockList li.blockList caption, .summary caption, .classUseContainer caption, .constantValuesContainer caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#FFFFFF; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + margin:0px; +} +caption a:link, caption a:hover, caption a:active, caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .packageSummary caption span, .contentContainer ul.blockList li.blockList caption span, .summary caption span, .classUseContainer caption span, .constantValuesContainer caption span { + white-space:nowrap; + padding-top:8px; + padding-left:8px; + display:block; + float:left; + background-image:url(resources/titlebar.gif); + height:18px; +} +.overviewSummary .tabEnd, .packageSummary .tabEnd, .contentContainer ul.blockList li.blockList .tabEnd, .summary .tabEnd, .classUseContainer .tabEnd, .constantValuesContainer .tabEnd { + width:10px; + background-image:url(resources/titlebar_end.gif); + background-repeat:no-repeat; + background-position:top right; + position:relative; + float:left; +} +ul.blockList ul.blockList li.blockList table { + margin:0 0 12px 0px; + width:100%; +} +.tableSubHeadingColor { + background-color: #EEEEFF; +} +.altColor { + background-color:#eeeeef; +} +.rowColor { + background-color:#ffffff; +} +.overviewSummary td, .packageSummary td, .contentContainer ul.blockList li.blockList td, .summary td, .classUseContainer td, .constantValuesContainer td { + text-align:left; + padding:3px 3px 3px 7px; +} +th.colFirst, th.colLast, th.colOne, .constantValuesContainer th { + background:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + text-align:left; + padding:3px 3px 3px 7px; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +td.colFirst, th.colFirst { + border-left:1px solid #9eadc0; + white-space:nowrap; +} +td.colLast, th.colLast { + border-right:1px solid #9eadc0; +} +td.colOne, th.colOne { + border-right:1px solid #9eadc0; + border-left:1px solid #9eadc0; +} +table.overviewSummary { + padding:0px; + margin-left:0px; +} +table.overviewSummary td.colFirst, table.overviewSummary th.colFirst, +table.overviewSummary td.colOne, table.overviewSummary th.colOne { + width:25%; + vertical-align:middle; +} +table.packageSummary td.colFirst, table.overviewSummary th.colFirst { + width:25%; + vertical-align:middle; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:.9em; +} +.block { + display:block; + margin:3px 0 0 0; +} +.strong { + font-weight:bold; +} diff --git a/docs/licenses/Apache FileUploader/LICENSE.txt b/docs/licenses/Apache FileUploader/LICENSE.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/docs/licenses/Apache FileUploader/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/docs/licenses/Apache FileUploader/NOTICE.txt b/docs/licenses/Apache FileUploader/NOTICE.txt new file mode 100644 index 0000000..b72a517 --- /dev/null +++ b/docs/licenses/Apache FileUploader/NOTICE.txt @@ -0,0 +1,5 @@ +Apache Commons FileUpload +Copyright 2002-2016 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). diff --git a/docs/licenses/Apache FileUploader/site/apidocs/allclasses-frame.html b/docs/licenses/Apache FileUploader/site/apidocs/allclasses-frame.html new file mode 100644 index 0000000..46f9431 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/allclasses-frame.html @@ -0,0 +1,59 @@ + + + + + + +Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final String |
+ATTACHMENT |
+"attachment" |
+
+
+public static final String |
+CONTENT_DISPOSITION |
+"Content-disposition" |
+
+
+public static final String |
+CONTENT_LENGTH |
+"Content-length" |
+
+
+public static final String |
+CONTENT_TYPE |
+"Content-type" |
+
+
+public static final String |
+FORM_DATA |
+"form-data" |
+
+
+public static final int |
+MAX_HEADER_SIZE |
+1024 |
+
+
+public static final String |
+MULTIPART |
+"multipart/" |
+
+
+public static final String |
+MULTIPART_FORM_DATA |
+"multipart/form-data" |
+
+
+public static final String |
+MULTIPART_MIXED |
+"multipart/mixed" |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final byte |
+CR |
+13 |
+
+
+public static final byte |
+DASH |
+45 |
+
+
+protected static final int |
+DEFAULT_BUFSIZE |
+4096 |
+
+
+public static final int |
+HEADER_PART_SIZE_MAX |
+10240 |
+
+
+public static final byte |
+LF |
+10 |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final String |
+DEFAULT_CHARSET |
+"ISO-8859-1" |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final int |
+DEFAULT_SIZE_THRESHOLD |
+10240 |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/deprecated-list.html b/docs/licenses/Apache FileUploader/site/apidocs/deprecated-list.html new file mode 100644 index 0000000..ac11671 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/deprecated-list.html @@ -0,0 +1,383 @@ + + + + + + +Class and Description | +
---|
org.apache.commons.fileupload.DefaultFileItem
+ 1.1 Use
+DiskFileItem instead. |
+
org.apache.commons.fileupload.DefaultFileItemFactory
+ 1.1 Use
+DiskFileItemFactory instead. |
+
org.apache.commons.fileupload.DiskFileUpload
+ 1.1 Use
+ServletFileUpload together with
+ DiskFileItemFactory instead. |
+
Exceptions and Description | +
---|
org.apache.commons.fileupload.FileUploadBase.UnknownSizeException
+ 1.2 As of commons-fileupload 1.2, the presence of a
+ content-length header is no longer required.
+ |
+
Field and Description | +
---|
org.apache.commons.fileupload.FileUploadBase.MAX_HEADER_SIZE
+ This constant is no longer used. As of commons-fileupload
+ 1.2, the only applicable limit is the total size of a parts headers,
+
+MultipartStream.HEADER_PART_SIZE_MAX . |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/help-doc.html b/docs/licenses/Apache FileUploader/site/apidocs/help-doc.html new file mode 100644 index 0000000..3aa148b --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/help-doc.html @@ -0,0 +1,230 @@ + + + + + + +The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
+Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+Each annotation type has its own separate page with the following sections:
+Each enum has its own separate page with the following sections:
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object
. The interfaces do not inherit from java.lang.Object
.
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+These links take you to the next or previous class, interface, package, or related page.
+These links show and hide the HTML frames. All pages are available with or without frames.
+The All Classes link shows all classes and interfaces except non-static nested types.
+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
+The Constant Field Values page lists the static final fields and their values.
+Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/index-all.html b/docs/licenses/Apache FileUploader/site/apidocs/index-all.html new file mode 100644 index 0000000..f0d8d21 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/index-all.html @@ -0,0 +1,1628 @@ + + + + + + +count
first bytes in the arrays
+ a
and b
.FileItemStream
's
+ content into a string.FileItemStream
's
+ content into a string, using the given character encoding.CRLF--
).InputStream
+ to the given OutputStream
.InputStream
+ to the given OutputStream
.DiskFileItemFactory
instead.DiskFileItem
+ instance from the supplied parameters and the local factory
+ configuration.FileItem
instance from the supplied parameters and
+ any local factory configuration.FileItem
.DiskFileItem
instead.DiskFileItem
instead.DiskFileItemFactory
instead.DiskFileItemFactory
instead.DiskFileItemFactory
instead.body-data
from the current
+ encapsulation
and discards it.FileItem
interface.DiskFileItem
instance.FileItemFactory
+ implementation.ServletFileUpload
together with
+ DiskFileItemFactory
instead.FileUpload
instead.FileUpload
instead.CRLF
).FileCleaningTracker
in the web application.FileCleaningTracker
's reaper thread is terminated,
+ when the web application is destroyed.multipart/form-data
POST request.FileItem
instances.multipart/form-data
POST
+ request.FileItemHeaders
interface.FileItem
or FileItemStream
+ implementations will accept the headers read for the item.FileUploadBase.getItemIterator(RequestContext)
.multipart/form-data
POST request.InputStream
, which has been returned
+ by FileItemStream.openStream()
, after
+ Iterator.hasNext()
has been invoked on the
+ iterator, which created the FileItemStream
.SizeExceededException
with
+ the specified detail message, and actual and permitted sizes.FileItem
instances.FileUploadException
in an IOException
.FileUploadException
without message.FileUploadException
with specified detail
+ message.FileUploadException
with the given
+ detail message and cause.FileUploadIOException
with the
+ given cause.buffer
,
+ starting at the specified position
.boundary
in the buffer
+ region delimited by head
and tail
.Content-type
header.null
if
+ not defined.PortletRequestContext.contentLength()
insteadUploadContext.contentLength()
insteadServletRequestContext.contentLength()
insteadnull
if
+ not defined.null
if
+ not defined.null
if
+ not defined.Content-disposition
+ header.FileUploadBase.getFieldName(FileItemHeaders)
.FileCleaningTracker
, which is
+ associated with the given ServletContext
.FileUpload
instead.FileUploadBase.getFileName(FileItemHeaders)
.Content-disposition
+ header.FileUploadBase.getSizeMax()
.String
.FileItemHeaders.getHeader(String)
.String
.Iterator
of all the header names.Iterator
of all the header names.Iterator
of String
objects.Iterator
of String
objects.InputStream
that can be
+ used to retrieve the contents of the file.InputStream
that can be
+ used to retrieve the contents of the file.multipart/form-data
stream.multipart/form-data
stream.multipart/form-data
stream.OutputStream
that can
+ be used for storing the contents of the file.OutputStream
that can
+ be used for storing the contents of the file.header-part
and returns as key/value
+ pairs.DiskFileItemFactory
instead.FileUploadBase.getFileSizeMax()
.DiskFileItemFactory
instead.File
object for the FileItem
's
+ data's temporary location on the disk.File
representing a uniquely
+ named temporary file in the configured repository path.FileItemStream
+ is available.header-part
that will be
+ processed (10 kilobytes = 10240 bytes.).header-part
+ (CRLFCRLF
).IllegalBoundaryException
with no
+ detail message.IllegalBoundaryException
with
+ the specified detail message.InvalidContentTypeException
with no
+ detail message.InvalidContentTypeException
with
+ the specified detail message.InvalidContentTypeException
with
+ the specified detail message and cause.FileItem
instance represents
+ a simple form field.FileItem
instance represents
+ a simple form field.FileItem
instance represents
+ a simple form field.ServletFileUpload
instead.MalformedStreamException
with no
+ detail message.MalformedStreamException
with
+ the specified detail message.MultipartStream.HEADER_PART_SIZE_MAX
.MultipartStream
with a custom size buffer.InputStream
for reading an items contents.ProgressListener
.FileItemHeaders
.FileItemStream
.InputStream
, which allows to read the
+ items contents.FileItem
+ interface.FileUpload
+ for use in portlets conforming to JSR 168.FileUpload
+ for use in servlets conforming to JSR 53.FileUploadBase.getParsedHeaders(String)
multipart/form-data
stream.multipart/form-data
stream.multipart/form-data
stream.ServletFileUpload
instead.ServletFileUpload.parseRequest(HttpServletRequest)
instead.multipart/form-data
stream.multipart/form-data
stream.multipart/form-data
stream.FileItem
instances.ProgressListener
may be used to display a progress bar
+ or do stuff like that.len
bytes of data from this input stream
+ into an array of bytes.body-data
from the current
+ encapsulation
and writes its contents into the
+ output Stream
.boundary
token, and checks whether more
+ encapsulations
are contained in the stream.buffer
, and refills it as
+ necessary.header-part
of the current
+ encapsulation
.FileItem
instances.FileCleaningTracker
, which is
+ associated with the given ServletContext
.FileUpload
instead.FileUploadBase.getSizeMax()
.FileItem
instance represents
+ a simple form field.FileItem
instance represents
+ a simple form field.DiskFileItemFactory
instead.FileUploadBase.setFileSizeMax(long)
.DiskFileItemFactory
instead.SizeLimitExceededException(String, long, long)
#SizeLimitExceededException(String, long, long)
SizeExceededException
with
+ the specified detail message, and actual and permitted sizes.encapsulation
.--
).UnknownSizeException
with no
+ detail message.UnknownSizeException
with
+ the specified detail message.RequestContext
.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/index.html b/docs/licenses/Apache FileUploader/site/apidocs/index.html new file mode 100644 index 0000000..ba3bcf8 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/index.html @@ -0,0 +1,75 @@ + + + + + + +This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to Non-frame version.
+DiskFileItem
instead.@Deprecated +public class DefaultFileItem +extends DiskFileItem+
The default implementation of the
+ FileItem
interface.
+
+
After retrieving an instance of this class from a DiskFileUpload
instance (see
+ #parseRequest(javax.servlet.http.HttpServletRequest)
), you may
+ either request all contents of file at once using DiskFileItem.get()
or
+ request an InputStream
with
+ DiskFileItem.getInputStream()
and process the file without attempting to load
+ it into memory, which may come handy with large files.
DEFAULT_CHARSET
Constructor and Description | +
---|
DefaultFileItem(String fieldName,
+ String contentType,
+ boolean isFormField,
+ String fileName,
+ int sizeThreshold,
+ File repository)
+Deprecated.
+
+1.1 Use
+DiskFileItem instead. |
+
delete, finalize, get, getCharSet, getContentType, getFieldName, getHeaders, getInputStream, getName, getOutputStream, getSize, getStoreLocation, getString, getString, getTempFile, isFormField, isInMemory, setFieldName, setFormField, setHeaders, toString, write
@Deprecated +public DefaultFileItem(String fieldName, + String contentType, + boolean isFormField, + String fileName, + int sizeThreshold, + File repository)+
DiskFileItem
instead.DefaultFileItem
instance.fieldName
- The name of the form field.contentType
- The content type passed by the browser or
+ null
if not specified.isFormField
- Whether or not this item is a plain form field, as
+ opposed to a file upload.fileName
- The original filename in the user's filesystem, or
+ null
if not specified.sizeThreshold
- The threshold, in bytes, below which items will be
+ retained in memory and above which they will be
+ stored as a file.repository
- The data repository, which is the directory in
+ which files will be created, should the item size
+ exceed the threshold.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/DefaultFileItemFactory.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/DefaultFileItemFactory.html new file mode 100644 index 0000000..b6c7877 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/DefaultFileItemFactory.html @@ -0,0 +1,394 @@ + + + + + + +DiskFileItemFactory
instead.@Deprecated +public class DefaultFileItemFactory +extends DiskFileItemFactory+
The default FileItemFactory
+ implementation. This implementation creates
+ FileItem
instances which keep their
+ content either in memory, for smaller items, or in a temporary file on disk,
+ for larger items. The size threshold, above which content will be stored on
+ disk, is configurable, as is the directory in which temporary files will be
+ created.
System.getProperty("java.io.tmpdir")
.DEFAULT_SIZE_THRESHOLD
Constructor and Description | +
---|
DefaultFileItemFactory()
+Deprecated.
+
+1.1 Use
+DiskFileItemFactory instead. |
+
DefaultFileItemFactory(int sizeThreshold,
+ File repository)
+Deprecated.
+
+1.1 Use
+DiskFileItemFactory instead. |
+
Modifier and Type | +Method and Description | +
---|---|
FileItem |
+createItem(String fieldName,
+ String contentType,
+ boolean isFormField,
+ String fileName)
+Deprecated.
+
+1.1 Use
+DiskFileItemFactory instead. |
+
getFileCleaningTracker, getRepository, getSizeThreshold, setFileCleaningTracker, setRepository, setSizeThreshold
@Deprecated +public DefaultFileItemFactory()+
DiskFileItemFactory
instead.@Deprecated +public DefaultFileItemFactory(int sizeThreshold, + File repository)+
DiskFileItemFactory
instead.sizeThreshold
- The threshold, in bytes, below which items will be
+ retained in memory and above which they will be
+ stored as a file.repository
- The data repository, which is the directory in
+ which files will be created, should the item size
+ exceed the threshold.@Deprecated +public FileItem createItem(String fieldName, + String contentType, + boolean isFormField, + String fileName)+
DiskFileItemFactory
instead.DefaultFileItem
+ instance from the supplied parameters and the local factory
+ configuration.createItem
in interface FileItemFactory
createItem
in class DiskFileItemFactory
fieldName
- The name of the form field.contentType
- The content type of the form field.isFormField
- true
if this is a plain form field;
+ false
otherwise.fileName
- The name of the uploaded file, if any, as supplied
+ by the browser or other client.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/DiskFileUpload.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/DiskFileUpload.html new file mode 100644 index 0000000..0aa15c5 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/DiskFileUpload.html @@ -0,0 +1,560 @@ + + + + + + +ServletFileUpload
together with
+ DiskFileItemFactory
instead.@Deprecated +public class DiskFileUpload +extends FileUploadBase+
High level API for processing file uploads.
+ +This class handles multiple files per single HTML widget, sent using
+ multipart/mixed
encoding type, as specified by
+ RFC 1867. Use FileUploadBase.parseRequest(HttpServletRequest)
to acquire a list of FileItem
s associated with a given HTML
+ widget.
Individual parts will be stored in temporary disk storage or in memory,
+ depending on their size, and will be available as FileItem
s.
FileUploadBase.FileSizeLimitExceededException, FileUploadBase.FileUploadIOException, FileUploadBase.InvalidContentTypeException, FileUploadBase.IOFileUploadException, FileUploadBase.SizeException, FileUploadBase.SizeLimitExceededException, FileUploadBase.UnknownSizeException
ATTACHMENT, CONTENT_DISPOSITION, CONTENT_LENGTH, CONTENT_TYPE, FORM_DATA, MAX_HEADER_SIZE, MULTIPART, MULTIPART_FORM_DATA, MULTIPART_MIXED
Constructor and Description | +
---|
DiskFileUpload()
+Deprecated.
+
+1.1 Use
+FileUpload instead. |
+
DiskFileUpload(DefaultFileItemFactory fileItemFactory)
+Deprecated.
+
+1.1 Use
+FileUpload instead. |
+
Modifier and Type | +Method and Description | +
---|---|
FileItemFactory |
+getFileItemFactory()
+Deprecated.
+
+1.1 Use
+FileUpload instead. |
+
String |
+getRepositoryPath()
+Deprecated.
+
+1.1 Use
+DiskFileItemFactory instead. |
+
int |
+getSizeThreshold()
+Deprecated.
+
+1.1 Use
+DiskFileItemFactory instead. |
+
List<FileItem> |
+parseRequest(HttpServletRequest req,
+ int sizeThreshold,
+ long sizeMax,
+ String path)
+Deprecated.
+
+1.1 Use
+ServletFileUpload instead. |
+
void |
+setFileItemFactory(FileItemFactory factory)
+Deprecated.
+
+1.1 Use
+FileUpload instead. |
+
void |
+setRepositoryPath(String repositoryPath)
+Deprecated.
+
+1.1 Use
+DiskFileItemFactory instead. |
+
void |
+setSizeThreshold(int sizeThreshold)
+Deprecated.
+
+1.1 Use
+DiskFileItemFactory instead. |
+
createItem, getBoundary, getFieldName, getFieldName, getFileName, getFileName, getFileSizeMax, getHeader, getHeaderEncoding, getItemIterator, getParsedHeaders, getProgressListener, getSizeMax, isMultipartContent, isMultipartContent, newFileItemHeaders, parseHeaders, parseParameterMap, parseRequest, parseRequest, setFileSizeMax, setHeaderEncoding, setProgressListener, setSizeMax
@Deprecated +public DiskFileUpload()+
FileUpload
instead.FileItem
instances.DiskFileUpload(DefaultFileItemFactory fileItemFactory)
@Deprecated +public DiskFileUpload(DefaultFileItemFactory fileItemFactory)+
FileUpload
instead.FileItem
instances.fileItemFactory
- The file item factory to use.DiskFileUpload()
@Deprecated +public FileItemFactory getFileItemFactory()+
FileUpload
instead.getFileItemFactory
in class FileUploadBase
@Deprecated +public void setFileItemFactory(FileItemFactory factory)+
FileUpload
instead.DefaultFileItemFactory
or a subclass
+ thereof, or else a ClassCastException
will be thrown.setFileItemFactory
in class FileUploadBase
factory
- The factory class for new file items.@Deprecated +public int getSizeThreshold()+
DiskFileItemFactory
instead.setSizeThreshold(int)
@Deprecated +public void setSizeThreshold(int sizeThreshold)+
DiskFileItemFactory
instead.sizeThreshold
- The size threshold, in bytes.getSizeThreshold()
@Deprecated +public String getRepositoryPath()+
DiskFileItemFactory
instead.setRepositoryPath(String)
@Deprecated +public void setRepositoryPath(String repositoryPath)+
DiskFileItemFactory
instead.repositoryPath
- The path to the temporary file location.getRepositoryPath()
@Deprecated +public List<FileItem> parseRequest(HttpServletRequest req, + int sizeThreshold, + long sizeMax, + String path) + throws FileUploadException+
ServletFileUpload
instead.multipart/form-data
stream. If files are stored
+ on disk, the path is given by getRepository()
.req
- The servlet request to be parsed. Must be non-null.sizeThreshold
- The max size in bytes to be stored in memory.sizeMax
- The maximum allowed upload size, in bytes.path
- The location where the files should be stored.FileItem
instances parsed from the
+ request, in the order that they were transmitted.FileUploadException
- if there are problems reading/parsing
+ the request or storing files.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileItem.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileItem.html new file mode 100644 index 0000000..6c98f4d --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileItem.html @@ -0,0 +1,607 @@ + + + + + + +public interface FileItem +extends Serializable, FileItemHeadersSupport+
This class represents a file or form item that was received within a
+ multipart/form-data
POST request.
+
+
After retrieving an instance of this class from a FileUpload
instance (see
+ #parseRequest(javax.servlet.http.HttpServletRequest)
), you may
+ either request all contents of the file at once using get()
or
+ request an InputStream
with
+ getInputStream()
and process the file without attempting to load
+ it into memory, which may come handy with large files.
+
+
While this interface does not extend
+ javax.activation.DataSource
per se (to avoid a seldom used
+ dependency), several of the defined methods are specifically defined with
+ the same signatures as methods in that interface. This allows an
+ implementation of this interface to also implement
+ javax.activation.DataSource
with minimal additional work.
Modifier and Type | +Method and Description | +
---|---|
void |
+delete()
+Deletes the underlying storage for a file item, including deleting any
+ associated temporary disk file.
+ |
+
byte[] |
+get()
+Returns the contents of the file item as an array of bytes.
+ |
+
String |
+getContentType()
+Returns the content type passed by the browser or
+null if
+ not defined. |
+
String |
+getFieldName()
+Returns the name of the field in the multipart form corresponding to
+ this file item.
+ |
+
InputStream |
+getInputStream()
+Returns an
+InputStream that can be
+ used to retrieve the contents of the file. |
+
String |
+getName()
+Returns the original filename in the client's filesystem, as provided by
+ the browser (or other client software).
+ |
+
OutputStream |
+getOutputStream()
+Returns an
+OutputStream that can
+ be used for storing the contents of the file. |
+
long |
+getSize()
+Returns the size of the file item.
+ |
+
String |
+getString()
+Returns the contents of the file item as a String, using the default
+ character encoding.
+ |
+
String |
+getString(String encoding)
+Returns the contents of the file item as a String, using the specified
+ encoding.
+ |
+
boolean |
+isFormField()
+Determines whether or not a
+FileItem instance represents
+ a simple form field. |
+
boolean |
+isInMemory()
+Provides a hint as to whether or not the file contents will be read
+ from memory.
+ |
+
void |
+setFieldName(String name)
+Sets the field name used to reference this file item.
+ |
+
void |
+setFormField(boolean state)
+Specifies whether or not a
+FileItem instance represents
+ a simple form field. |
+
void |
+write(File file)
+A convenience method to write an uploaded item to disk.
+ |
+
getHeaders, setHeaders
InputStream getInputStream() + throws IOException+
InputStream
that can be
+ used to retrieve the contents of the file.InputStream
that can be
+ used to retrieve the contents of the file.IOException
- if an error occurs.String getContentType()+
null
if
+ not defined.null
if
+ not defined.String getName()+
InvalidFileNameException
- The file name contains a NUL character,
+ which might be an indicator of a security attack. If you intend to
+ use the file name anyways, catch the exception and use
+ InvalidFileNameException#getName().boolean isInMemory()+
true
if the file contents will be read from memory;
+ false
otherwise.long getSize()+
byte[] get()+
String getString(String encoding) + throws UnsupportedEncodingException+
get()
to retrieve the
+ contents of the item.encoding
- The character encoding to use.UnsupportedEncodingException
- if the requested character
+ encoding is not available.String getString()+
get()
to retrieve the
+ contents of the item.void write(File file) + throws Exception+
+ This method is not guaranteed to succeed if called more than once for + the same item. This allows a particular implementation to use, for + example, file renaming, where possible, rather than copying all of the + underlying data, thus gaining a significant performance benefit.
file
- The File
into which the uploaded item should
+ be stored.Exception
- if an error occurs.void delete()+
FileItem
instance is garbage
+ collected, this method can be used to ensure that this is done at an
+ earlier time, thus preserving system resources.String getFieldName()+
void setFieldName(String name)+
name
- The name of the form field.boolean isFormField()+
FileItem
instance represents
+ a simple form field.true
if the instance represents a simple form
+ field; false
if it represents an uploaded file.void setFormField(boolean state)+
FileItem
instance represents
+ a simple form field.state
- true
if the instance represents a simple form
+ field; false
if it represents an uploaded file.OutputStream getOutputStream() + throws IOException+
OutputStream
that can
+ be used for storing the contents of the file.OutputStream
that can be used
+ for storing the contensts of the file.IOException
- if an error occurs.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileItemFactory.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileItemFactory.html new file mode 100644 index 0000000..a1ddf04 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileItemFactory.html @@ -0,0 +1,255 @@ + + + + + + +public interface FileItemFactory
+A factory interface for creating FileItem
instances. Factories
+ can provide their own custom configuration, over and above that provided
+ by the default file upload implementation.
Modifier and Type | +Method and Description | +
---|---|
FileItem |
+createItem(String fieldName,
+ String contentType,
+ boolean isFormField,
+ String fileName)
+Create a new
+FileItem instance from the supplied parameters and
+ any local factory configuration. |
+
FileItem createItem(String fieldName, + String contentType, + boolean isFormField, + String fileName)+
FileItem
instance from the supplied parameters and
+ any local factory configuration.fieldName
- The name of the form field.contentType
- The content type of the form field.isFormField
- true
if this is a plain form field;
+ false
otherwise.fileName
- The name of the uploaded file, if any, as supplied
+ by the browser or other client.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileItemHeaders.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileItemHeaders.html new file mode 100644 index 0000000..7190fb3 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileItemHeaders.html @@ -0,0 +1,310 @@ + + + + + + +public interface FileItemHeaders
+ This class provides support for accessing the headers for a file or form
+ item that was received within a multipart/form-data
POST
+ request.
Modifier and Type | +Method and Description | +
---|---|
String |
+getHeader(String name)
+Returns the value of the specified part header as a
+String . |
+
Iterator<String> |
+getHeaderNames()
+
+ Returns an
+Iterator of all the header names. |
+
Iterator<String> |
+getHeaders(String name)
+
+ Returns all the values of the specified item header as an
+
+Iterator of String objects. |
+
String getHeader(String name)+
String
.
+
+ If the part did not include a header of the specified name, this method
+ return null
. If there are multiple headers with the same
+ name, this method returns the first header in the item. The header
+ name is case insensitive.name
- a String
specifying the header nameString
containing the value of the requested
+ header, or null
if the item does not have a header
+ of that nameIterator<String> getHeaders(String name)+
+ Returns all the values of the specified item header as an
+ Iterator
of String
objects.
+
+ If the item did not include any headers of the specified name, this
+ method returns an empty Iterator
. The header name is
+ case insensitive.
+
name
- a String
specifying the header nameIterator
containing the values of the
+ requested header. If the item does not have any headers of
+ that name, return an empty Iterator
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileItemHeadersSupport.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileItemHeadersSupport.html new file mode 100644 index 0000000..2cb60c9 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileItemHeadersSupport.html @@ -0,0 +1,272 @@ + + + + + + +public interface FileItemHeadersSupport
+FileItem
or FileItemStream
+ implementations will accept the headers read for the item.FileItem
,
+FileItemStream
Modifier and Type | +Method and Description | +
---|---|
FileItemHeaders |
+getHeaders()
+Returns the collection of headers defined locally within this item.
+ |
+
void |
+setHeaders(FileItemHeaders headers)
+Sets the headers read from within an item.
+ |
+
FileItemHeaders getHeaders()+
FileItemHeaders
present for this item.void setHeaders(FileItemHeaders headers)+
FileItem
or FileItemStream
should implement this
+ interface to be able to get the raw headers found within the item
+ header block.headers
- the instance that holds onto the headers
+ for this instance.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileItemIterator.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileItemIterator.html new file mode 100644 index 0000000..2058c89 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileItemIterator.html @@ -0,0 +1,273 @@ + + + + + + +public interface FileItemIterator
+FileUploadBase.getItemIterator(RequestContext)
.Modifier and Type | +Method and Description | +
---|---|
boolean |
+hasNext()
+Returns, whether another instance of
+FileItemStream
+ is available. |
+
FileItemStream |
+next()
+Returns the next available
+FileItemStream . |
+
boolean hasNext() + throws FileUploadException, + IOException+
FileItemStream
+ is available.FileUploadException
- Parsing or processing the
+ file item failed.IOException
- Reading the file item failed.FileItemStream next() + throws FileUploadException, + IOException+
FileItemStream
.NoSuchElementException
- No more items are available. Use
+ hasNext()
to prevent this exception.FileUploadException
- Parsing or processing the
+ file item failed.IOException
- Reading the file item failed.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileItemStream.ItemSkippedException.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileItemStream.ItemSkippedException.html new file mode 100644 index 0000000..ac5188e --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileItemStream.ItemSkippedException.html @@ -0,0 +1,277 @@ + + + + + + +public static class FileItemStream.ItemSkippedException +extends IOException+
InputStream
, which has been returned
+ by FileItemStream.openStream()
, after
+ Iterator.hasNext()
has been invoked on the
+ iterator, which created the FileItemStream
.Constructor and Description | +
---|
ItemSkippedException() |
+
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileItemStream.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileItemStream.html new file mode 100644 index 0000000..ba3a0aa --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileItemStream.html @@ -0,0 +1,382 @@ + + + + + + +public interface FileItemStream +extends FileItemHeadersSupport+
This interface provides access to a file or form item that was
+ received within a multipart/form-data
POST request.
+ The items contents are retrieved by calling openStream()
.
Instances of this class are created by accessing the
+ iterator, returned by
+ FileUploadBase.getItemIterator(RequestContext)
.
Note: There is an interaction between the iterator and
+ its associated instances of FileItemStream
: By invoking
+ Iterator.hasNext()
on the iterator, you discard all data,
+ which hasn't been read so far from the previous data.
Modifier and Type | +Interface and Description | +
---|---|
static class |
+FileItemStream.ItemSkippedException
+This exception is thrown, if an attempt is made to read
+ data from the
+InputStream , which has been returned
+ by openStream() , after
+ Iterator.hasNext() has been invoked on the
+ iterator, which created the FileItemStream . |
+
Modifier and Type | +Method and Description | +
---|---|
String |
+getContentType()
+Returns the content type passed by the browser or
+null if
+ not defined. |
+
String |
+getFieldName()
+Returns the name of the field in the multipart form corresponding to
+ this file item.
+ |
+
String |
+getName()
+Returns the original filename in the client's filesystem, as provided by
+ the browser (or other client software).
+ |
+
boolean |
+isFormField()
+Determines whether or not a
+FileItem instance represents
+ a simple form field. |
+
InputStream |
+openStream()
+Creates an
+InputStream , which allows to read the
+ items contents. |
+
getHeaders, setHeaders
InputStream openStream() + throws IOException+
InputStream
, which allows to read the
+ items contents.IllegalStateException
- The method was already invoked on
+ this item. It is not possible to recreate the data stream.IOException
- An I/O error occurred.FileItemStream.ItemSkippedException
String getContentType()+
null
if
+ not defined.null
if
+ not defined.String getName()+
String getFieldName()+
boolean isFormField()+
FileItem
instance represents
+ a simple form field.true
if the instance represents a simple form
+ field; false
if it represents an uploaded file.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUpload.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUpload.html new file mode 100644 index 0000000..ef77375 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUpload.html @@ -0,0 +1,398 @@ + + + + + + +public class FileUpload +extends FileUploadBase+
High level API for processing file uploads.
+ +This class handles multiple files per single HTML widget, sent using
+ multipart/mixed
encoding type, as specified by
+ RFC 1867. Use FileUploadBase.parseRequest(RequestContext)
to acquire a list
+ of FileItems
associated
+ with a given HTML widget.
How the data for individual parts is stored is determined by the factory + used to create them; a given part may be in memory, on disk, or somewhere + else.
FileUploadBase.FileSizeLimitExceededException, FileUploadBase.FileUploadIOException, FileUploadBase.InvalidContentTypeException, FileUploadBase.IOFileUploadException, FileUploadBase.SizeException, FileUploadBase.SizeLimitExceededException, FileUploadBase.UnknownSizeException
ATTACHMENT, CONTENT_DISPOSITION, CONTENT_LENGTH, CONTENT_TYPE, FORM_DATA, MAX_HEADER_SIZE, MULTIPART, MULTIPART_FORM_DATA, MULTIPART_MIXED
Constructor and Description | +
---|
FileUpload()
+Constructs an uninitialised instance of this class.
+ |
+
FileUpload(FileItemFactory fileItemFactory)
+Constructs an instance of this class which uses the supplied factory to
+ create
+FileItem instances. |
+
Modifier and Type | +Method and Description | +
---|---|
FileItemFactory |
+getFileItemFactory()
+Returns the factory class used when creating file items.
+ |
+
void |
+setFileItemFactory(FileItemFactory factory)
+Sets the factory class to use when creating file items.
+ |
+
createItem, getBoundary, getFieldName, getFieldName, getFileName, getFileName, getFileSizeMax, getHeader, getHeaderEncoding, getItemIterator, getParsedHeaders, getProgressListener, getSizeMax, isMultipartContent, isMultipartContent, newFileItemHeaders, parseHeaders, parseParameterMap, parseRequest, parseRequest, setFileSizeMax, setHeaderEncoding, setProgressListener, setSizeMax
public FileUpload()+
setFileItemFactory()
, before attempting
+ to parse requests.FileUpload(FileItemFactory)
public FileUpload(FileItemFactory fileItemFactory)+
FileItem
instances.fileItemFactory
- The factory to use for creating file items.FileUpload()
public FileItemFactory getFileItemFactory()+
getFileItemFactory
in class FileUploadBase
public void setFileItemFactory(FileItemFactory factory)+
setFileItemFactory
in class FileUploadBase
factory
- The factory class for new file items.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadBase.FileSizeLimitExceededException.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadBase.FileSizeLimitExceededException.html new file mode 100644 index 0000000..a0e6cc2 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadBase.FileSizeLimitExceededException.html @@ -0,0 +1,417 @@ + + + + + + +public static class FileUploadBase.FileSizeLimitExceededException +extends FileUploadBase.SizeException+
Constructor and Description | +
---|
FileSizeLimitExceededException(String message,
+ long actual,
+ long permitted)
+Constructs a
+SizeExceededException with
+ the specified detail message, and actual and permitted sizes. |
+
Modifier and Type | +Method and Description | +
---|---|
String |
+getFieldName()
+Returns the field name of the item, which caused the
+ exception.
+ |
+
String |
+getFileName()
+Returns the file name of the item, which caused the
+ exception.
+ |
+
void |
+setFieldName(String pFieldName)
+Sets the field name of the item, which caused the
+ exception.
+ |
+
void |
+setFileName(String pFileName)
+Sets the file name of the item, which caused the
+ exception.
+ |
+
getActualSize, getPermittedSize
getCause, printStackTrace, printStackTrace
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toString
public FileSizeLimitExceededException(String message, + long actual, + long permitted)+
SizeExceededException
with
+ the specified detail message, and actual and permitted sizes.message
- The detail message.actual
- The actual request size.permitted
- The maximum permitted request size.public String getFileName()+
public void setFileName(String pFileName)+
pFileName
- the file name of the item, which caused the exception.public String getFieldName()+
public void setFieldName(String pFieldName)+
pFieldName
- the field name of the item,
+ which caused the exception.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadBase.FileUploadIOException.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadBase.FileUploadIOException.html new file mode 100644 index 0000000..95cba93 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadBase.FileUploadIOException.html @@ -0,0 +1,326 @@ + + + + + + +public static class FileUploadBase.FileUploadIOException +extends IOException+
FileUploadException
in an IOException
.Constructor and Description | +
---|
FileUploadIOException(FileUploadException pCause)
+Creates a
+FileUploadIOException with the
+ given cause. |
+
Modifier and Type | +Method and Description | +
---|---|
Throwable |
+getCause()
+Returns the exceptions cause.
+ |
+
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public FileUploadIOException(FileUploadException pCause)+
FileUploadIOException
with the
+ given cause.pCause
- The exceptions cause, if any, or null.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadBase.IOFileUploadException.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadBase.IOFileUploadException.html new file mode 100644 index 0000000..289f9a9 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadBase.IOFileUploadException.html @@ -0,0 +1,333 @@ + + + + + + +public static class FileUploadBase.IOFileUploadException +extends FileUploadException+
Constructor and Description | +
---|
IOFileUploadException(String pMsg,
+ IOException pException)
+Creates a new instance with the given cause.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
Throwable |
+getCause()
+Returns the exceptions cause.
+ |
+
printStackTrace, printStackTrace
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toString
public IOFileUploadException(String pMsg, + IOException pException)+
pMsg
- The detail message.pException
- The exceptions cause.public Throwable getCause()+
getCause
in class FileUploadException
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadBase.InvalidContentTypeException.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadBase.InvalidContentTypeException.html new file mode 100644 index 0000000..262e7b8 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadBase.InvalidContentTypeException.html @@ -0,0 +1,332 @@ + + + + + + +public static class FileUploadBase.InvalidContentTypeException +extends FileUploadException+
Constructor and Description | +
---|
InvalidContentTypeException()
+Constructs a
+InvalidContentTypeException with no
+ detail message. |
+
InvalidContentTypeException(String message)
+Constructs an
+InvalidContentTypeException with
+ the specified detail message. |
+
InvalidContentTypeException(String msg,
+ Throwable cause)
+Constructs an
+InvalidContentTypeException with
+ the specified detail message and cause. |
+
getCause, printStackTrace, printStackTrace
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toString
public InvalidContentTypeException()+
InvalidContentTypeException
with no
+ detail message.public InvalidContentTypeException(String message)+
InvalidContentTypeException
with
+ the specified detail message.message
- The detail message.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadBase.SizeException.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadBase.SizeException.html new file mode 100644 index 0000000..8d9674e --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadBase.SizeException.html @@ -0,0 +1,365 @@ + + + + + + +protected abstract static class FileUploadBase.SizeException +extends FileUploadException+
Modifier | +Constructor and Description | +
---|---|
protected |
+SizeException(String message,
+ long actual,
+ long permitted)
+Creates a new instance.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
long |
+getActualSize()
+Retrieves the actual size of the request.
+ |
+
long |
+getPermittedSize()
+Retrieves the permitted size of the request.
+ |
+
getCause, printStackTrace, printStackTrace
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toString
protected SizeException(String message, + long actual, + long permitted)+
message
- The detail message.actual
- The actual number of bytes in the request.permitted
- The requests size limit, in bytes.public long getActualSize()+
public long getPermittedSize()+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadBase.SizeLimitExceededException.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadBase.SizeLimitExceededException.html new file mode 100644 index 0000000..417f03b --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadBase.SizeLimitExceededException.html @@ -0,0 +1,351 @@ + + + + + + +public static class FileUploadBase.SizeLimitExceededException +extends FileUploadBase.SizeException+
Constructor and Description | +
---|
SizeLimitExceededException()
+Deprecated.
+
+1.2 Replaced by
+
+SizeLimitExceededException(String, long, long) |
+
SizeLimitExceededException(String message)
+Deprecated.
+
+1.2 Replaced by
+
+#SizeLimitExceededException(String, long, long) |
+
SizeLimitExceededException(String message,
+ long actual,
+ long permitted)
+Constructs a
+SizeExceededException with
+ the specified detail message, and actual and permitted sizes. |
+
getActualSize, getPermittedSize
getCause, printStackTrace, printStackTrace
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toString
@Deprecated +public SizeLimitExceededException()+
SizeLimitExceededException(String, long, long)
@Deprecated +public SizeLimitExceededException(String message)+
#SizeLimitExceededException(String, long, long)
message
- The exceptions detail message.public SizeLimitExceededException(String message, + long actual, + long permitted)+
SizeExceededException
with
+ the specified detail message, and actual and permitted sizes.message
- The detail message.actual
- The actual request size.permitted
- The maximum permitted request size.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadBase.UnknownSizeException.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadBase.UnknownSizeException.html new file mode 100644 index 0000000..36b5744 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadBase.UnknownSizeException.html @@ -0,0 +1,317 @@ + + + + + + +@Deprecated +public static class FileUploadBase.UnknownSizeException +extends FileUploadException+
Constructor and Description | +
---|
UnknownSizeException()
+Deprecated.
+Constructs a
+UnknownSizeException with no
+ detail message. |
+
UnknownSizeException(String message)
+Deprecated.
+Constructs an
+UnknownSizeException with
+ the specified detail message. |
+
getCause, printStackTrace, printStackTrace
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toString
public UnknownSizeException()+
UnknownSizeException
with no
+ detail message.public UnknownSizeException(String message)+
UnknownSizeException
with
+ the specified detail message.message
- The detail message.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadBase.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadBase.html new file mode 100644 index 0000000..3a53b7c --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadBase.html @@ -0,0 +1,1231 @@ + + + + + + +public abstract class FileUploadBase +extends Object+
High level API for processing file uploads.
+ +This class handles multiple files per single HTML widget, sent using
+ multipart/mixed
encoding type, as specified by
+ RFC 1867. Use parseRequest(RequestContext)
to acquire a list of FileItem
s associated with a given HTML
+ widget.
How the data for individual parts is stored is determined by the factory + used to create them; a given part may be in memory, on disk, or somewhere + else.
Modifier and Type | +Class and Description | +
---|---|
static class |
+FileUploadBase.FileSizeLimitExceededException
+Thrown to indicate that A files size exceeds the configured maximum.
+ |
+
static class |
+FileUploadBase.FileUploadIOException
+This exception is thrown for hiding an inner
+
+FileUploadException in an IOException . |
+
static class |
+FileUploadBase.InvalidContentTypeException
+Thrown to indicate that the request is not a multipart request.
+ |
+
static class |
+FileUploadBase.IOFileUploadException
+Thrown to indicate an IOException.
+ |
+
protected static class |
+FileUploadBase.SizeException
+This exception is thrown, if a requests permitted size
+ is exceeded.
+ |
+
static class |
+FileUploadBase.SizeLimitExceededException
+Thrown to indicate that the request size exceeds the configured maximum.
+ |
+
static class |
+FileUploadBase.UnknownSizeException
+Deprecated.
+
+1.2 As of commons-fileupload 1.2, the presence of a
+ content-length header is no longer required.
+ |
+
Modifier and Type | +Field and Description | +
---|---|
static String |
+ATTACHMENT
+Content-disposition value for file attachment.
+ |
+
static String |
+CONTENT_DISPOSITION
+HTTP content disposition header name.
+ |
+
static String |
+CONTENT_LENGTH
+HTTP content length header name.
+ |
+
static String |
+CONTENT_TYPE
+HTTP content type header name.
+ |
+
static String |
+FORM_DATA
+Content-disposition value for form data.
+ |
+
static int |
+MAX_HEADER_SIZE
+Deprecated.
+
+This constant is no longer used. As of commons-fileupload
+ 1.2, the only applicable limit is the total size of a parts headers,
+
+MultipartStream.HEADER_PART_SIZE_MAX . |
+
static String |
+MULTIPART
+Part of HTTP content type header.
+ |
+
static String |
+MULTIPART_FORM_DATA
+HTTP content type header for multipart forms.
+ |
+
static String |
+MULTIPART_MIXED
+HTTP content type header for multiple uploads.
+ |
+
Constructor and Description | +
---|
FileUploadBase() |
+
Modifier and Type | +Method and Description | +
---|---|
protected FileItem |
+createItem(Map<String,String> headers,
+ boolean isFormField)
+Deprecated.
+
+1.2 This method is no longer used in favour of
+ internally created instances of
+FileItem . |
+
protected byte[] |
+getBoundary(String contentType)
+Retrieves the boundary from the
+Content-type header. |
+
protected String |
+getFieldName(FileItemHeaders headers)
+Retrieves the field name from the
+Content-disposition
+ header. |
+
protected String |
+getFieldName(Map<String,String> headers)
+Deprecated.
+
+1.2.1 Use
+getFieldName(FileItemHeaders) . |
+
abstract FileItemFactory |
+getFileItemFactory()
+Returns the factory class used when creating file items.
+ |
+
protected String |
+getFileName(FileItemHeaders headers)
+Retrieves the file name from the
+Content-disposition
+ header. |
+
protected String |
+getFileName(Map<String,String> headers)
+Deprecated.
+
+1.2.1 Use
+getFileName(FileItemHeaders) . |
+
long |
+getFileSizeMax()
+Returns the maximum allowed size of a single uploaded file,
+ as opposed to
+getSizeMax() . |
+
protected String |
+getHeader(Map<String,String> headers,
+ String name)
+Deprecated.
+
+1.2.1 Use
+FileItemHeaders.getHeader(String) . |
+
String |
+getHeaderEncoding()
+Retrieves the character encoding used when reading the headers of an
+ individual part.
+ |
+
FileItemIterator |
+getItemIterator(RequestContext ctx)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
protected FileItemHeaders |
+getParsedHeaders(String headerPart)
+ Parses the
+header-part and returns as key/value
+ pairs. |
+
ProgressListener |
+getProgressListener()
+Returns the progress listener.
+ |
+
long |
+getSizeMax()
+Returns the maximum allowed size of a complete request, as opposed
+ to
+getFileSizeMax() . |
+
static boolean |
+isMultipartContent(HttpServletRequest req)
+Deprecated.
+
+1.1 Use the method on
+ServletFileUpload instead. |
+
static boolean |
+isMultipartContent(RequestContext ctx)
+Utility method that determines whether the request contains multipart
+ content.
+ |
+
protected FileItemHeadersImpl |
+newFileItemHeaders()
+Creates a new instance of
+FileItemHeaders . |
+
protected Map<String,String> |
+parseHeaders(String headerPart)
+Deprecated.
+
+1.2.1 Use
+getParsedHeaders(String) |
+
Map<String,List<FileItem>> |
+parseParameterMap(RequestContext ctx)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
List<FileItem> |
+parseRequest(HttpServletRequest req)
+Deprecated.
+
+1.1 Use
+ServletFileUpload.parseRequest(HttpServletRequest) instead. |
+
List<FileItem> |
+parseRequest(RequestContext ctx)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
abstract void |
+setFileItemFactory(FileItemFactory factory)
+Sets the factory class to use when creating file items.
+ |
+
void |
+setFileSizeMax(long fileSizeMax)
+Sets the maximum allowed size of a single uploaded file,
+ as opposed to
+getSizeMax() . |
+
void |
+setHeaderEncoding(String encoding)
+Specifies the character encoding to be used when reading the headers of
+ individual part.
+ |
+
void |
+setProgressListener(ProgressListener pListener)
+Sets the progress listener.
+ |
+
void |
+setSizeMax(long sizeMax)
+Sets the maximum allowed size of a complete request, as opposed
+ to
+setFileSizeMax(long) . |
+
public static final String CONTENT_TYPE+
public static final String CONTENT_DISPOSITION+
public static final String CONTENT_LENGTH+
public static final String FORM_DATA+
public static final String ATTACHMENT+
public static final String MULTIPART+
public static final String MULTIPART_FORM_DATA+
public static final String MULTIPART_MIXED+
@Deprecated +public static final int MAX_HEADER_SIZE+
MultipartStream.HEADER_PART_SIZE_MAX
.public static final boolean isMultipartContent(RequestContext ctx)+
Utility method that determines whether the request contains multipart + content.
+ +NOTE:This method will be moved to the
+ ServletFileUpload
class after the FileUpload 1.1 release.
+ Unfortunately, since this method is static, it is not possible to
+ provide its replacement until this method is removed.
ctx
- The request context to be evaluated. Must be non-null.true
if the request is multipart;
+ false
otherwise.@Deprecated +public static boolean isMultipartContent(HttpServletRequest req)+
ServletFileUpload
instead.req
- The servlet request to be evaluated. Must be non-null.true
if the request is multipart;
+ false
otherwise.public abstract FileItemFactory getFileItemFactory()+
public abstract void setFileItemFactory(FileItemFactory factory)+
factory
- The factory class for new file items.public long getSizeMax()+
getFileSizeMax()
.setSizeMax(long)
public void setSizeMax(long sizeMax)+
setFileSizeMax(long)
.sizeMax
- The maximum allowed size, in bytes. The default value of
+ -1 indicates, that there is no limit.getSizeMax()
public long getFileSizeMax()+
getSizeMax()
.setFileSizeMax(long)
public void setFileSizeMax(long fileSizeMax)+
getSizeMax()
.fileSizeMax
- Maximum size of a single uploaded file.getFileSizeMax()
public String getHeaderEncoding()+
null
, the request
+ encoding is used. If that is also not specified, or null
,
+ the platform default encoding is used.public void setHeaderEncoding(String encoding)+
null
, the request
+ encoding is used. If that is also not specified, or null
,
+ the platform default encoding is used.encoding
- The encoding used to read part headers.@Deprecated +public List<FileItem> parseRequest(HttpServletRequest req) + throws FileUploadException+
ServletFileUpload.parseRequest(HttpServletRequest)
instead.multipart/form-data
stream.req
- The servlet request to be parsed.FileItem
instances parsed from the
+ request, in the order that they were transmitted.FileUploadException
- if there are problems reading/parsing
+ the request or storing files.public FileItemIterator getItemIterator(RequestContext ctx) + throws FileUploadException, + IOException+
multipart/form-data
stream.ctx
- The context for the request to be parsed.FileItemStream
+ parsed from the request, in the order that they were
+ transmitted.FileUploadException
- if there are problems reading/parsing
+ the request or storing files.IOException
- An I/O error occurred. This may be a network
+ error while communicating with the client or a problem while
+ storing the uploaded content.public List<FileItem> parseRequest(RequestContext ctx) + throws FileUploadException+
multipart/form-data
stream.ctx
- The context for the request to be parsed.FileItem
instances parsed from the
+ request, in the order that they were transmitted.FileUploadException
- if there are problems reading/parsing
+ the request or storing files.public Map<String,List<FileItem>> parseParameterMap(RequestContext ctx) + throws FileUploadException+
multipart/form-data
stream.ctx
- The context for the request to be parsed.FileItem
instances parsed from the request.FileUploadException
- if there are problems reading/parsing
+ the request or storing files.protected byte[] getBoundary(String contentType)+
Content-type
header.contentType
- The value of the content type header from which to
+ extract the boundary value.@Deprecated +protected String getFileName(Map<String,String> headers)+
getFileName(FileItemHeaders)
.Content-disposition
+ header.headers
- A Map
containing the HTTP request headers.encapsulation
.protected String getFileName(FileItemHeaders headers)+
Content-disposition
+ header.headers
- The HTTP headers object.encapsulation
.protected String getFieldName(FileItemHeaders headers)+
Content-disposition
+ header.headers
- A Map
containing the HTTP request headers.encapsulation
.@Deprecated +protected String getFieldName(Map<String,String> headers)+
getFieldName(FileItemHeaders)
.Content-disposition
+ header.headers
- A Map
containing the HTTP request headers.encapsulation
.@Deprecated +protected FileItem createItem(Map<String,String> headers, + boolean isFormField) + throws FileUploadException+
FileItem
.FileItem
instance.headers
- A Map
containing the HTTP request
+ headers.isFormField
- Whether or not this item is a form field, as
+ opposed to a file.FileItem
instance.FileUploadException
- if an error occurs.protected FileItemHeaders getParsedHeaders(String headerPart)+
Parses the header-part
and returns as key/value
+ pairs.
+
+
If there are multiple headers of the same names, the name + will map to a comma-separated list containing the values.
headerPart
- The header-part
of the current
+ encapsulation
.Map
containing the parsed HTTP request headers.protected FileItemHeadersImpl newFileItemHeaders()+
FileItemHeaders
.@Deprecated +protected Map<String,String> parseHeaders(String headerPart)+
getParsedHeaders(String)
Parses the header-part
and returns as key/value
+ pairs.
+
+
If there are multiple headers of the same names, the name + will map to a comma-separated list containing the values.
headerPart
- The header-part
of the current
+ encapsulation
.Map
containing the parsed HTTP request headers.@Deprecated +protected final String getHeader(Map<String,String> headers, + String name)+
FileItemHeaders.getHeader(String)
.headers
- A Map
containing the HTTP request headers.name
- The name of the header to return.public ProgressListener getProgressListener()+
public void setProgressListener(ProgressListener pListener)+
pListener
- The progress listener, if any. Defaults to null.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadException.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadException.html new file mode 100644 index 0000000..a70aa62 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/FileUploadException.html @@ -0,0 +1,402 @@ + + + + + + +public class FileUploadException +extends Exception+
Constructor and Description | +
---|
FileUploadException()
+Constructs a new
+FileUploadException without message. |
+
FileUploadException(String msg)
+Constructs a new
+FileUploadException with specified detail
+ message. |
+
FileUploadException(String msg,
+ Throwable cause)
+Creates a new
+FileUploadException with the given
+ detail message and cause. |
+
Modifier and Type | +Method and Description | +
---|---|
Throwable |
+getCause() |
+
void |
+printStackTrace(PrintStream stream)
+Prints this throwable and its backtrace to the specified print stream.
+ |
+
void |
+printStackTrace(PrintWriter writer)
+Prints this throwable and its backtrace to the specified
+ print writer.
+ |
+
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toString
public FileUploadException()+
FileUploadException
without message.public FileUploadException(String msg)+
FileUploadException
with specified detail
+ message.msg
- the error message.public void printStackTrace(PrintStream stream)+
printStackTrace
in class Throwable
stream
- PrintStream
to use for outputpublic void printStackTrace(PrintWriter writer)+
printStackTrace
in class Throwable
writer
- PrintWriter
to use for outputCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/InvalidFileNameException.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/InvalidFileNameException.html new file mode 100644 index 0000000..f5e7b25 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/InvalidFileNameException.html @@ -0,0 +1,329 @@ + + + + + + +public class InvalidFileNameException +extends RuntimeException+
Constructor and Description | +
---|
InvalidFileNameException(String pName,
+ String pMessage)
+Creates a new instance.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
String |
+getName()
+Returns the invalid file name.
+ |
+
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/MultipartStream.IllegalBoundaryException.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/MultipartStream.IllegalBoundaryException.html new file mode 100644 index 0000000..764bd5e --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/MultipartStream.IllegalBoundaryException.html @@ -0,0 +1,299 @@ + + + + + + +public static class MultipartStream.IllegalBoundaryException +extends IOException+
Constructor and Description | +
---|
IllegalBoundaryException()
+Constructs an
+IllegalBoundaryException with no
+ detail message. |
+
IllegalBoundaryException(String message)
+Constructs an
+IllegalBoundaryException with
+ the specified detail message. |
+
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public IllegalBoundaryException()+
IllegalBoundaryException
with no
+ detail message.public IllegalBoundaryException(String message)+
IllegalBoundaryException
with
+ the specified detail message.message
- The detail message.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/MultipartStream.ItemInputStream.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/MultipartStream.ItemInputStream.html new file mode 100644 index 0000000..7632645 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/MultipartStream.ItemInputStream.html @@ -0,0 +1,455 @@ + + + + + + +public class MultipartStream.ItemInputStream +extends InputStream +implements Closeable+
InputStream
for reading an items contents.Modifier and Type | +Method and Description | +
---|---|
int |
+available()
+Returns the number of bytes, which are currently
+ available, without blocking.
+ |
+
void |
+close()
+Closes the input stream.
+ |
+
void |
+close(boolean pCloseUnderlying)
+Closes the input stream.
+ |
+
long |
+getBytesRead()
+Returns the number of bytes, which have been read
+ by the stream.
+ |
+
boolean |
+isClosed()
+Returns, whether the stream is closed.
+ |
+
int |
+read()
+Returns the next byte in the stream.
+ |
+
int |
+read(byte[] b,
+ int off,
+ int len)
+Reads bytes into the given buffer.
+ |
+
long |
+skip(long bytes)
+Skips the given number of bytes.
+ |
+
mark, markSupported, read, reset
public long getBytesRead()+
public int available() + throws IOException+
available
in class InputStream
IOException
- An I/O error occurs.public int read() + throws IOException+
read
in class InputStream
IOException
- An I/O error occurred.public int read(byte[] b, + int off, + int len) + throws IOException+
read
in class InputStream
b
- The destination buffer, where to write to.off
- Offset of the first byte in the buffer.len
- Maximum number of bytes to read.IOException
- An I/O error occurred.public void close() + throws IOException+
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
- An I/O error occurred.public void close(boolean pCloseUnderlying) + throws IOException+
pCloseUnderlying
- Whether to close the underlying stream
+ (hard close)IOException
- An I/O error occurred.public long skip(long bytes) + throws IOException+
skip
in class InputStream
bytes
- Number of bytes to skip.IOException
- An I/O error occurred.public boolean isClosed()+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/MultipartStream.MalformedStreamException.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/MultipartStream.MalformedStreamException.html new file mode 100644 index 0000000..9e48684 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/MultipartStream.MalformedStreamException.html @@ -0,0 +1,300 @@ + + + + + + +public static class MultipartStream.MalformedStreamException +extends IOException+
Constructor and Description | +
---|
MalformedStreamException()
+Constructs a
+MalformedStreamException with no
+ detail message. |
+
MalformedStreamException(String message)
+Constructs an
+MalformedStreamException with
+ the specified detail message. |
+
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public MalformedStreamException()+
MalformedStreamException
with no
+ detail message.public MalformedStreamException(String message)+
MalformedStreamException
with
+ the specified detail message.message
- The detail message.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/MultipartStream.ProgressNotifier.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/MultipartStream.ProgressNotifier.html new file mode 100644 index 0000000..1a6710d --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/MultipartStream.ProgressNotifier.html @@ -0,0 +1,204 @@ + + + + + + +public static class MultipartStream.ProgressNotifier +extends Object+
ProgressListener
.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/MultipartStream.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/MultipartStream.html new file mode 100644 index 0000000..c1fc45d --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/MultipartStream.html @@ -0,0 +1,1006 @@ + + + + + + +public class MultipartStream +extends Object+
Low level API for processing file uploads. + +
This class can be used to process data streams conforming to MIME + 'multipart' format as defined in + RFC 1867. Arbitrarily + large amounts of data in the stream can be processed under constant + memory usage. + +
The format of the stream is defined in the following way:
+
+
+ multipart-body := preamble 1*encapsulation close-delimiter epilogue
+
+
+ encapsulation := delimiter body CRLF
+ delimiter := "--" boundary CRLF
+ close-delimiter := "--" boundary "--"
+ preamble := <ignore>
+ epilogue := <ignore>
+ body := header-part CRLF body-part
+ header-part := 1*header CRLF
+ header := header-name ":" header-value
+ header-name := <printable ascii characters except ":">
+ header-value := <any ascii characters except CR & LF>
+ body-data := <arbitrary data>
+
Note that body-data can contain another mulipart entity. There
+ is limited support for single pass processing of such nested
+ streams. The nested stream is required to have a
+ boundary token of the same length as the parent stream (see setBoundary(byte[])
).
+
+
Here is an example of usage of this class.
+
+
+ try { + MultipartStream multipartStream = new MultipartStream(input, boundary); + boolean nextPart = multipartStream.skipPreamble(); + OutputStream output; + while(nextPart) { + String header = multipartStream.readHeaders(); + // process headers + // create some output stream + multipartStream.readBodyData(output); + nextPart = multipartStream.readBoundary(); + } + } catch(MultipartStream.MalformedStreamException e) { + // the stream failed to follow required syntax + } catch(IOException e) { + // a read or write error occurred + } +
Modifier and Type | +Class and Description | +
---|---|
static class |
+MultipartStream.IllegalBoundaryException
+Thrown upon attempt of setting an invalid boundary token.
+ |
+
class |
+MultipartStream.ItemInputStream
+An
+InputStream for reading an items contents. |
+
static class |
+MultipartStream.MalformedStreamException
+Thrown to indicate that the input stream fails to follow the
+ required syntax.
+ |
+
static class |
+MultipartStream.ProgressNotifier
+Internal class, which is used to invoke the
+
+ProgressListener . |
+
Modifier and Type | +Field and Description | +
---|---|
protected static byte[] |
+BOUNDARY_PREFIX
+A byte sequence that precedes a boundary (
+CRLF-- ). |
+
static byte |
+CR
+The Carriage Return ASCII character value.
+ |
+
static byte |
+DASH
+The dash (-) ASCII character value.
+ |
+
protected static int |
+DEFAULT_BUFSIZE
+The default length of the buffer used for processing a request.
+ |
+
protected static byte[] |
+FIELD_SEPARATOR
+A byte sequence that that follows a delimiter that will be
+ followed by an encapsulation (
+CRLF ). |
+
static int |
+HEADER_PART_SIZE_MAX
+The maximum length of
+header-part that will be
+ processed (10 kilobytes = 10240 bytes.). |
+
protected static byte[] |
+HEADER_SEPARATOR
+A byte sequence that marks the end of
+header-part
+ (CRLFCRLF ). |
+
static byte |
+LF
+The Line Feed ASCII character value.
+ |
+
protected static byte[] |
+STREAM_TERMINATOR
+A byte sequence that that follows a delimiter of the last
+ encapsulation in the stream (
+-- ). |
+
Constructor and Description | +
---|
MultipartStream()
+Deprecated.
+
+
+ |
+
MultipartStream(InputStream input,
+ byte[] boundary)
+Deprecated.
+
+
+ |
+
MultipartStream(InputStream input,
+ byte[] boundary,
+ int bufSize)
+Deprecated.
+
+
+ |
+
MultipartStream(InputStream input,
+ byte[] boundary,
+ int bufSize,
+ MultipartStream.ProgressNotifier pNotifier)
+ Constructs a
+MultipartStream with a custom size buffer. |
+
Modifier and Type | +Method and Description | +
---|---|
static boolean |
+arrayequals(byte[] a,
+ byte[] b,
+ int count)
+Compares
+count first bytes in the arrays
+ a and b . |
+
int |
+discardBodyData()
+ Reads
+body-data from the current
+ encapsulation and discards it. |
+
protected int |
+findByte(byte value,
+ int pos)
+Searches for a byte of specified value in the
+buffer ,
+ starting at the specified position . |
+
protected int |
+findSeparator()
+Searches for the
+boundary in the buffer
+ region delimited by head and tail . |
+
String |
+getHeaderEncoding()
+Retrieves the character encoding used when reading the headers of an
+ individual part.
+ |
+
int |
+readBodyData(OutputStream output)
+Reads
+body-data from the current
+ encapsulation and writes its contents into the
+ output Stream . |
+
boolean |
+readBoundary()
+Skips a
+boundary token, and checks whether more
+ encapsulations are contained in the stream. |
+
byte |
+readByte()
+Reads a byte from the
+buffer , and refills it as
+ necessary. |
+
String |
+readHeaders()
+Reads the
+header-part of the current
+ encapsulation . |
+
void |
+setBoundary(byte[] boundary)
+Changes the boundary token used for partitioning the stream.
+ |
+
void |
+setHeaderEncoding(String encoding)
+Specifies the character encoding to be used when reading the headers of
+ individual parts.
+ |
+
boolean |
+skipPreamble()
+Finds the beginning of the first
+encapsulation . |
+
public static final byte CR+
public static final byte LF+
public static final byte DASH+
public static final int HEADER_PART_SIZE_MAX+
header-part
that will be
+ processed (10 kilobytes = 10240 bytes.).protected static final int DEFAULT_BUFSIZE+
protected static final byte[] HEADER_SEPARATOR+
header-part
+ (CRLFCRLF
).protected static final byte[] FIELD_SEPARATOR+
CRLF
).protected static final byte[] STREAM_TERMINATOR+
--
).protected static final byte[] BOUNDARY_PREFIX+
CRLF--
).@Deprecated +public MultipartStream()+
MultipartStream(InputStream, byte[], int,
+ ProgressNotifier)
@Deprecated +public MultipartStream(InputStream input, + byte[] boundary, + int bufSize)+
MultipartStream(InputStream, byte[], int,
+ ProgressNotifier)
. Constructs a MultipartStream
with a custom size buffer
+ and no progress notifier.
+
+
Note that the buffer must be at least big enough to contain the + boundary string, plus 4 characters for CR/LF and double dash, plus at + least one byte of data. Too small a buffer size setting will degrade + performance.
input
- The InputStream
to serve as a data source.boundary
- The token used for dividing the stream into
+ encapsulations
.bufSize
- The size of the buffer to be used, in bytes.public MultipartStream(InputStream input, + byte[] boundary, + int bufSize, + MultipartStream.ProgressNotifier pNotifier)+
Constructs a MultipartStream
with a custom size buffer.
+
+
Note that the buffer must be at least big enough to contain the + boundary string, plus 4 characters for CR/LF and double dash, plus at + least one byte of data. Too small a buffer size setting will degrade + performance.
input
- The InputStream
to serve as a data source.boundary
- The token used for dividing the stream into
+ encapsulations
.bufSize
- The size of the buffer to be used, in bytes.pNotifier
- The notifier, which is used for calling the
+ progress listener, if any.IllegalArgumentException
- If the buffer size is too small@Deprecated +public MultipartStream(InputStream input, + byte[] boundary)+
MultipartStream(InputStream, byte[], int,
+ ProgressNotifier)
. Constructs a MultipartStream
with a default size buffer.
input
- The InputStream
to serve as a data source.boundary
- The token used for dividing the stream into
+ encapsulations
.public String getHeaderEncoding()+
null
, the platform
+ default encoding is used.public void setHeaderEncoding(String encoding)+
null
, the platform
+ default encoding is used.encoding
- The encoding used to read part headers.public byte readByte() + throws IOException+
buffer
, and refills it as
+ necessary.IOException
- if there is no more data available.public boolean readBoundary() + throws FileUploadBase.FileUploadIOException, + MultipartStream.MalformedStreamException+
boundary
token, and checks whether more
+ encapsulations
are contained in the stream.true
if there are more encapsulations in
+ this stream; false
otherwise.FileUploadBase.FileUploadIOException
- if the bytes read from the stream exceeded the size limitsMultipartStream.MalformedStreamException
- if the stream ends unexpectedly or
+ fails to follow required syntax.public void setBoundary(byte[] boundary) + throws MultipartStream.IllegalBoundaryException+
Changes the boundary token used for partitioning the stream. + +
This method allows single pass processing of nested multipart + streams. + +
The boundary token of the nested stream is required
+ to be of the same length as the boundary token in parent stream.
+
+
Restoring the parent stream boundary token after processing of a + nested stream is left to the application.
boundary
- The boundary to be used for parsing of the nested
+ stream.MultipartStream.IllegalBoundaryException
- if the boundary
+ has a different length than the one
+ being currently parsed.public String readHeaders() + throws FileUploadBase.FileUploadIOException, + MultipartStream.MalformedStreamException+
Reads the header-part
of the current
+ encapsulation
.
+
+
Headers are returned verbatim to the input stream, including the
+ trailing CRLF
marker. Parsing is left to the
+ application.
+
+
TODO allow limiting maximum header size to + protect against abuse.
header-part
of the current encapsulation.FileUploadBase.FileUploadIOException
- if the bytes read from the stream exceeded the size limits.MultipartStream.MalformedStreamException
- if the stream ends unexpectedly.public int readBodyData(OutputStream output) + throws MultipartStream.MalformedStreamException, + IOException+
Reads body-data
from the current
+ encapsulation
and writes its contents into the
+ output Stream
.
+
+
Arbitrary large amounts of data can be processed by this
+ method using a constant size buffer. (see constructor
).
output
- The Stream
to write data into. May
+ be null, in which case this method is equivalent
+ to discardBodyData()
.MultipartStream.MalformedStreamException
- if the stream ends unexpectedly.IOException
- if an i/o error occurs.public int discardBodyData() + throws MultipartStream.MalformedStreamException, + IOException+
Reads body-data
from the current
+ encapsulation
and discards it.
+
+
Use this method to skip encapsulations you don't need or don't + understand.
MultipartStream.MalformedStreamException
- if the stream ends unexpectedly.IOException
- if an i/o error occurs.public boolean skipPreamble() + throws IOException+
encapsulation
.true
if an encapsulation
was found in
+ the stream.IOException
- if an i/o error occurs.public static boolean arrayequals(byte[] a, + byte[] b, + int count)+
count
first bytes in the arrays
+ a
and b
.a
- The first array to compare.b
- The second array to compare.count
- How many bytes should be compared.true
if count
first bytes in arrays
+ a
and b
are equal.protected int findByte(byte value, + int pos)+
buffer
,
+ starting at the specified position
.value
- The value to find.pos
- The starting position for searching.buffer
, or -1
if not found.protected int findSeparator()+
boundary
in the buffer
+ region delimited by head
and tail
.buffer
, or -1
if
+ not found.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/ParameterParser.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/ParameterParser.html new file mode 100644 index 0000000..3f777ad --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/ParameterParser.html @@ -0,0 +1,438 @@ + + + + + + +public class ParameterParser +extends Object+
+ param1 = value; param2 = "anything goes; really"; param3
+
Constructor and Description | +
---|
ParameterParser()
+Default ParameterParser constructor.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+isLowerCaseNames()
+Returns true if parameter names are to be converted to lower
+ case when name/value pairs are parsed.
+ |
+
Map<String,String> |
+parse(char[] charArray,
+ char separator)
+Extracts a map of name/value pairs from the given array of
+ characters.
+ |
+
Map<String,String> |
+parse(char[] charArray,
+ int offset,
+ int length,
+ char separator)
+Extracts a map of name/value pairs from the given array of
+ characters.
+ |
+
Map<String,String> |
+parse(String str,
+ char separator)
+Extracts a map of name/value pairs from the given string.
+ |
+
Map<String,String> |
+parse(String str,
+ char[] separators)
+Extracts a map of name/value pairs from the given string.
+ |
+
void |
+setLowerCaseNames(boolean b)
+Sets the flag if parameter names are to be converted to lower case when
+ name/value pairs are parsed.
+ |
+
public ParameterParser()+
public boolean isLowerCaseNames()+
public void setLowerCaseNames(boolean b)+
b
- true if parameter names are to be
+ converted to lower case when name/value pairs are parsed.
+ false otherwise.public Map<String,String> parse(String str, + char[] separators)+
str
- the string that contains a sequence of name/value pairsseparators
- the name/value pairs separatorspublic Map<String,String> parse(String str, + char separator)+
str
- the string that contains a sequence of name/value pairsseparator
- the name/value pairs separatorpublic Map<String,String> parse(char[] charArray, + char separator)+
charArray
- the array of characters that contains a sequence of
+ name/value pairsseparator
- the name/value pairs separatorpublic Map<String,String> parse(char[] charArray, + int offset, + int length, + char separator)+
charArray
- the array of characters that contains a sequence of
+ name/value pairsoffset
- - the initial offset.length
- - the length.separator
- the name/value pairs separatorCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/ProgressListener.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/ProgressListener.html new file mode 100644 index 0000000..2d71a5e --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/ProgressListener.html @@ -0,0 +1,244 @@ + + + + + + +public interface ProgressListener
+ProgressListener
may be used to display a progress bar
+ or do stuff like that.Modifier and Type | +Method and Description | +
---|---|
void |
+update(long pBytesRead,
+ long pContentLength,
+ int pItems)
+Updates the listeners status information.
+ |
+
void update(long pBytesRead, + long pContentLength, + int pItems)+
pBytesRead
- The total number of bytes, which have been read
+ so far.pContentLength
- The total number of bytes, which are being
+ read. May be -1, if this number is unknown.pItems
- The number of the field, which is currently being
+ read. (0 = no item so far, 1 = first item is being read, ...)Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/RequestContext.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/RequestContext.html new file mode 100644 index 0000000..dac2a58 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/RequestContext.html @@ -0,0 +1,313 @@ + + + + + + +public interface RequestContext
+Abstracts access to the request information needed for file uploads. This + interface should be implemented for each type of request that may be + handled by FileUpload, such as servlets and portlets.
Modifier and Type | +Method and Description | +
---|---|
String |
+getCharacterEncoding()
+Retrieve the character encoding for the request.
+ |
+
int |
+getContentLength()
+Deprecated.
+
+1.3 Use
+UploadContext.contentLength() instead |
+
String |
+getContentType()
+Retrieve the content type of the request.
+ |
+
InputStream |
+getInputStream()
+Retrieve the input stream for the request.
+ |
+
String getCharacterEncoding()+
String getContentType()+
@Deprecated +int getContentLength()+
UploadContext.contentLength()
insteadInputStream getInputStream() + throws IOException+
IOException
- if a problem occurs.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/UploadContext.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/UploadContext.html new file mode 100644 index 0000000..7eff9d8 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/UploadContext.html @@ -0,0 +1,257 @@ + + + + + + +public interface UploadContext +extends RequestContext+
RequestContext
.
+
+ The reason of introducing this new interface is just for backward compatibility
+ and it might vanish for a refactored 2.x version moving the new method into
+ RequestContext again.Modifier and Type | +Method and Description | +
---|---|
long |
+contentLength()
+Retrieve the content length of the request.
+ |
+
getCharacterEncoding, getContentLength, getContentType, getInputStream
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/DefaultFileItem.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/DefaultFileItem.html new file mode 100644 index 0000000..9e94466 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/DefaultFileItem.html @@ -0,0 +1,125 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/DefaultFileItemFactory.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/DefaultFileItemFactory.html new file mode 100644 index 0000000..4b9d919 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/DefaultFileItemFactory.html @@ -0,0 +1,171 @@ + + + + + + +Package | +Description | +
---|---|
org.apache.commons.fileupload | +
+
+ A component for handling HTML file uploads as specified by
+ RFC 1867.
+ |
+
Constructor and Description | +
---|
DiskFileUpload(DefaultFileItemFactory fileItemFactory)
+Deprecated.
+
+1.1 Use
+FileUpload instead. |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/DiskFileUpload.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/DiskFileUpload.html new file mode 100644 index 0000000..84e7c57 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/DiskFileUpload.html @@ -0,0 +1,125 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileItem.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileItem.html new file mode 100644 index 0000000..c6bb83e --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileItem.html @@ -0,0 +1,379 @@ + + + + + + +Package | +Description | +
---|---|
org.apache.commons.fileupload | +
+
+ A component for handling HTML file uploads as specified by
+ RFC 1867.
+ |
+
org.apache.commons.fileupload.disk | +
+
+ A disk-based implementation of the
+
+FileItem
+ interface. |
+
org.apache.commons.fileupload.portlet | +
+
+ An implementation of
+
+FileUpload
+ for use in portlets conforming to JSR 168. |
+
org.apache.commons.fileupload.servlet | +
+
+ An implementation of
+
+FileUpload
+ for use in servlets conforming to JSR 53. |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+DefaultFileItem
+Deprecated.
+
+1.1 Use
+DiskFileItem instead. |
+
Modifier and Type | +Method and Description | +
---|---|
protected FileItem |
+FileUploadBase.createItem(Map<String,String> headers,
+ boolean isFormField)
+Deprecated.
+
+1.2 This method is no longer used in favour of
+ internally created instances of
+FileItem . |
+
FileItem |
+FileItemFactory.createItem(String fieldName,
+ String contentType,
+ boolean isFormField,
+ String fileName)
+Create a new
+FileItem instance from the supplied parameters and
+ any local factory configuration. |
+
FileItem |
+DefaultFileItemFactory.createItem(String fieldName,
+ String contentType,
+ boolean isFormField,
+ String fileName)
+Deprecated.
+
+1.1 Use
+DiskFileItemFactory instead. |
+
Modifier and Type | +Method and Description | +
---|---|
Map<String,List<FileItem>> |
+FileUploadBase.parseParameterMap(RequestContext ctx)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
List<FileItem> |
+FileUploadBase.parseRequest(HttpServletRequest req)
+Deprecated.
+
+1.1 Use
+ServletFileUpload.parseRequest(HttpServletRequest) instead. |
+
List<FileItem> |
+DiskFileUpload.parseRequest(HttpServletRequest req,
+ int sizeThreshold,
+ long sizeMax,
+ String path)
+Deprecated.
+
+1.1 Use
+ServletFileUpload instead. |
+
List<FileItem> |
+FileUploadBase.parseRequest(RequestContext ctx)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+DiskFileItem
+ The default implementation of the
+
+FileItem interface. |
+
Modifier and Type | +Method and Description | +
---|---|
FileItem |
+DiskFileItemFactory.createItem(String fieldName,
+ String contentType,
+ boolean isFormField,
+ String fileName)
+Create a new
+DiskFileItem
+ instance from the supplied parameters and the local factory
+ configuration. |
+
Modifier and Type | +Method and Description | +
---|---|
Map<String,List<FileItem>> |
+PortletFileUpload.parseParameterMap(javax.portlet.ActionRequest request)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
List<FileItem> |
+PortletFileUpload.parseRequest(javax.portlet.ActionRequest request)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
Modifier and Type | +Method and Description | +
---|---|
Map<String,List<FileItem>> |
+ServletFileUpload.parseParameterMap(HttpServletRequest request)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
List<FileItem> |
+ServletFileUpload.parseRequest(HttpServletRequest request)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileItemFactory.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileItemFactory.html new file mode 100644 index 0000000..6a11289 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileItemFactory.html @@ -0,0 +1,331 @@ + + + + + + +Package | +Description | +
---|---|
org.apache.commons.fileupload | +
+
+ A component for handling HTML file uploads as specified by
+ RFC 1867.
+ |
+
org.apache.commons.fileupload.disk | +
+
+ A disk-based implementation of the
+
+FileItem
+ interface. |
+
org.apache.commons.fileupload.portlet | +
+
+ An implementation of
+
+FileUpload
+ for use in portlets conforming to JSR 168. |
+
org.apache.commons.fileupload.servlet | +
+
+ An implementation of
+
+FileUpload
+ for use in servlets conforming to JSR 53. |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+DefaultFileItemFactory
+Deprecated.
+
+1.1 Use
+DiskFileItemFactory instead. |
+
Modifier and Type | +Method and Description | +
---|---|
abstract FileItemFactory |
+FileUploadBase.getFileItemFactory()
+Returns the factory class used when creating file items.
+ |
+
FileItemFactory |
+FileUpload.getFileItemFactory()
+Returns the factory class used when creating file items.
+ |
+
FileItemFactory |
+DiskFileUpload.getFileItemFactory()
+Deprecated.
+
+1.1 Use
+FileUpload instead. |
+
Modifier and Type | +Method and Description | +
---|---|
abstract void |
+FileUploadBase.setFileItemFactory(FileItemFactory factory)
+Sets the factory class to use when creating file items.
+ |
+
void |
+FileUpload.setFileItemFactory(FileItemFactory factory)
+Sets the factory class to use when creating file items.
+ |
+
void |
+DiskFileUpload.setFileItemFactory(FileItemFactory factory)
+Deprecated.
+
+1.1 Use
+FileUpload instead. |
+
Constructor and Description | +
---|
FileUpload(FileItemFactory fileItemFactory)
+Constructs an instance of this class which uses the supplied factory to
+ create
+FileItem instances. |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+DiskFileItemFactory
+The default
+FileItemFactory
+ implementation. |
+
Constructor and Description | +
---|
PortletFileUpload(FileItemFactory fileItemFactory)
+Constructs an instance of this class which uses the supplied factory to
+ create
+FileItem instances. |
+
Constructor and Description | +
---|
ServletFileUpload(FileItemFactory fileItemFactory)
+Constructs an instance of this class which uses the supplied factory to
+ create
+FileItem instances. |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileItemHeaders.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileItemHeaders.html new file mode 100644 index 0000000..86aeffd --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileItemHeaders.html @@ -0,0 +1,279 @@ + + + + + + +Package | +Description | +
---|---|
org.apache.commons.fileupload | +
+
+ A component for handling HTML file uploads as specified by
+ RFC 1867.
+ |
+
org.apache.commons.fileupload.disk | +
+
+ A disk-based implementation of the
+
+FileItem
+ interface. |
+
org.apache.commons.fileupload.util | +
+ This package contains various IO related utility classes
+ or methods, which are basically reusable and not necessarily
+ restricted to the scope of a file upload.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
FileItemHeaders |
+FileItemHeadersSupport.getHeaders()
+Returns the collection of headers defined locally within this item.
+ |
+
protected FileItemHeaders |
+FileUploadBase.getParsedHeaders(String headerPart)
+ Parses the
+header-part and returns as key/value
+ pairs. |
+
Modifier and Type | +Method and Description | +
---|---|
protected String |
+FileUploadBase.getFieldName(FileItemHeaders headers)
+Retrieves the field name from the
+Content-disposition
+ header. |
+
protected String |
+FileUploadBase.getFileName(FileItemHeaders headers)
+Retrieves the file name from the
+Content-disposition
+ header. |
+
void |
+FileItemHeadersSupport.setHeaders(FileItemHeaders headers)
+Sets the headers read from within an item.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
FileItemHeaders |
+DiskFileItem.getHeaders()
+Returns the file item headers.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+DiskFileItem.setHeaders(FileItemHeaders pHeaders)
+Sets the file item headers.
+ |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+FileItemHeadersImpl
+Default implementation of the
+FileItemHeaders interface. |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileItemHeadersSupport.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileItemHeadersSupport.html new file mode 100644 index 0000000..1ee1739 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileItemHeadersSupport.html @@ -0,0 +1,226 @@ + + + + + + +Package | +Description | +
---|---|
org.apache.commons.fileupload | +
+
+ A component for handling HTML file uploads as specified by
+ RFC 1867.
+ |
+
org.apache.commons.fileupload.disk | +
+
+ A disk-based implementation of the
+
+FileItem
+ interface. |
+
Modifier and Type | +Interface and Description | +
---|---|
interface |
+FileItem
+ This class represents a file or form item that was received within a
+
+multipart/form-data POST request. |
+
interface |
+FileItemStream
+ This interface provides access to a file or form item that was
+ received within a
+multipart/form-data POST request. |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+DefaultFileItem
+Deprecated.
+
+1.1 Use
+DiskFileItem instead. |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+DiskFileItem
+ The default implementation of the
+
+FileItem interface. |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileItemIterator.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileItemIterator.html new file mode 100644 index 0000000..85a7f9e --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileItemIterator.html @@ -0,0 +1,232 @@ + + + + + + +Package | +Description | +
---|---|
org.apache.commons.fileupload | +
+
+ A component for handling HTML file uploads as specified by
+ RFC 1867.
+ |
+
org.apache.commons.fileupload.portlet | +
+
+ An implementation of
+
+FileUpload
+ for use in portlets conforming to JSR 168. |
+
org.apache.commons.fileupload.servlet | +
+
+ An implementation of
+
+FileUpload
+ for use in servlets conforming to JSR 53. |
+
Modifier and Type | +Method and Description | +
---|---|
FileItemIterator |
+FileUploadBase.getItemIterator(RequestContext ctx)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
Modifier and Type | +Method and Description | +
---|---|
FileItemIterator |
+PortletFileUpload.getItemIterator(javax.portlet.ActionRequest request)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
Modifier and Type | +Method and Description | +
---|---|
FileItemIterator |
+ServletFileUpload.getItemIterator(HttpServletRequest request)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileItemStream.ItemSkippedException.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileItemStream.ItemSkippedException.html new file mode 100644 index 0000000..8e56721 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileItemStream.ItemSkippedException.html @@ -0,0 +1,125 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileItemStream.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileItemStream.html new file mode 100644 index 0000000..f10948b --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileItemStream.html @@ -0,0 +1,171 @@ + + + + + + +Package | +Description | +
---|---|
org.apache.commons.fileupload | +
+
+ A component for handling HTML file uploads as specified by
+ RFC 1867.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
FileItemStream |
+FileItemIterator.next()
+Returns the next available
+FileItemStream . |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUpload.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUpload.html new file mode 100644 index 0000000..c8da3ec --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUpload.html @@ -0,0 +1,201 @@ + + + + + + +Package | +Description | +
---|---|
org.apache.commons.fileupload.portlet | +
+
+ An implementation of
+
+FileUpload
+ for use in portlets conforming to JSR 168. |
+
org.apache.commons.fileupload.servlet | +
+
+ An implementation of
+
+FileUpload
+ for use in servlets conforming to JSR 53. |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+PortletFileUpload
+High level API for processing file uploads.
+ |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+ServletFileUpload
+High level API for processing file uploads.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadBase.FileSizeLimitExceededException.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadBase.FileSizeLimitExceededException.html new file mode 100644 index 0000000..5cb28c8 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadBase.FileSizeLimitExceededException.html @@ -0,0 +1,125 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadBase.FileUploadIOException.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadBase.FileUploadIOException.html new file mode 100644 index 0000000..0d195cd --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadBase.FileUploadIOException.html @@ -0,0 +1,179 @@ + + + + + + +Package | +Description | +
---|---|
org.apache.commons.fileupload | +
+
+ A component for handling HTML file uploads as specified by
+ RFC 1867.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+MultipartStream.readBoundary()
+Skips a
+boundary token, and checks whether more
+ encapsulations are contained in the stream. |
+
String |
+MultipartStream.readHeaders()
+Reads the
+header-part of the current
+ encapsulation . |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadBase.IOFileUploadException.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadBase.IOFileUploadException.html new file mode 100644 index 0000000..d7e9a7f --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadBase.IOFileUploadException.html @@ -0,0 +1,125 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadBase.InvalidContentTypeException.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadBase.InvalidContentTypeException.html new file mode 100644 index 0000000..de9d29f --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadBase.InvalidContentTypeException.html @@ -0,0 +1,125 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadBase.SizeException.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadBase.SizeException.html new file mode 100644 index 0000000..b8db5b9 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadBase.SizeException.html @@ -0,0 +1,177 @@ + + + + + + +Package | +Description | +
---|---|
org.apache.commons.fileupload | +
+
+ A component for handling HTML file uploads as specified by
+ RFC 1867.
+ |
+
Modifier and Type | +Class and Description | +
---|---|
static class |
+FileUploadBase.FileSizeLimitExceededException
+Thrown to indicate that A files size exceeds the configured maximum.
+ |
+
static class |
+FileUploadBase.SizeLimitExceededException
+Thrown to indicate that the request size exceeds the configured maximum.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadBase.SizeLimitExceededException.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadBase.SizeLimitExceededException.html new file mode 100644 index 0000000..67235f9 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadBase.SizeLimitExceededException.html @@ -0,0 +1,125 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadBase.UnknownSizeException.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadBase.UnknownSizeException.html new file mode 100644 index 0000000..9e2cbe7 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadBase.UnknownSizeException.html @@ -0,0 +1,125 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadBase.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadBase.html new file mode 100644 index 0000000..f0e635f --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadBase.html @@ -0,0 +1,238 @@ + + + + + + +Package | +Description | +
---|---|
org.apache.commons.fileupload | +
+
+ A component for handling HTML file uploads as specified by
+ RFC 1867.
+ |
+
org.apache.commons.fileupload.portlet | +
+
+ An implementation of
+
+FileUpload
+ for use in portlets conforming to JSR 168. |
+
org.apache.commons.fileupload.servlet | +
+
+ An implementation of
+
+FileUpload
+ for use in servlets conforming to JSR 53. |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+DiskFileUpload
+Deprecated.
+
+1.1 Use
+ServletFileUpload together with
+ DiskFileItemFactory instead. |
+
class |
+FileUpload
+High level API for processing file uploads.
+ |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+PortletFileUpload
+High level API for processing file uploads.
+ |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+ServletFileUpload
+High level API for processing file uploads.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadException.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadException.html new file mode 100644 index 0000000..ddebb99 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/FileUploadException.html @@ -0,0 +1,379 @@ + + + + + + +Package | +Description | +
---|---|
org.apache.commons.fileupload | +
+
+ A component for handling HTML file uploads as specified by
+ RFC 1867.
+ |
+
org.apache.commons.fileupload.portlet | +
+
+ An implementation of
+
+FileUpload
+ for use in portlets conforming to JSR 168. |
+
org.apache.commons.fileupload.servlet | +
+
+ An implementation of
+
+FileUpload
+ for use in servlets conforming to JSR 53. |
+
Modifier and Type | +Class and Description | +
---|---|
static class |
+FileUploadBase.FileSizeLimitExceededException
+Thrown to indicate that A files size exceeds the configured maximum.
+ |
+
static class |
+FileUploadBase.InvalidContentTypeException
+Thrown to indicate that the request is not a multipart request.
+ |
+
static class |
+FileUploadBase.IOFileUploadException
+Thrown to indicate an IOException.
+ |
+
protected static class |
+FileUploadBase.SizeException
+This exception is thrown, if a requests permitted size
+ is exceeded.
+ |
+
static class |
+FileUploadBase.SizeLimitExceededException
+Thrown to indicate that the request size exceeds the configured maximum.
+ |
+
static class |
+FileUploadBase.UnknownSizeException
+Deprecated.
+
+1.2 As of commons-fileupload 1.2, the presence of a
+ content-length header is no longer required.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
protected FileItem |
+FileUploadBase.createItem(Map<String,String> headers,
+ boolean isFormField)
+Deprecated.
+
+1.2 This method is no longer used in favour of
+ internally created instances of
+FileItem . |
+
FileItemIterator |
+FileUploadBase.getItemIterator(RequestContext ctx)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
boolean |
+FileItemIterator.hasNext()
+Returns, whether another instance of
+FileItemStream
+ is available. |
+
FileItemStream |
+FileItemIterator.next()
+Returns the next available
+FileItemStream . |
+
Map<String,List<FileItem>> |
+FileUploadBase.parseParameterMap(RequestContext ctx)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
List<FileItem> |
+FileUploadBase.parseRequest(HttpServletRequest req)
+Deprecated.
+
+1.1 Use
+ServletFileUpload.parseRequest(HttpServletRequest) instead. |
+
List<FileItem> |
+DiskFileUpload.parseRequest(HttpServletRequest req,
+ int sizeThreshold,
+ long sizeMax,
+ String path)
+Deprecated.
+
+1.1 Use
+ServletFileUpload instead. |
+
List<FileItem> |
+FileUploadBase.parseRequest(RequestContext ctx)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
Constructor and Description | +
---|
FileUploadIOException(FileUploadException pCause)
+Creates a
+FileUploadIOException with the
+ given cause. |
+
Modifier and Type | +Method and Description | +
---|---|
FileItemIterator |
+PortletFileUpload.getItemIterator(javax.portlet.ActionRequest request)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
Map<String,List<FileItem>> |
+PortletFileUpload.parseParameterMap(javax.portlet.ActionRequest request)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
List<FileItem> |
+PortletFileUpload.parseRequest(javax.portlet.ActionRequest request)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
Modifier and Type | +Method and Description | +
---|---|
FileItemIterator |
+ServletFileUpload.getItemIterator(HttpServletRequest request)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
Map<String,List<FileItem>> |
+ServletFileUpload.parseParameterMap(HttpServletRequest request)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
List<FileItem> |
+ServletFileUpload.parseRequest(HttpServletRequest request)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/InvalidFileNameException.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/InvalidFileNameException.html new file mode 100644 index 0000000..66df855 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/InvalidFileNameException.html @@ -0,0 +1,125 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/MultipartStream.IllegalBoundaryException.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/MultipartStream.IllegalBoundaryException.html new file mode 100644 index 0000000..20ee9c9 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/MultipartStream.IllegalBoundaryException.html @@ -0,0 +1,171 @@ + + + + + + +Package | +Description | +
---|---|
org.apache.commons.fileupload | +
+
+ A component for handling HTML file uploads as specified by
+ RFC 1867.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+MultipartStream.setBoundary(byte[] boundary)
+Changes the boundary token used for partitioning the stream.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/MultipartStream.ItemInputStream.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/MultipartStream.ItemInputStream.html new file mode 100644 index 0000000..7386bbc --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/MultipartStream.ItemInputStream.html @@ -0,0 +1,125 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/MultipartStream.MalformedStreamException.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/MultipartStream.MalformedStreamException.html new file mode 100644 index 0000000..8f631a2 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/MultipartStream.MalformedStreamException.html @@ -0,0 +1,194 @@ + + + + + + +Package | +Description | +
---|---|
org.apache.commons.fileupload | +
+
+ A component for handling HTML file uploads as specified by
+ RFC 1867.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+MultipartStream.discardBodyData()
+ Reads
+body-data from the current
+ encapsulation and discards it. |
+
int |
+MultipartStream.readBodyData(OutputStream output)
+Reads
+body-data from the current
+ encapsulation and writes its contents into the
+ output Stream . |
+
boolean |
+MultipartStream.readBoundary()
+Skips a
+boundary token, and checks whether more
+ encapsulations are contained in the stream. |
+
String |
+MultipartStream.readHeaders()
+Reads the
+header-part of the current
+ encapsulation . |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/MultipartStream.ProgressNotifier.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/MultipartStream.ProgressNotifier.html new file mode 100644 index 0000000..6a54f75 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/MultipartStream.ProgressNotifier.html @@ -0,0 +1,172 @@ + + + + + + +Package | +Description | +
---|---|
org.apache.commons.fileupload | +
+
+ A component for handling HTML file uploads as specified by
+ RFC 1867.
+ |
+
Constructor and Description | +
---|
MultipartStream(InputStream input,
+ byte[] boundary,
+ int bufSize,
+ MultipartStream.ProgressNotifier pNotifier)
+ Constructs a
+MultipartStream with a custom size buffer. |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/MultipartStream.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/MultipartStream.html new file mode 100644 index 0000000..6598bf7 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/MultipartStream.html @@ -0,0 +1,125 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/ParameterParser.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/ParameterParser.html new file mode 100644 index 0000000..2993c47 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/ParameterParser.html @@ -0,0 +1,125 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/ProgressListener.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/ProgressListener.html new file mode 100644 index 0000000..02f6bcd --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/ProgressListener.html @@ -0,0 +1,186 @@ + + + + + + +Package | +Description | +
---|---|
org.apache.commons.fileupload | +
+
+ A component for handling HTML file uploads as specified by
+ RFC 1867.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
ProgressListener |
+FileUploadBase.getProgressListener()
+Returns the progress listener.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+FileUploadBase.setProgressListener(ProgressListener pListener)
+Sets the progress listener.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/RequestContext.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/RequestContext.html new file mode 100644 index 0000000..8e3c945 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/RequestContext.html @@ -0,0 +1,269 @@ + + + + + + +Package | +Description | +
---|---|
org.apache.commons.fileupload | +
+
+ A component for handling HTML file uploads as specified by
+ RFC 1867.
+ |
+
org.apache.commons.fileupload.portlet | +
+
+ An implementation of
+
+FileUpload
+ for use in portlets conforming to JSR 168. |
+
org.apache.commons.fileupload.servlet | +
+
+ An implementation of
+
+FileUpload
+ for use in servlets conforming to JSR 53. |
+
Modifier and Type | +Interface and Description | +
---|---|
interface |
+UploadContext
+Enhanced access to the request information needed for file uploads,
+ which fixes the Content Length data access in
+RequestContext . |
+
Modifier and Type | +Method and Description | +
---|---|
FileItemIterator |
+FileUploadBase.getItemIterator(RequestContext ctx)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
static boolean |
+FileUploadBase.isMultipartContent(RequestContext ctx)
+Utility method that determines whether the request contains multipart
+ content.
+ |
+
Map<String,List<FileItem>> |
+FileUploadBase.parseParameterMap(RequestContext ctx)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
List<FileItem> |
+FileUploadBase.parseRequest(RequestContext ctx)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+PortletRequestContext
+Provides access to the request information needed for a request made to
+ a portlet.
+ |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+ServletRequestContext
+Provides access to the request information needed for a request made to
+ an HTTP servlet.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/UploadContext.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/UploadContext.html new file mode 100644 index 0000000..a56b56f --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/class-use/UploadContext.html @@ -0,0 +1,203 @@ + + + + + + +Package | +Description | +
---|---|
org.apache.commons.fileupload.portlet | +
+
+ An implementation of
+
+FileUpload
+ for use in portlets conforming to JSR 168. |
+
org.apache.commons.fileupload.servlet | +
+
+ An implementation of
+
+FileUpload
+ for use in servlets conforming to JSR 53. |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+PortletRequestContext
+Provides access to the request information needed for a request made to
+ a portlet.
+ |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+ServletRequestContext
+Provides access to the request information needed for a request made to
+ an HTTP servlet.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/disk/DiskFileItem.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/disk/DiskFileItem.html new file mode 100644 index 0000000..c6fe985 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/disk/DiskFileItem.html @@ -0,0 +1,941 @@ + + + + + + +public class DiskFileItem +extends Object +implements FileItem+
The default implementation of the
+ FileItem
interface.
+
+
After retrieving an instance of this class from a DiskFileItemFactory
instance (see
+ #parseRequest(javax.servlet.http.HttpServletRequest)
), you may
+ either request all contents of file at once using get()
or
+ request an InputStream
with
+ getInputStream()
and process the file without attempting to load
+ it into memory, which may come handy with large files.
+
+
Temporary files, which are created for file items, should be
+ deleted later on. The best way to do this is using a
+ FileCleaningTracker
, which you can set on the
+ DiskFileItemFactory
. However, if you do use such a tracker,
+ then you must consider the following: Temporary files are automatically
+ deleted as soon as they are no longer needed. (More precisely, when the
+ corresponding instance of File
is garbage collected.)
+ This is done by the so-called reaper thread, which is started and stopped
+ automatically by the FileCleaningTracker
when
+ there are files to be tracked.
+ It might make sense to terminate that thread, for example, if
+ your web application ends. See the section on "Resource cleanup"
+ in the users guide of commons-fileupload.
Modifier and Type | +Field and Description | +
---|---|
static String |
+DEFAULT_CHARSET
+Default content charset to be used when no explicit charset
+ parameter is provided by the sender.
+ |
+
Constructor and Description | +
---|
DiskFileItem(String fieldName,
+ String contentType,
+ boolean isFormField,
+ String fileName,
+ int sizeThreshold,
+ File repository)
+Constructs a new
+DiskFileItem instance. |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+delete()
+Deletes the underlying storage for a file item, including deleting any
+ associated temporary disk file.
+ |
+
protected void |
+finalize()
+Removes the file contents from the temporary storage.
+ |
+
byte[] |
+get()
+Returns the contents of the file as an array of bytes.
+ |
+
String |
+getCharSet()
+Returns the content charset passed by the agent or
+null if
+ not defined. |
+
String |
+getContentType()
+Returns the content type passed by the agent or
+null if
+ not defined. |
+
String |
+getFieldName()
+Returns the name of the field in the multipart form corresponding to
+ this file item.
+ |
+
FileItemHeaders |
+getHeaders()
+Returns the file item headers.
+ |
+
InputStream |
+getInputStream()
+Returns an
+InputStream that can be
+ used to retrieve the contents of the file. |
+
String |
+getName()
+Returns the original filename in the client's filesystem.
+ |
+
OutputStream |
+getOutputStream()
+Returns an
+OutputStream that can
+ be used for storing the contents of the file. |
+
long |
+getSize()
+Returns the size of the file.
+ |
+
File |
+getStoreLocation()
+Returns the
+File object for the FileItem 's
+ data's temporary location on the disk. |
+
String |
+getString()
+Returns the contents of the file as a String, using the default
+ character encoding.
+ |
+
String |
+getString(String charset)
+Returns the contents of the file as a String, using the specified
+ encoding.
+ |
+
protected File |
+getTempFile()
+Creates and returns a
+File representing a uniquely
+ named temporary file in the configured repository path. |
+
boolean |
+isFormField()
+Determines whether or not a
+FileItem instance represents
+ a simple form field. |
+
boolean |
+isInMemory()
+Provides a hint as to whether or not the file contents will be read
+ from memory.
+ |
+
void |
+setFieldName(String fieldName)
+Sets the field name used to reference this file item.
+ |
+
void |
+setFormField(boolean state)
+Specifies whether or not a
+FileItem instance represents
+ a simple form field. |
+
void |
+setHeaders(FileItemHeaders pHeaders)
+Sets the file item headers.
+ |
+
String |
+toString()
+Returns a string representation of this object.
+ |
+
void |
+write(File file)
+A convenience method to write an uploaded item to disk.
+ |
+
public static final String DEFAULT_CHARSET+
public DiskFileItem(String fieldName, + String contentType, + boolean isFormField, + String fileName, + int sizeThreshold, + File repository)+
DiskFileItem
instance.fieldName
- The name of the form field.contentType
- The content type passed by the browser or
+ null
if not specified.isFormField
- Whether or not this item is a plain form field, as
+ opposed to a file upload.fileName
- The original filename in the user's filesystem, or
+ null
if not specified.sizeThreshold
- The threshold, in bytes, below which items will be
+ retained in memory and above which they will be
+ stored as a file.repository
- The data repository, which is the directory in
+ which files will be created, should the item size
+ exceed the threshold.public InputStream getInputStream() + throws IOException+
InputStream
that can be
+ used to retrieve the contents of the file.getInputStream
in interface FileItem
InputStream
that can be
+ used to retrieve the contents of the file.IOException
- if an error occurs.public String getContentType()+
null
if
+ not defined.getContentType
in interface FileItem
null
if
+ not defined.public String getCharSet()+
null
if
+ not defined.null
if
+ not defined.public String getName()+
getName
in interface FileItem
InvalidFileNameException
- The file name contains a NUL character,
+ which might be an indicator of a security attack. If you intend to
+ use the file name anyways, catch the exception and use
+ InvalidFileNameException.getName()
.public boolean isInMemory()+
isInMemory
in interface FileItem
true
if the file contents will be read
+ from memory; false
otherwise.public long getSize()+
public byte[] get()+
public String getString(String charset) + throws UnsupportedEncodingException+
get()
to retrieve the
+ contents of the file.getString
in interface FileItem
charset
- The charset to use.UnsupportedEncodingException
- if the requested character
+ encoding is not available.public String getString()+
get()
to retrieve the
+ contents of the file.
+
+ TODO Consider making this method throw UnsupportedEncodingException.public void write(File file) + throws Exception+
+ This implementation first attempts to rename the uploaded item to the + specified destination file, if the item was originally written to disk. + Otherwise, the data will be copied to the specified file. +
+ This method is only guaranteed to work once, the first time it + is invoked for a particular item. This is because, in the event that the + method renames a temporary file, that file will no longer be available + to copy or rename again at a later time.
public void delete()+
FileItem
instance is garbage
+ collected, this method can be used to ensure that this is done at an
+ earlier time, thus preserving system resources.public String getFieldName()+
getFieldName
in interface FileItem
setFieldName(java.lang.String)
public void setFieldName(String fieldName)+
setFieldName
in interface FileItem
fieldName
- The name of the form field.getFieldName()
public boolean isFormField()+
FileItem
instance represents
+ a simple form field.isFormField
in interface FileItem
true
if the instance represents a simple form
+ field; false
if it represents an uploaded file.setFormField(boolean)
public void setFormField(boolean state)+
FileItem
instance represents
+ a simple form field.setFormField
in interface FileItem
state
- true
if the instance represents a simple form
+ field; false
if it represents an uploaded file.isFormField()
public OutputStream getOutputStream() + throws IOException+
OutputStream
that can
+ be used for storing the contents of the file.getOutputStream
in interface FileItem
OutputStream
that can be used
+ for storing the contensts of the file.IOException
- if an error occurs.public File getStoreLocation()+
File
object for the FileItem
's
+ data's temporary location on the disk. Note that for
+ FileItem
s that have their data stored in memory,
+ this method will return null
. When handling large
+ files, you can use File.renameTo(java.io.File)
to
+ move the file to new location without copying the data, if the
+ source and destination locations reside within the same logical
+ volume.null
if the data is stored in
+ memory.protected void finalize()+
protected File getTempFile()+
File
representing a uniquely
+ named temporary file in the configured repository path. The lifetime of
+ the file is tied to the lifetime of the FileItem
instance;
+ the file will be deleted when the instance is garbage collected.File
to be used for temporary storage.public String toString()+
public FileItemHeaders getHeaders()+
getHeaders
in interface FileItemHeadersSupport
public void setHeaders(FileItemHeaders pHeaders)+
setHeaders
in interface FileItemHeadersSupport
pHeaders
- The file items headers.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/disk/DiskFileItemFactory.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/disk/DiskFileItemFactory.html new file mode 100644 index 0000000..b71bd32 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/disk/DiskFileItemFactory.html @@ -0,0 +1,568 @@ + + + + + + +public class DiskFileItemFactory +extends Object +implements FileItemFactory+
The default FileItemFactory
+ implementation. This implementation creates
+ FileItem
instances which keep their
+ content either in memory, for smaller items, or in a temporary file on disk,
+ for larger items. The size threshold, above which content will be stored on
+ disk, is configurable, as is the directory in which temporary files will be
+ created.
If not otherwise configured, the default configuration values are as + follows:
+System.getProperty("java.io.tmpdir")
.
+ NOTE: Files are created in the system default temp directory with
+ predictable names. This means that a local attacker with write access to that
+ directory can perform a TOUTOC attack to replace any uploaded file with a
+ file of the attackers choice. The implications of this will depend on how the
+ uploaded file is used but could be significant. When using this
+ implementation in an environment with local, untrusted users,
+ setRepository(File)
MUST be used to configure a repository location
+ that is not publicly writable. In a Servlet container the location identified
+ by the ServletContext attribute javax.servlet.context.tempdir
+ may be used.
+
Temporary files, which are created for file items, should be
+ deleted later on. The best way to do this is using a
+ FileCleaningTracker
, which you can set on the
+ DiskFileItemFactory
. However, if you do use such a tracker,
+ then you must consider the following: Temporary files are automatically
+ deleted as soon as they are no longer needed. (More precisely, when the
+ corresponding instance of File
is garbage collected.)
+ This is done by the so-called reaper thread, which is started and stopped
+ automatically by the FileCleaningTracker
when there are files to be
+ tracked.
+ It might make sense to terminate that thread, for example, if
+ your web application ends. See the section on "Resource cleanup"
+ in the users guide of commons-fileupload.
Modifier and Type | +Field and Description | +
---|---|
static int |
+DEFAULT_SIZE_THRESHOLD
+The default threshold above which uploads will be stored on disk.
+ |
+
Constructor and Description | +
---|
DiskFileItemFactory()
+Constructs an unconfigured instance of this class.
+ |
+
DiskFileItemFactory(int sizeThreshold,
+ File repository)
+Constructs a preconfigured instance of this class.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
FileItem |
+createItem(String fieldName,
+ String contentType,
+ boolean isFormField,
+ String fileName)
+Create a new
+DiskFileItem
+ instance from the supplied parameters and the local factory
+ configuration. |
+
org.apache.commons.io.FileCleaningTracker |
+getFileCleaningTracker()
+Returns the tracker, which is responsible for deleting temporary
+ files.
+ |
+
File |
+getRepository()
+Returns the directory used to temporarily store files that are larger
+ than the configured size threshold.
+ |
+
int |
+getSizeThreshold()
+Returns the size threshold beyond which files are written directly to
+ disk.
+ |
+
void |
+setFileCleaningTracker(org.apache.commons.io.FileCleaningTracker pTracker)
+Sets the tracker, which is responsible for deleting temporary
+ files.
+ |
+
void |
+setRepository(File repository)
+Sets the directory used to temporarily store files that are larger
+ than the configured size threshold.
+ |
+
void |
+setSizeThreshold(int sizeThreshold)
+Sets the size threshold beyond which files are written directly to disk.
+ |
+
public static final int DEFAULT_SIZE_THRESHOLD+
public DiskFileItemFactory()+
public DiskFileItemFactory(int sizeThreshold, + File repository)+
sizeThreshold
- The threshold, in bytes, below which items will be
+ retained in memory and above which they will be
+ stored as a file.repository
- The data repository, which is the directory in
+ which files will be created, should the item size
+ exceed the threshold.public File getRepository()+
setRepository(java.io.File)
public void setRepository(File repository)+
repository
- The directory in which temporary files will be located.getRepository()
public int getSizeThreshold()+
setSizeThreshold(int)
public void setSizeThreshold(int sizeThreshold)+
sizeThreshold
- The size threshold, in bytes.getSizeThreshold()
public FileItem createItem(String fieldName, + String contentType, + boolean isFormField, + String fileName)+
DiskFileItem
+ instance from the supplied parameters and the local factory
+ configuration.createItem
in interface FileItemFactory
fieldName
- The name of the form field.contentType
- The content type of the form field.isFormField
- true
if this is a plain form field;
+ false
otherwise.fileName
- The name of the uploaded file, if any, as supplied
+ by the browser or other client.public org.apache.commons.io.FileCleaningTracker getFileCleaningTracker()+
FileCleaningTracker
, or null
+ (default), if temporary files aren't tracked.public void setFileCleaningTracker(org.apache.commons.io.FileCleaningTracker pTracker)+
pTracker
- An instance of FileCleaningTracker
,
+ which will from now on track the created files, or null
+ (default), to disable tracking.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/disk/class-use/DiskFileItem.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/disk/class-use/DiskFileItem.html new file mode 100644 index 0000000..1bdfd37 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/disk/class-use/DiskFileItem.html @@ -0,0 +1,173 @@ + + + + + + +Package | +Description | +
---|---|
org.apache.commons.fileupload | +
+
+ A component for handling HTML file uploads as specified by
+ RFC 1867.
+ |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+DefaultFileItem
+Deprecated.
+
+1.1 Use
+DiskFileItem instead. |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/disk/class-use/DiskFileItemFactory.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/disk/class-use/DiskFileItemFactory.html new file mode 100644 index 0000000..c27f0d2 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/disk/class-use/DiskFileItemFactory.html @@ -0,0 +1,173 @@ + + + + + + +Package | +Description | +
---|---|
org.apache.commons.fileupload | +
+
+ A component for handling HTML file uploads as specified by
+ RFC 1867.
+ |
+
Modifier and Type | +Class and Description | +
---|---|
class |
+DefaultFileItemFactory
+Deprecated.
+
+1.1 Use
+DiskFileItemFactory instead. |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/disk/package-frame.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/disk/package-frame.html new file mode 100644 index 0000000..f74508e --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/disk/package-frame.html @@ -0,0 +1,21 @@ + + + + + + +FileItem
+ interface.See: Description
+Class | +Description | +
---|---|
DiskFileItem | +
+ The default implementation of the
+
+FileItem interface. |
+
DiskFileItemFactory | +
+ The default
+FileItemFactory
+ implementation. |
+
+ A disk-based implementation of the
+ FileItem
+ interface. This implementation retains smaller items in memory, while
+ writing larger ones to disk. The threshold between these two is
+ configurable, as is the location of files that are written to disk.
+
+ In typical usage, an instance of
+ DiskFileItemFactory
+ would be created, configured, and then passed to a
+ FileUpload
+ implementation such as
+ ServletFileUpload
+ or
+ PortletFileUpload
.
+
+ The following code fragment demonstrates this usage. +
++ DiskFileItemFactory factory = new DiskFileItemFactory(); + // maximum size that will be stored in memory + factory.setSizeThreshold(4096); + // the location for saving data that is larger than getSizeThreshold() + factory.setRepository(new File("/tmp")); + + ServletFileUpload upload = new ServletFileUpload(factory); ++
+ Please see the FileUpload + User Guide + for further details and examples of how to use this package. +
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/disk/package-tree.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/disk/package-tree.html new file mode 100644 index 0000000..fa50a77 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/disk/package-tree.html @@ -0,0 +1,139 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/disk/package-use.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/disk/package-use.html new file mode 100644 index 0000000..81eab51 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/disk/package-use.html @@ -0,0 +1,171 @@ + + + + + + +Package | +Description | +
---|---|
org.apache.commons.fileupload | +
+
+ A component for handling HTML file uploads as specified by
+ RFC 1867.
+ |
+
Class and Description | +
---|
DiskFileItem
+ The default implementation of the
+
+FileItem interface. |
+
DiskFileItemFactory
+ The default
+FileItemFactory
+ implementation. |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/package-frame.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/package-frame.html new file mode 100644 index 0000000..e3a7653 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/package-frame.html @@ -0,0 +1,54 @@ + + + + + + +See: Description
+Interface | +Description | +
---|---|
FileItem | +
+ This class represents a file or form item that was received within a
+
+multipart/form-data POST request. |
+
FileItemFactory | +
+ A factory interface for creating
+FileItem instances. |
+
FileItemHeaders | +
+ This class provides support for accessing the headers for a file or form
+ item that was received within a
+multipart/form-data POST
+ request. |
+
FileItemHeadersSupport | +
+ Interface that will indicate that
+FileItem or FileItemStream
+ implementations will accept the headers read for the item. |
+
FileItemIterator | +
+ An iterator, as returned by
+
+FileUploadBase.getItemIterator(RequestContext) . |
+
FileItemStream | +
+ This interface provides access to a file or form item that was
+ received within a
+multipart/form-data POST request. |
+
ProgressListener | +
+ The
+ProgressListener may be used to display a progress bar
+ or do stuff like that. |
+
RequestContext | +
+ Abstracts access to the request information needed for file uploads.
+ |
+
UploadContext | +
+ Enhanced access to the request information needed for file uploads,
+ which fixes the Content Length data access in
+RequestContext . |
+
Class | +Description | +
---|---|
DefaultFileItem | +Deprecated
+ 1.1 Use
+DiskFileItem instead. |
+
DefaultFileItemFactory | +Deprecated
+ 1.1 Use
+DiskFileItemFactory instead. |
+
DiskFileUpload | +Deprecated
+ 1.1 Use
+ServletFileUpload together with
+ DiskFileItemFactory instead. |
+
FileUpload | +
+ High level API for processing file uploads.
+ |
+
FileUploadBase | +
+ High level API for processing file uploads.
+ |
+
MultipartStream | +
+ Low level API for processing file uploads.
+ |
+
MultipartStream.ProgressNotifier | +
+ Internal class, which is used to invoke the
+
+ProgressListener . |
+
ParameterParser | +
+ A simple parser intended to parse sequences of name/value pairs.
+ |
+
Exception | +Description | +
---|---|
FileItemStream.ItemSkippedException | +
+ This exception is thrown, if an attempt is made to read
+ data from the
+InputStream , which has been returned
+ by FileItemStream.openStream() , after
+ Iterator.hasNext() has been invoked on the
+ iterator, which created the FileItemStream . |
+
FileUploadBase.FileSizeLimitExceededException | +
+ Thrown to indicate that A files size exceeds the configured maximum.
+ |
+
FileUploadBase.FileUploadIOException | +
+ This exception is thrown for hiding an inner
+
+FileUploadException in an IOException . |
+
FileUploadBase.InvalidContentTypeException | +
+ Thrown to indicate that the request is not a multipart request.
+ |
+
FileUploadBase.IOFileUploadException | +
+ Thrown to indicate an IOException.
+ |
+
FileUploadBase.SizeException | +
+ This exception is thrown, if a requests permitted size
+ is exceeded.
+ |
+
FileUploadBase.SizeLimitExceededException | +
+ Thrown to indicate that the request size exceeds the configured maximum.
+ |
+
FileUploadBase.UnknownSizeException | +Deprecated
+ 1.2 As of commons-fileupload 1.2, the presence of a
+ content-length header is no longer required.
+ |
+
FileUploadException | +
+ Exception for errors encountered while processing the request.
+ |
+
InvalidFileNameException | +
+ This exception is thrown in case of an invalid file name.
+ |
+
MultipartStream.IllegalBoundaryException | +
+ Thrown upon attempt of setting an invalid boundary token.
+ |
+
MultipartStream.MalformedStreamException | +
+ Thrown to indicate that the input stream fails to follow the
+ required syntax.
+ |
+
+ A component for handling HTML file uploads as specified by + RFC 1867. + This component provides support for uploads within both servlets (JSR 53) + and portlets (JSR 168). +
+
+ While this package provides the generic functionality for file uploads,
+ these classes are not typically used directly. Instead, normal usage
+ involves one of the provided extensions of
+ FileUpload
such as
+ ServletFileUpload
+ or
+ PortletFileUpload
,
+ together with a factory for
+ FileItem
instances,
+ such as
+ DiskFileItemFactory
.
+
+ The following is a brief example of typical usage in a servlet, storing + the uploaded files on disk. +
+public void doPost(HttpServletRequest req, HttpServletResponse res) { + DiskFileItemFactory factory = new DiskFileItemFactory(); + // maximum size that will be stored in memory + factory.setSizeThreshold(4096); + // the location for saving data that is larger than getSizeThreshold() + factory.setRepository(new File("/tmp")); + + ServletFileUpload upload = new ServletFileUpload(factory); + // maximum size before a FileUploadException will be thrown + upload.setSizeMax(1000000); + + List fileItems = upload.parseRequest(req); + // assume we know there are two files. The first file is a small + // text file, the second is unknown and is written to a file on + // the server + Iterator i = fileItems.iterator(); + String comment = ((FileItem)i.next()).getString(); + FileItem fi = (FileItem)i.next(); + // filename on the client + String fileName = fi.getName(); + // save comment and filename to database + ... + // write the file + fi.write(new File("/www/uploads/", fileName)); + } ++
+ In the example above, the first file is loaded into memory as a
+ String
. Before calling the getString
method,
+ the data may have been in memory or on disk depending on its size. The
+ second file we assume it will be large and therefore never explicitly
+ load it into memory, though if it is less than 4096 bytes it will be
+ in memory before it is written to its final location. When writing to
+ the final location, if the data is larger than the threshold, an attempt
+ is made to rename the temporary file to the given location. If it cannot
+ be renamed, it is streamed to the new location.
+
+ Please see the FileUpload + User Guide + for further details and examples of how to use this package. +
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/package-tree.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/package-tree.html new file mode 100644 index 0000000..0d925f2 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/package-tree.html @@ -0,0 +1,218 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/package-use.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/package-use.html new file mode 100644 index 0000000..90147f0 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/package-use.html @@ -0,0 +1,452 @@ + + + + + + +Package | +Description | +
---|---|
org.apache.commons.fileupload | +
+
+ A component for handling HTML file uploads as specified by
+ RFC 1867.
+ |
+
org.apache.commons.fileupload.disk | +
+
+ A disk-based implementation of the
+
+FileItem
+ interface. |
+
org.apache.commons.fileupload.portlet | +
+
+ An implementation of
+
+FileUpload
+ for use in portlets conforming to JSR 168. |
+
org.apache.commons.fileupload.servlet | +
+
+ An implementation of
+
+FileUpload
+ for use in servlets conforming to JSR 53. |
+
org.apache.commons.fileupload.util | +
+ This package contains various IO related utility classes
+ or methods, which are basically reusable and not necessarily
+ restricted to the scope of a file upload.
+ |
+
Class and Description | +
---|
DefaultFileItemFactory
+ Deprecated.
+
+1.1 Use
+DiskFileItemFactory instead. |
+
FileItem
+ This class represents a file or form item that was received within a
+
+multipart/form-data POST request. |
+
FileItemFactory
+ A factory interface for creating
+FileItem instances. |
+
FileItemHeaders
+ This class provides support for accessing the headers for a file or form
+ item that was received within a
+multipart/form-data POST
+ request. |
+
FileItemHeadersSupport
+ Interface that will indicate that
+FileItem or FileItemStream
+ implementations will accept the headers read for the item. |
+
FileItemIterator
+ An iterator, as returned by
+
+FileUploadBase.getItemIterator(RequestContext) . |
+
FileItemStream
+ This interface provides access to a file or form item that was
+ received within a
+multipart/form-data POST request. |
+
FileUploadBase
+ High level API for processing file uploads.
+ |
+
FileUploadBase.FileUploadIOException
+ This exception is thrown for hiding an inner
+
+FileUploadException in an IOException . |
+
FileUploadBase.SizeException
+ This exception is thrown, if a requests permitted size
+ is exceeded.
+ |
+
FileUploadException
+ Exception for errors encountered while processing the request.
+ |
+
MultipartStream.IllegalBoundaryException
+ Thrown upon attempt of setting an invalid boundary token.
+ |
+
MultipartStream.MalformedStreamException
+ Thrown to indicate that the input stream fails to follow the
+ required syntax.
+ |
+
MultipartStream.ProgressNotifier
+ Internal class, which is used to invoke the
+
+ProgressListener . |
+
ProgressListener
+ The
+ProgressListener may be used to display a progress bar
+ or do stuff like that. |
+
RequestContext
+ Abstracts access to the request information needed for file uploads.
+ |
+
Class and Description | +
---|
FileItem
+ This class represents a file or form item that was received within a
+
+multipart/form-data POST request. |
+
FileItemFactory
+ A factory interface for creating
+FileItem instances. |
+
FileItemHeaders
+ This class provides support for accessing the headers for a file or form
+ item that was received within a
+multipart/form-data POST
+ request. |
+
FileItemHeadersSupport
+ Interface that will indicate that
+FileItem or FileItemStream
+ implementations will accept the headers read for the item. |
+
Class and Description | +
---|
FileItem
+ This class represents a file or form item that was received within a
+
+multipart/form-data POST request. |
+
FileItemFactory
+ A factory interface for creating
+FileItem instances. |
+
FileItemIterator
+ An iterator, as returned by
+
+FileUploadBase.getItemIterator(RequestContext) . |
+
FileUpload
+ High level API for processing file uploads.
+ |
+
FileUploadBase
+ High level API for processing file uploads.
+ |
+
FileUploadException
+ Exception for errors encountered while processing the request.
+ |
+
RequestContext
+ Abstracts access to the request information needed for file uploads.
+ |
+
UploadContext
+ Enhanced access to the request information needed for file uploads,
+ which fixes the Content Length data access in
+RequestContext . |
+
Class and Description | +
---|
FileItem
+ This class represents a file or form item that was received within a
+
+multipart/form-data POST request. |
+
FileItemFactory
+ A factory interface for creating
+FileItem instances. |
+
FileItemIterator
+ An iterator, as returned by
+
+FileUploadBase.getItemIterator(RequestContext) . |
+
FileUpload
+ High level API for processing file uploads.
+ |
+
FileUploadBase
+ High level API for processing file uploads.
+ |
+
FileUploadException
+ Exception for errors encountered while processing the request.
+ |
+
RequestContext
+ Abstracts access to the request information needed for file uploads.
+ |
+
UploadContext
+ Enhanced access to the request information needed for file uploads,
+ which fixes the Content Length data access in
+RequestContext . |
+
Class and Description | +
---|
FileItemHeaders
+ This class provides support for accessing the headers for a file or form
+ item that was received within a
+multipart/form-data POST
+ request. |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/portlet/PortletFileUpload.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/portlet/PortletFileUpload.html new file mode 100644 index 0000000..f628324 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/portlet/PortletFileUpload.html @@ -0,0 +1,481 @@ + + + + + + +public class PortletFileUpload +extends FileUpload+
High level API for processing file uploads.
+ +This class handles multiple files per single HTML widget, sent using
+ multipart/mixed
encoding type, as specified by
+ RFC 1867. Use
+ #parseRequest(javax.servlet.http.HttpServletRequest)
to acquire a list
+ of FileItems
associated
+ with a given HTML widget.
How the data for individual parts is stored is determined by the factory + used to create them; a given part may be in memory, on disk, or somewhere + else.
FileUploadBase.FileSizeLimitExceededException, FileUploadBase.FileUploadIOException, FileUploadBase.InvalidContentTypeException, FileUploadBase.IOFileUploadException, FileUploadBase.SizeException, FileUploadBase.SizeLimitExceededException, FileUploadBase.UnknownSizeException
ATTACHMENT, CONTENT_DISPOSITION, CONTENT_LENGTH, CONTENT_TYPE, FORM_DATA, MAX_HEADER_SIZE, MULTIPART, MULTIPART_FORM_DATA, MULTIPART_MIXED
Constructor and Description | +
---|
PortletFileUpload()
+Constructs an uninitialised instance of this class.
+ |
+
PortletFileUpload(FileItemFactory fileItemFactory)
+Constructs an instance of this class which uses the supplied factory to
+ create
+FileItem instances. |
+
Modifier and Type | +Method and Description | +
---|---|
FileItemIterator |
+getItemIterator(javax.portlet.ActionRequest request)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
static boolean |
+isMultipartContent(javax.portlet.ActionRequest request)
+Utility method that determines whether the request contains multipart
+ content.
+ |
+
Map<String,List<FileItem>> |
+parseParameterMap(javax.portlet.ActionRequest request)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
List<FileItem> |
+parseRequest(javax.portlet.ActionRequest request)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
getFileItemFactory, setFileItemFactory
createItem, getBoundary, getFieldName, getFieldName, getFileName, getFileName, getFileSizeMax, getHeader, getHeaderEncoding, getItemIterator, getParsedHeaders, getProgressListener, getSizeMax, isMultipartContent, isMultipartContent, newFileItemHeaders, parseHeaders, parseParameterMap, parseRequest, parseRequest, setFileSizeMax, setHeaderEncoding, setProgressListener, setSizeMax
public PortletFileUpload()+
setFileItemFactory()
, before attempting
+ to parse requests.FileUpload.FileUpload(FileItemFactory)
public PortletFileUpload(FileItemFactory fileItemFactory)+
FileItem
instances.fileItemFactory
- The factory to use for creating file items.FileUpload.FileUpload()
public static final boolean isMultipartContent(javax.portlet.ActionRequest request)+
request
- The portlet request to be evaluated. Must be non-null.true
if the request is multipart;
+ false
otherwise.public List<FileItem> parseRequest(javax.portlet.ActionRequest request) + throws FileUploadException+
multipart/form-data
stream.request
- The portlet request to be parsed.FileItem
instances parsed from the
+ request, in the order that they were transmitted.FileUploadException
- if there are problems reading/parsing
+ the request or storing files.public Map<String,List<FileItem>> parseParameterMap(javax.portlet.ActionRequest request) + throws FileUploadException+
multipart/form-data
stream.request
- The portlet request to be parsed.FileItem
instances parsed from the request.FileUploadException
- if there are problems reading/parsing
+ the request or storing files.public FileItemIterator getItemIterator(javax.portlet.ActionRequest request) + throws FileUploadException, + IOException+
multipart/form-data
stream.request
- The portlet request to be parsed.FileItemStream
+ parsed from the request, in the order that they were
+ transmitted.FileUploadException
- if there are problems reading/parsing
+ the request or storing files.IOException
- An I/O error occurred. This may be a network
+ error while communicating with the client or a problem while
+ storing the uploaded content.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/portlet/PortletRequestContext.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/portlet/PortletRequestContext.html new file mode 100644 index 0000000..fbd54ce --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/portlet/PortletRequestContext.html @@ -0,0 +1,420 @@ + + + + + + +public class PortletRequestContext +extends Object +implements UploadContext+
Provides access to the request information needed for a request made to + a portlet.
Constructor and Description | +
---|
PortletRequestContext(javax.portlet.ActionRequest request)
+Construct a context for this request.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
long |
+contentLength()
+Retrieve the content length of the request.
+ |
+
String |
+getCharacterEncoding()
+Retrieve the character encoding for the request.
+ |
+
int |
+getContentLength()
+Deprecated.
+
+1.3 Use
+contentLength() instead |
+
String |
+getContentType()
+Retrieve the content type of the request.
+ |
+
InputStream |
+getInputStream()
+Retrieve the input stream for the request.
+ |
+
String |
+toString()
+Returns a string representation of this object.
+ |
+
public PortletRequestContext(javax.portlet.ActionRequest request)+
request
- The request to which this context applies.public String getCharacterEncoding()+
getCharacterEncoding
in interface RequestContext
public String getContentType()+
getContentType
in interface RequestContext
@Deprecated +public int getContentLength()+
contentLength()
insteadgetContentLength
in interface RequestContext
public long contentLength()+
contentLength
in interface UploadContext
public InputStream getInputStream() + throws IOException+
getInputStream
in interface RequestContext
IOException
- if a problem occurs.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/portlet/class-use/PortletFileUpload.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/portlet/class-use/PortletFileUpload.html new file mode 100644 index 0000000..d6e1ffc --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/portlet/class-use/PortletFileUpload.html @@ -0,0 +1,125 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/portlet/class-use/PortletRequestContext.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/portlet/class-use/PortletRequestContext.html new file mode 100644 index 0000000..cbbdbdd --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/portlet/class-use/PortletRequestContext.html @@ -0,0 +1,125 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/portlet/package-frame.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/portlet/package-frame.html new file mode 100644 index 0000000..97d644e --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/portlet/package-frame.html @@ -0,0 +1,21 @@ + + + + + + +FileUpload
+ for use in portlets conforming to JSR 168.See: Description
+Class | +Description | +
---|---|
PortletFileUpload | +
+ High level API for processing file uploads.
+ |
+
PortletRequestContext | +
+ Provides access to the request information needed for a request made to
+ a portlet.
+ |
+
+ An implementation of
+ FileUpload
+ for use in portlets conforming to JSR 168. This implementation requires
+ only access to the portlet's current ActionRequest
instance,
+ and a suitable
+ FileItemFactory
+ implementation, such as
+ DiskFileItemFactory
.
+
+ The following code fragment demonstrates typical usage. +
++ DiskFileItemFactory factory = new DiskFileItemFactory(); + // Configure the factory here, if desired. + PortletFileUpload upload = new PortletFileUpload(factory); + // Configure the uploader here, if desired. + List fileItems = upload.parseRequest(request); ++
+ Please see the FileUpload + User Guide + for further details and examples of how to use this package. +
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/portlet/package-tree.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/portlet/package-tree.html new file mode 100644 index 0000000..dd82e06 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/portlet/package-tree.html @@ -0,0 +1,147 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/portlet/package-use.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/portlet/package-use.html new file mode 100644 index 0000000..f2021a2 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/portlet/package-use.html @@ -0,0 +1,125 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/FileCleanerCleanup.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/FileCleanerCleanup.html new file mode 100644 index 0000000..24e809b --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/FileCleanerCleanup.html @@ -0,0 +1,409 @@ + + + + + + +public class FileCleanerCleanup +extends Object +implements ServletContextListener+
FileCleaningTracker
's reaper thread is terminated,
+ when the web application is destroyed.Modifier and Type | +Field and Description | +
---|---|
static String |
+FILE_CLEANING_TRACKER_ATTRIBUTE
+Attribute name, which is used for storing an instance of
+
+FileCleaningTracker in the web application. |
+
Constructor and Description | +
---|
FileCleanerCleanup() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+contextDestroyed(ServletContextEvent sce)
+Called when the web application is being destroyed.
+ |
+
void |
+contextInitialized(ServletContextEvent sce)
+Called when the web application is initialized.
+ |
+
static org.apache.commons.io.FileCleaningTracker |
+getFileCleaningTracker(ServletContext pServletContext)
+Returns the instance of
+FileCleaningTracker , which is
+ associated with the given ServletContext . |
+
static void |
+setFileCleaningTracker(ServletContext pServletContext,
+ org.apache.commons.io.FileCleaningTracker pTracker)
+Sets the instance of
+FileCleaningTracker , which is
+ associated with the given ServletContext . |
+
public static final String FILE_CLEANING_TRACKER_ATTRIBUTE+
FileCleaningTracker
in the web application.public static org.apache.commons.io.FileCleaningTracker getFileCleaningTracker(ServletContext pServletContext)+
FileCleaningTracker
, which is
+ associated with the given ServletContext
.pServletContext
- The servlet context to querypublic static void setFileCleaningTracker(ServletContext pServletContext, + org.apache.commons.io.FileCleaningTracker pTracker)+
FileCleaningTracker
, which is
+ associated with the given ServletContext
.pServletContext
- The servlet context to modifypTracker
- The tracker to setpublic void contextInitialized(ServletContextEvent sce)+
contextInitialized
in interface ServletContextListener
sce
- The servlet context, used for calling
+ setFileCleaningTracker(ServletContext, FileCleaningTracker)
.public void contextDestroyed(ServletContextEvent sce)+
FileCleaningTracker.exitWhenFinished()
.contextDestroyed
in interface ServletContextListener
sce
- The servlet context, used for calling
+ getFileCleaningTracker(ServletContext)
.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/ServletFileUpload.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/ServletFileUpload.html new file mode 100644 index 0000000..fbb8975 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/ServletFileUpload.html @@ -0,0 +1,479 @@ + + + + + + +public class ServletFileUpload +extends FileUpload+
High level API for processing file uploads.
+ +This class handles multiple files per single HTML widget, sent using
+ multipart/mixed
encoding type, as specified by
+ RFC 1867. Use parseRequest(HttpServletRequest)
to acquire a list of FileItem
s associated with a given HTML
+ widget.
How the data for individual parts is stored is determined by the factory + used to create them; a given part may be in memory, on disk, or somewhere + else.
FileUploadBase.FileSizeLimitExceededException, FileUploadBase.FileUploadIOException, FileUploadBase.InvalidContentTypeException, FileUploadBase.IOFileUploadException, FileUploadBase.SizeException, FileUploadBase.SizeLimitExceededException, FileUploadBase.UnknownSizeException
ATTACHMENT, CONTENT_DISPOSITION, CONTENT_LENGTH, CONTENT_TYPE, FORM_DATA, MAX_HEADER_SIZE, MULTIPART, MULTIPART_FORM_DATA, MULTIPART_MIXED
Constructor and Description | +
---|
ServletFileUpload()
+Constructs an uninitialised instance of this class.
+ |
+
ServletFileUpload(FileItemFactory fileItemFactory)
+Constructs an instance of this class which uses the supplied factory to
+ create
+FileItem instances. |
+
Modifier and Type | +Method and Description | +
---|---|
FileItemIterator |
+getItemIterator(HttpServletRequest request)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
static boolean |
+isMultipartContent(HttpServletRequest request)
+Utility method that determines whether the request contains multipart
+ content.
+ |
+
Map<String,List<FileItem>> |
+parseParameterMap(HttpServletRequest request)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
List<FileItem> |
+parseRequest(HttpServletRequest request)
+Processes an RFC 1867
+ compliant
+multipart/form-data stream. |
+
getFileItemFactory, setFileItemFactory
createItem, getBoundary, getFieldName, getFieldName, getFileName, getFileName, getFileSizeMax, getHeader, getHeaderEncoding, getItemIterator, getParsedHeaders, getProgressListener, getSizeMax, isMultipartContent, newFileItemHeaders, parseHeaders, parseParameterMap, parseRequest, setFileSizeMax, setHeaderEncoding, setProgressListener, setSizeMax
public ServletFileUpload()+
setFileItemFactory()
, before attempting
+ to parse requests.FileUpload.FileUpload(FileItemFactory)
public ServletFileUpload(FileItemFactory fileItemFactory)+
FileItem
instances.fileItemFactory
- The factory to use for creating file items.FileUpload.FileUpload()
public static final boolean isMultipartContent(HttpServletRequest request)+
request
- The servlet request to be evaluated. Must be non-null.true
if the request is multipart;
+ false
otherwise.public List<FileItem> parseRequest(HttpServletRequest request) + throws FileUploadException+
multipart/form-data
stream.parseRequest
in class FileUploadBase
request
- The servlet request to be parsed.FileItem
instances parsed from the
+ request, in the order that they were transmitted.FileUploadException
- if there are problems reading/parsing
+ the request or storing files.public Map<String,List<FileItem>> parseParameterMap(HttpServletRequest request) + throws FileUploadException+
multipart/form-data
stream.request
- The servlet request to be parsed.FileItem
instances parsed from the request.FileUploadException
- if there are problems reading/parsing
+ the request or storing files.public FileItemIterator getItemIterator(HttpServletRequest request) + throws FileUploadException, + IOException+
multipart/form-data
stream.request
- The servlet request to be parsed.FileItemStream
+ parsed from the request, in the order that they were
+ transmitted.FileUploadException
- if there are problems reading/parsing
+ the request or storing files.IOException
- An I/O error occurred. This may be a network
+ error while communicating with the client or a problem while
+ storing the uploaded content.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/ServletRequestContext.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/ServletRequestContext.html new file mode 100644 index 0000000..ff916d8 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/ServletRequestContext.html @@ -0,0 +1,420 @@ + + + + + + +public class ServletRequestContext +extends Object +implements UploadContext+
Provides access to the request information needed for a request made to + an HTTP servlet.
Constructor and Description | +
---|
ServletRequestContext(HttpServletRequest request)
+Construct a context for this request.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
long |
+contentLength()
+Retrieve the content length of the request.
+ |
+
String |
+getCharacterEncoding()
+Retrieve the character encoding for the request.
+ |
+
int |
+getContentLength()
+Deprecated.
+
+1.3 Use
+contentLength() instead |
+
String |
+getContentType()
+Retrieve the content type of the request.
+ |
+
InputStream |
+getInputStream()
+Retrieve the input stream for the request.
+ |
+
String |
+toString()
+Returns a string representation of this object.
+ |
+
public ServletRequestContext(HttpServletRequest request)+
request
- The request to which this context applies.public String getCharacterEncoding()+
getCharacterEncoding
in interface RequestContext
public String getContentType()+
getContentType
in interface RequestContext
@Deprecated +public int getContentLength()+
contentLength()
insteadgetContentLength
in interface RequestContext
public long contentLength()+
contentLength
in interface UploadContext
public InputStream getInputStream() + throws IOException+
getInputStream
in interface RequestContext
IOException
- if a problem occurs.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/class-use/FileCleanerCleanup.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/class-use/FileCleanerCleanup.html new file mode 100644 index 0000000..1f888c8 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/class-use/FileCleanerCleanup.html @@ -0,0 +1,125 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/class-use/ServletFileUpload.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/class-use/ServletFileUpload.html new file mode 100644 index 0000000..97576fb --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/class-use/ServletFileUpload.html @@ -0,0 +1,125 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/class-use/ServletRequestContext.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/class-use/ServletRequestContext.html new file mode 100644 index 0000000..42189cd --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/class-use/ServletRequestContext.html @@ -0,0 +1,125 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/package-frame.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/package-frame.html new file mode 100644 index 0000000..1fc6457 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/package-frame.html @@ -0,0 +1,22 @@ + + + + + + +FileUpload
+ for use in servlets conforming to JSR 53.See: Description
+Class | +Description | +
---|---|
FileCleanerCleanup | +
+ A servlet context listener, which ensures that the
+
+FileCleaningTracker 's reaper thread is terminated,
+ when the web application is destroyed. |
+
ServletFileUpload | +
+ High level API for processing file uploads.
+ |
+
ServletRequestContext | +
+ Provides access to the request information needed for a request made to
+ an HTTP servlet.
+ |
+
+ An implementation of
+ FileUpload
+ for use in servlets conforming to JSR 53. This implementation requires
+ only access to the servlet's current HttpServletRequest
+ instance, and a suitable
+ FileItemFactory
+ implementation, such as
+ DiskFileItemFactory
.
+
+ The following code fragment demonstrates typical usage. +
++ DiskFileItemFactory factory = new DiskFileItemFactory(); + // Configure the factory here, if desired. + ServletFileUpload upload = new ServletFileUpload(factory); + // Configure the uploader here, if desired. + List fileItems = upload.parseRequest(request); ++
+ Please see the FileUpload + User Guide + for further details and examples of how to use this package. +
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/package-tree.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/package-tree.html new file mode 100644 index 0000000..0b11a73 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/package-tree.html @@ -0,0 +1,148 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/package-use.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/package-use.html new file mode 100644 index 0000000..4bd21df --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/servlet/package-use.html @@ -0,0 +1,125 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/Closeable.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/Closeable.html new file mode 100644 index 0000000..51ab6cf --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/Closeable.html @@ -0,0 +1,258 @@ + + + + + + +public interface Closeable
+Modifier and Type | +Method and Description | +
---|---|
void |
+close()
+Closes the object.
+ |
+
boolean |
+isClosed()
+Returns, whether the object is already closed.
+ |
+
void close() + throws IOException+
IOException
- An I/O error occurred.boolean isClosed() + throws IOException+
IOException
- An I/O error occurred.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/FileItemHeadersImpl.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/FileItemHeadersImpl.html new file mode 100644 index 0000000..4f054e6 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/FileItemHeadersImpl.html @@ -0,0 +1,390 @@ + + + + + + +public class FileItemHeadersImpl +extends Object +implements FileItemHeaders, Serializable+
FileItemHeaders
interface.Constructor and Description | +
---|
FileItemHeadersImpl() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+addHeader(String name,
+ String value)
+Method to add header values to this instance.
+ |
+
String |
+getHeader(String name)
+Returns the value of the specified part header as a
+String . |
+
Iterator<String> |
+getHeaderNames()
+
+ Returns an
+Iterator of all the header names. |
+
Iterator<String> |
+getHeaders(String name)
+
+ Returns all the values of the specified item header as an
+
+Iterator of String objects. |
+
public String getHeader(String name)+
String
.
+
+ If the part did not include a header of the specified name, this method
+ return null
. If there are multiple headers with the same
+ name, this method returns the first header in the item. The header
+ name is case insensitive.getHeader
in interface FileItemHeaders
name
- a String
specifying the header nameString
containing the value of the requested
+ header, or null
if the item does not have a header
+ of that namepublic Iterator<String> getHeaderNames()+
+ Returns an Iterator
of all the header names.
+
getHeaderNames
in interface FileItemHeaders
Iterator
containing all of the names of
+ headers provided with this file item. If the item does not have
+ any headers return an empty Iterator
public Iterator<String> getHeaders(String name)+
+ Returns all the values of the specified item header as an
+ Iterator
of String
objects.
+
+ If the item did not include any headers of the specified name, this
+ method returns an empty Iterator
. The header name is
+ case insensitive.
+
getHeaders
in interface FileItemHeaders
name
- a String
specifying the header nameIterator
containing the values of the
+ requested header. If the item does not have any headers of
+ that name, return an empty Iterator
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/LimitedInputStream.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/LimitedInputStream.html new file mode 100644 index 0000000..5371548 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/LimitedInputStream.html @@ -0,0 +1,484 @@ + + + + + + +public abstract class LimitedInputStream +extends FilterInputStream +implements Closeable+
in
Constructor and Description | +
---|
LimitedInputStream(InputStream inputStream,
+ long pSizeMax)
+Creates a new instance.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+close()
+Closes this input stream and releases any system resources
+ associated with the stream.
+ |
+
boolean |
+isClosed()
+Returns, whether this stream is already closed.
+ |
+
protected abstract void |
+raiseError(long pSizeMax,
+ long pCount)
+Called to indicate, that the input streams limit has
+ been exceeded.
+ |
+
int |
+read()
+Reads the next byte of data from this input stream.
+ |
+
int |
+read(byte[] b,
+ int off,
+ int len)
+Reads up to
+len bytes of data from this input stream
+ into an array of bytes. |
+
available, mark, markSupported, read, reset, skip
public LimitedInputStream(InputStream inputStream, + long pSizeMax)+
inputStream
- The input stream, which shall be limited.pSizeMax
- The limit; no more than this number of bytes
+ shall be returned by the source stream.protected abstract void raiseError(long pSizeMax, + long pCount) + throws IOException+
pSizeMax
- The input streams limit, in bytes.pCount
- The actual number of bytes.IOException
- The called method is expected
+ to raise an IOException.public int read() + throws IOException+
int
in the range
+ 0
to 255
. If no byte is available
+ because the end of the stream has been reached, the value
+ -1
is returned. This method blocks until input data
+ is available, the end of the stream is detected, or an exception
+ is thrown.
+
+ This method
+ simply performs in.read()
and returns the result.
read
in class FilterInputStream
-1
if the end of the
+ stream is reached.IOException
- if an I/O error occurs.FilterInputStream.in
public int read(byte[] b, + int off, + int len) + throws IOException+
len
bytes of data from this input stream
+ into an array of bytes. If len
is not zero, the method
+ blocks until some input is available; otherwise, no
+ bytes are read and 0
is returned.
+
+ This method simply performs in.read(b, off, len)
+ and returns the result.
read
in class FilterInputStream
b
- the buffer into which the data is read.off
- The start offset in the destination array
+ b
.len
- the maximum number of bytes read.-1
if there is no more data because the end of
+ the stream has been reached.NullPointerException
- If b
is null
.IndexOutOfBoundsException
- If off
is negative,
+ len
is negative, or len
is greater than
+ b.length - off
IOException
- if an I/O error occurs.FilterInputStream.in
public boolean isClosed() + throws IOException+
IOException
- An I/O error occurred.public void close() + throws IOException+
in.close()
.close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterInputStream
IOException
- if an I/O error occurs.FilterInputStream.in
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/Streams.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/Streams.html new file mode 100644 index 0000000..caf950d --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/Streams.html @@ -0,0 +1,409 @@ + + + + + + +public final class Streams +extends Object+
Modifier and Type | +Method and Description | +
---|---|
static String |
+asString(InputStream inputStream)
+This convenience method allows to read a
+
+FileItemStream 's
+ content into a string. |
+
static String |
+asString(InputStream inputStream,
+ String encoding)
+This convenience method allows to read a
+
+FileItemStream 's
+ content into a string, using the given character encoding. |
+
static String |
+checkFileName(String fileName)
+Checks, whether the given file name is valid in the sense,
+ that it doesn't contain any NUL characters.
+ |
+
static long |
+copy(InputStream inputStream,
+ OutputStream outputStream,
+ boolean closeOutputStream)
+Copies the contents of the given
+InputStream
+ to the given OutputStream . |
+
static long |
+copy(InputStream inputStream,
+ OutputStream outputStream,
+ boolean closeOutputStream,
+ byte[] buffer)
+Copies the contents of the given
+InputStream
+ to the given OutputStream . |
+
public static long copy(InputStream inputStream, + OutputStream outputStream, + boolean closeOutputStream) + throws IOException+
InputStream
+ to the given OutputStream
. Shortcut for
+ + copy(pInputStream, pOutputStream, new byte[8192]); +
inputStream
- The input stream, which is being read.
+ It is guaranteed, that InputStream.close()
is called
+ on the stream.outputStream
- The output stream, to which data should
+ be written. May be null, in which case the input streams
+ contents are simply discarded.closeOutputStream
- True guarantees, that OutputStream.close()
+ is called on the stream. False indicates, that only
+ OutputStream.flush()
should be called finally.IOException
- An I/O error occurred.public static long copy(InputStream inputStream, + OutputStream outputStream, + boolean closeOutputStream, + byte[] buffer) + throws IOException+
InputStream
+ to the given OutputStream
.inputStream
- The input stream, which is being read.
+ It is guaranteed, that InputStream.close()
is called
+ on the stream.outputStream
- The output stream, to which data should
+ be written. May be null, in which case the input streams
+ contents are simply discarded.closeOutputStream
- True guarantees, that OutputStream.close()
+ is called on the stream. False indicates, that only
+ OutputStream.flush()
should be called finally.buffer
- Temporary buffer, which is to be used for
+ copying data.IOException
- An I/O error occurred.public static String asString(InputStream inputStream) + throws IOException+
FileItemStream
's
+ content into a string. The platform's default character encoding
+ is used for converting bytes into characters.inputStream
- The input stream to read.IOException
- An I/O error occurred.asString(InputStream, String)
public static String asString(InputStream inputStream, + String encoding) + throws IOException+
FileItemStream
's
+ content into a string, using the given character encoding.inputStream
- The input stream to read.encoding
- The character encoding, typically "UTF-8".IOException
- An I/O error occurred.asString(InputStream)
public static String checkFileName(String fileName)+
InvalidFileNameException
is raised.fileName
- The file name to checkInvalidFileNameException
- The file name was found to be invalid.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/class-use/Closeable.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/class-use/Closeable.html new file mode 100644 index 0000000..ad931f0 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/class-use/Closeable.html @@ -0,0 +1,125 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/class-use/FileItemHeadersImpl.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/class-use/FileItemHeadersImpl.html new file mode 100644 index 0000000..53f77b9 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/class-use/FileItemHeadersImpl.html @@ -0,0 +1,171 @@ + + + + + + +Package | +Description | +
---|---|
org.apache.commons.fileupload | +
+
+ A component for handling HTML file uploads as specified by
+ RFC 1867.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
protected FileItemHeadersImpl |
+FileUploadBase.newFileItemHeaders()
+Creates a new instance of
+FileItemHeaders . |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/class-use/LimitedInputStream.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/class-use/LimitedInputStream.html new file mode 100644 index 0000000..c1c99c5 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/class-use/LimitedInputStream.html @@ -0,0 +1,125 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/class-use/Streams.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/class-use/Streams.html new file mode 100644 index 0000000..91c93c2 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/class-use/Streams.html @@ -0,0 +1,125 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/mime/MimeUtility.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/mime/MimeUtility.html new file mode 100644 index 0000000..ad9fac3 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/mime/MimeUtility.html @@ -0,0 +1,259 @@ + + + + + + +public final class MimeUtility +extends Object+
Modifier and Type | +Method and Description | +
---|---|
static String |
+decodeText(String text)
+Decode a string of text obtained from a mail header into
+ its proper form.
+ |
+
public static String decodeText(String text) + throws UnsupportedEncodingException+
text
- The text to decode.UnsupportedEncodingException
- if the detected encoding in the input text is not supported.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/mime/class-use/MimeUtility.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/mime/class-use/MimeUtility.html new file mode 100644 index 0000000..dec7480 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/mime/class-use/MimeUtility.html @@ -0,0 +1,125 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/mime/package-frame.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/mime/package-frame.html new file mode 100644 index 0000000..06c2264 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/mime/package-frame.html @@ -0,0 +1,20 @@ + + + + + + +See: Description
+Class | +Description | +
---|---|
MimeUtility | +
+ Utility class to decode MIME texts.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/mime/package-tree.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/mime/package-tree.html new file mode 100644 index 0000000..e94b20a --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/mime/package-tree.html @@ -0,0 +1,138 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/mime/package-use.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/mime/package-use.html new file mode 100644 index 0000000..82de720 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/mime/package-use.html @@ -0,0 +1,125 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/package-frame.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/package-frame.html new file mode 100644 index 0000000..80e3379 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/package-frame.html @@ -0,0 +1,26 @@ + + + + + + +See: Description
+Interface | +Description | +
---|---|
Closeable | +
+ Interface of an object, which may be closed.
+ |
+
Class | +Description | +
---|---|
FileItemHeadersImpl | +
+ Default implementation of the
+FileItemHeaders interface. |
+
LimitedInputStream | +
+ An input stream, which limits its data size.
+ |
+
Streams | +
+ Utility class for working with streams.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/package-tree.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/package-tree.html new file mode 100644 index 0000000..aae5ed1 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/package-tree.html @@ -0,0 +1,152 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/package-use.html b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/package-use.html new file mode 100644 index 0000000..a96f385 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/org/apache/commons/fileupload/util/package-use.html @@ -0,0 +1,164 @@ + + + + + + +Package | +Description | +
---|---|
org.apache.commons.fileupload | +
+
+ A component for handling HTML file uploads as specified by
+ RFC 1867.
+ |
+
Class and Description | +
---|
FileItemHeadersImpl
+ Default implementation of the
+FileItemHeaders interface. |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/overview-frame.html b/docs/licenses/Apache FileUploader/site/apidocs/overview-frame.html new file mode 100644 index 0000000..5b92db8 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/overview-frame.html @@ -0,0 +1,26 @@ + + + + + + ++ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/overview-summary.html b/docs/licenses/Apache FileUploader/site/apidocs/overview-summary.html new file mode 100644 index 0000000..b496f03 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/overview-summary.html @@ -0,0 +1,185 @@ + + + + + + +
Package | +Description | +
---|---|
org.apache.commons.fileupload | +
+
+ A component for handling HTML file uploads as specified by
+ RFC 1867.
+ |
+
org.apache.commons.fileupload.disk | +
+
+ A disk-based implementation of the
+
+FileItem
+ interface. |
+
org.apache.commons.fileupload.portlet | +
+
+ An implementation of
+
+FileUpload
+ for use in portlets conforming to JSR 168. |
+
org.apache.commons.fileupload.servlet | +
+
+ An implementation of
+
+FileUpload
+ for use in servlets conforming to JSR 53. |
+
org.apache.commons.fileupload.util | +
+ This package contains various IO related utility classes
+ or methods, which are basically reusable and not necessarily
+ restricted to the scope of a file upload.
+ |
+
org.apache.commons.fileupload.util.mime | +
+ MIME decoder implementation, imported and retailed from
+ Apache Geronimo.
+ |
+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/overview-tree.html b/docs/licenses/Apache FileUploader/site/apidocs/overview-tree.html new file mode 100644 index 0000000..a9f9a30 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/overview-tree.html @@ -0,0 +1,240 @@ + + + + + + +Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/package-list b/docs/licenses/Apache FileUploader/site/apidocs/package-list new file mode 100644 index 0000000..5d03197 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/package-list @@ -0,0 +1,6 @@ +org.apache.commons.fileupload +org.apache.commons.fileupload.disk +org.apache.commons.fileupload.portlet +org.apache.commons.fileupload.servlet +org.apache.commons.fileupload.util +org.apache.commons.fileupload.util.mime diff --git a/docs/licenses/Apache FileUploader/site/apidocs/script.js b/docs/licenses/Apache FileUploader/site/apidocs/script.js new file mode 100644 index 0000000..b346356 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/script.js @@ -0,0 +1,30 @@ +function show(type) +{ + count = 0; + for (var key in methods) { + var row = document.getElementById(key); + if ((methods[key] & type) != 0) { + row.style.display = ''; + row.className = (count++ % 2) ? rowColor : altColor; + } + else + row.style.display = 'none'; + } + updateTabs(type); +} + +function updateTabs(type) +{ + for (var value in tabs) { + var sNode = document.getElementById(tabs[value][0]); + var spanNode = sNode.firstChild; + if (value == type) { + sNode.className = activeTableTab; + spanNode.innerHTML = tabs[value][1]; + } + else { + sNode.className = tableTab; + spanNode.innerHTML = "" + tabs[value][1] + ""; + } + } +} diff --git a/docs/licenses/Apache FileUploader/site/apidocs/serialized-form.html b/docs/licenses/Apache FileUploader/site/apidocs/serialized-form.html new file mode 100644 index 0000000..43b6643 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/serialized-form.html @@ -0,0 +1,464 @@ + + + + + + +FileUploadException cause+
IOException cause+
long actual+
long permitted+
Throwable cause+
String name+
private void readObject(ObjectInputStream in) + throws IOException, + ClassNotFoundException+
IOException
- if an error occurs.ClassNotFoundException
- if class cannot be found.private void writeObject(ObjectOutputStream out) + throws IOException+
IOException
- if an error occurs.String fieldName+
String contentType+
null
if
+ not defined.boolean isFormField+
String fileName+
long size+
int sizeThreshold+
File repository+
byte[] cachedContent+
File dfosFile+
FileItemHeaders headers+
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.
+ + diff --git a/docs/licenses/Apache FileUploader/site/apidocs/stylesheet.css b/docs/licenses/Apache FileUploader/site/apidocs/stylesheet.css new file mode 100644 index 0000000..98055b2 --- /dev/null +++ b/docs/licenses/Apache FileUploader/site/apidocs/stylesheet.css @@ -0,0 +1,574 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ + +@import url('resources/fonts/dejavu.css'); + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4A6782; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; + font-style:italic; +} +h4 { + font-size:13px; +} +h5 { + font-size:12px; +} +h6 { + font-size:11px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +table tr td dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:11px; + z-index:200; + margin-top:-9px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-color:#4D7A97; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:11px; + margin:0; +} +.topNav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.bottomNav { + margin-top:10px; + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.subNav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +ul.subNavList li{ + list-style:none; + float:left; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.navBarCell1Rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skipNav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader span{ + margin-right:15px; +} +.indexHeader h1 { + font-size:13px; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:12px; +} +.indexContainer h2 { + font-size:13px; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; + padding-top:2px; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:5px 0 10px 0px; + font-size:14px; + font-family:'DejaVu Sans Mono',monospace; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #ededed; + background-color:#f8f8f8; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { + width:100%; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; +} +.overviewSummary, .memberSummary { + padding:0px; +} +.overviewSummary caption, .memberSummary caption, .typeSummary caption, +.useSummary caption, .constantsSummary caption, .deprecatedSummary caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + padding-top:10px; + padding-left:1px; + margin:0px; + white-space:pre; +} +.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, +.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, +.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, +.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, +.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, +.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, +.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, +.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, +.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +.memberSummary caption span.activeTableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#F8981D; + height:16px; +} +.memberSummary caption span.tableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#4D7A97; + height:16px; +} +.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { + padding-top:0px; + padding-left:0px; + padding-right:0px; + background-image:none; + float:none; + display:inline; +} +.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, +.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { + display:none; + width:5px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .activeTableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .tableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + background-color:#4D7A97; + float:left; + +} +.overviewSummary td, .memberSummary td, .typeSummary td, +.useSummary td, .constantsSummary td, .deprecatedSummary td { + text-align:left; + padding:0px 0px 12px 10px; +} +th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, +td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ + vertical-align:top; + padding-right:0px; + padding-top:8px; + padding-bottom:3px; +} +th.colFirst, th.colLast, th.colOne, .constantsSummary th { + background:#dee3e9; + text-align:left; + padding:8px 3px 3px 7px; +} +td.colFirst, th.colFirst { + white-space:nowrap; + font-size:13px; +} +td.colLast, th.colLast { + font-size:13px; +} +td.colOne, th.colOne { + font-size:13px; +} +.overviewSummary td.colFirst, .overviewSummary th.colFirst, +.useSummary td.colFirst, .useSummary th.colFirst, +.overviewSummary td.colOne, .overviewSummary th.colOne, +.memberSummary td.colFirst, .memberSummary th.colFirst, +.memberSummary td.colOne, .memberSummary th.colOne, +.typeSummary td.colFirst{ + width:25%; + vertical-align:top; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +.tableSubHeadingColor { + background-color:#EEEEFF; +} +.altColor { + background-color:#FFFFFF; +} +.rowColor { + background-color:#EEEEEF; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} + +ul.blockList ul.blockList ul.blockList li.blockList h3 { + font-style:normal; +} + +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} + +td.colLast div { + padding-top:0px; +} + + +td.colLast a { + padding-bottom:3px; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:3px 10px 2px 0px; + color:#474747; +} +.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, +.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, +.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink { + font-weight:bold; +} +.deprecationComment, .emphasizedPhrase, .interfaceName { + font-style:italic; +} + +div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, +div.block div.block span.interfaceName { + font-style:normal; +} + +div.contentContainer ul.blockList li.blockList h2{ + padding-bottom:0px; +} diff --git a/docs/licenses/Apache Tomcat/LICENSE b/docs/licenses/Apache Tomcat/LICENSE new file mode 100644 index 0000000..e6a6baf --- /dev/null +++ b/docs/licenses/Apache Tomcat/LICENSE @@ -0,0 +1,1061 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + +APACHE TOMCAT SUBCOMPONENTS: + +Apache Tomcat includes a number of subcomponents with separate copyright notices +and license terms. Your use of these subcomponents is subject to the terms and +conditions of the following licenses. + + +For the Eclipse JDT Core Batch Compiler (ecj-x.x.x.jar) component: + +Eclipse Public License - v 1.0 + +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC +LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM +CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + +a) in the case of the initial Contributor, the initial code and documentation +distributed under this Agreement, and + +b) in the case of each subsequent Contributor: + +i) changes to the Program, and + +ii) additions to the Program; + +where such changes and/or additions to the Program originate from and are +distributed by that particular Contributor. A Contribution 'originates' from a +Contributor if it was added to the Program by such Contributor itself or anyone +acting on such Contributor's behalf. Contributions do not include additions to +the Program which: (i) are separate modules of software distributed in +conjunction with the Program under their own license agreement, and (ii) are not +derivative works of the Program. + +"Contributor" means any person or entity that distributes the Program. + +"Licensed Patents" mean patent claims licensable by a Contributor which are +necessarily infringed by the use or sale of its Contribution alone or when +combined with the Program. + +"Program" means the Contributions distributed in accordance with this Agreement. + +"Recipient" means anyone who receives the Program under this Agreement, +including all Contributors. + +2. GRANT OF RIGHTS + +a) Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide, royalty-free copyright license to +reproduce, prepare derivative works of, publicly display, publicly perform, +distribute and sublicense the Contribution of such Contributor, if any, and such +derivative works, in source code and object code form. + +b) Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed +Patents to make, use, sell, offer to sell, import and otherwise transfer the +Contribution of such Contributor, if any, in source code and object code form. +This patent license shall apply to the combination of the Contribution and the +Program if, at the time the Contribution is added by the Contributor, such +addition of the Contribution causes such combination to be covered by the +Licensed Patents. The patent license shall not apply to any other combinations +which include the Contribution. No hardware per se is licensed hereunder. + +c) Recipient understands that although each Contributor grants the licenses to +its Contributions set forth herein, no assurances are provided by any +Contributor that the Program does not infringe the patent or other intellectual +property rights of any other entity. Each Contributor disclaims any liability to +Recipient for claims brought by any other entity based on infringement of +intellectual property rights or otherwise. As a condition to exercising the +rights and licenses granted hereunder, each Recipient hereby assumes sole +responsibility to secure any other intellectual property rights needed, if any. +For example, if a third party patent license is required to allow Recipient to +distribute the Program, it is Recipient's responsibility to acquire that license +before distributing the Program. + +d) Each Contributor represents that to its knowledge it has sufficient copyright +rights in its Contribution, if any, to grant the copyright license set forth in +this Agreement. + +3. REQUIREMENTS + +A Contributor may choose to distribute the Program in object code form under its +own license agreement, provided that: + +a) it complies with the terms and conditions of this Agreement; and + +b) its license agreement: + +i) effectively disclaims on behalf of all Contributors all warranties and +conditions, express and implied, including warranties or conditions of title and +non-infringement, and implied warranties or conditions of merchantability and +fitness for a particular purpose; + +ii) effectively excludes on behalf of all Contributors all liability for +damages, including direct, indirect, special, incidental and consequential +damages, such as lost profits; + +iii) states that any provisions which differ from this Agreement are offered by +that Contributor alone and not by any other party; and + +iv) states that source code for the Program is available from such Contributor, +and informs licensees how to obtain it in a reasonable manner on or through a +medium customarily used for software exchange. + +When the Program is made available in source code form: + +a) it must be made available under this Agreement; and + +b) a copy of this Agreement must be included with each copy of the Program. + +Contributors may not remove or alter any copyright notices contained within the +Program. + +Each Contributor must identify itself as the originator of its Contribution, if +any, in a manner that reasonably allows subsequent Recipients to identify the +originator of the Contribution. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities with +respect to end users, business partners and the like. While this license is +intended to facilitate the commercial use of the Program, the Contributor who +includes the Program in a commercial product offering should do so in a manner +which does not create potential liability for other Contributors. Therefore, if +a Contributor includes the Program in a commercial product offering, such +Contributor ("Commercial Contributor") hereby agrees to defend and indemnify +every other Contributor ("Indemnified Contributor") against any losses, damages +and costs (collectively "Losses") arising from claims, lawsuits and other legal +actions brought by a third party against the Indemnified Contributor to the +extent caused by the acts or omissions of such Commercial Contributor in +connection with its distribution of the Program in a commercial product +offering. The obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. In order +to qualify, an Indemnified Contributor must: a) promptly notify the Commercial +Contributor in writing of such claim, and b) allow the Commercial Contributor +to control, and cooperate with the Commercial Contributor in, the defense and +any related settlement negotiations. The Indemnified Contributor may +participate in any such claim at its own expense. + +For example, a Contributor might include the Program in a commercial product +offering, Product X. That Contributor is then a Commercial Contributor. If that +Commercial Contributor then makes performance claims, or offers warranties +related to Product X, those performance claims and warranties are such +Commercial Contributor's responsibility alone. Under this section, the +Commercial Contributor would have to defend claims against the other +Contributors related to those performance claims and warranties, and if a court +requires any other Contributor to pay any damages as a result, the Commercial +Contributor must pay those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR +IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, +NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each +Recipient is solely responsible for determining the appropriateness of using and +distributing the Program and assumes all risks associated with its exercise of +rights under this Agreement , including but not limited to the risks and costs +of program errors, compliance with applicable laws, damage to or loss of data, +programs or equipment, and unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY +CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST +PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS +GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under applicable +law, it shall not affect the validity or enforceability of the remainder of the +terms of this Agreement, and without further action by the parties hereto, such +provision shall be reformed to the minimum extent necessary to make such +provision valid and enforceable. + +If Recipient institutes patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Program itself +(excluding combinations of the Program with other software or hardware) +infringes such Recipient's patent(s), then such Recipient's rights granted under +Section 2(b) shall terminate as of the date such litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it fails to +comply with any of the material terms or conditions of this Agreement and does +not cure such failure in a reasonable period of time after becoming aware of +such noncompliance. If all Recipient's rights under this Agreement terminate, +Recipient agrees to cease use and distribution of the Program as soon as +reasonably practicable. However, Recipient's obligations under this Agreement +and any licenses granted by Recipient relating to the Program shall continue and +survive. + +Everyone is permitted to copy and distribute copies of this Agreement, but in +order to avoid inconsistency the Agreement is copyrighted and may only be +modified in the following manner. The Agreement Steward reserves the right to +publish new versions (including revisions) of this Agreement from time to time. +No one other than the Agreement Steward has the right to modify this Agreement. +The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation +may assign the responsibility to serve as the Agreement Steward to a suitable +separate entity. Each new version of the Agreement will be given a +distinguishing version number. The Program (including Contributions) may always +be distributed subject to the version of the Agreement under which it was +received. In addition, after a new version of the Agreement is published, +Contributor may elect to distribute the Program (including its Contributions) +under the new version. Except as expressly stated in Sections 2(a) and 2(b) +above, Recipient receives no rights or licenses to the intellectual property of +any Contributor under this Agreement, whether expressly, by implication, +estoppel or otherwise. All rights in the Program not expressly granted under +this Agreement are reserved. + +This Agreement is governed by the laws of the State of New York and the +intellectual property laws of the United States of America. No party to this +Agreement will bring a legal action under this Agreement more than one year +after the cause of action arose. Each party waives its rights to a jury trial in +any resulting litigation. + + +For the Windows Installer component: + + * All NSIS source code, plug-ins, documentation, examples, header files and + graphics, with the exception of the compression modules and where + otherwise noted, are licensed under the zlib/libpng license. + * The zlib compression module for NSIS is licensed under the zlib/libpng + license. + * The bzip2 compression module for NSIS is licensed under the bzip2 license. + * The lzma compression module for NSIS is licensed under the Common Public + License version 1.0. + +zlib/libpng license + +This software is provided 'as-is', without any express or implied warranty. In +no event will the authors be held liable for any damages arising from the use of +this software. + +Permission is granted to anyone to use this software for any purpose, including +commercial applications, and to alter it and redistribute it freely, subject to +the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not claim + that you wrote the original software. If you use this software in a + product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + +bzip2 license + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + 2. The origin of this software must not be misrepresented; you must not claim + that you wrote the original software. If you use this software in a + product, an acknowledgment in the product documentation would be + appreciated but is not required. + 3. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 4. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY +OF SUCH DAMAGE. + +Julian Seward, Cambridge, UK. + +jseward@acm.org +Common Public License version 1.0 + +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC +LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM +CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + +a) in the case of the initial Contributor, the initial code and documentation +distributed under this Agreement, and b) in the case of each subsequent +Contributor: + +i) changes to the Program, and + +ii) additions to the Program; + +where such changes and/or additions to the Program originate from and are +distributed by that particular Contributor. A Contribution 'originates' from a +Contributor if it was added to the Program by such Contributor itself or anyone +acting on such Contributor's behalf. Contributions do not include additions to +the Program which: (i) are separate modules of software distributed in +conjunction with the Program under their own license agreement, and (ii) are not +derivative works of the Program. + +"Contributor" means any person or entity that distributes the Program. + +"Licensed Patents " mean patent claims licensable by a Contributor which are +necessarily infringed by the use or sale of its Contribution alone or when +combined with the Program. + +"Program" means the Contributions distributed in accordance with this Agreement. + +"Recipient" means anyone who receives the Program under this Agreement, +including all Contributors. + +2. GRANT OF RIGHTS + +a) Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide, royalty-free copyright license to +reproduce, prepare derivative works of, publicly display, publicly perform, +distribute and sublicense the Contribution of such Contributor, if any, and such +derivative works, in source code and object code form. + +b) Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed +Patents to make, use, sell, offer to sell, import and otherwise transfer the +Contribution of such Contributor, if any, in source code and object code form. +This patent license shall apply to the combination of the Contribution and the +Program if, at the time the Contribution is added by the Contributor, such +addition of the Contribution causes such combination to be covered by the +Licensed Patents. The patent license shall not apply to any other combinations +which include the Contribution. No hardware per se is licensed hereunder. + +c) Recipient understands that although each Contributor grants the licenses to +its Contributions set forth herein, no assurances are provided by any +Contributor that the Program does not infringe the patent or other intellectual +property rights of any other entity. Each Contributor disclaims any liability to +Recipient for claims brought by any other entity based on infringement of +intellectual property rights or otherwise. As a condition to exercising the +rights and licenses granted hereunder, each Recipient hereby assumes sole +responsibility to secure any other intellectual property rights needed, if any. +For example, if a third party patent license is required to allow Recipient to +distribute the Program, it is Recipient's responsibility to acquire that license +before distributing the Program. + +d) Each Contributor represents that to its knowledge it has sufficient copyright +rights in its Contribution, if any, to grant the copyright license set forth in +this Agreement. + +3. REQUIREMENTS + +A Contributor may choose to distribute the Program in object code form under its +own license agreement, provided that: + +a) it complies with the terms and conditions of this Agreement; and + +b) its license agreement: + +i) effectively disclaims on behalf of all Contributors all warranties and +conditions, express and implied, including warranties or conditions of title and +non-infringement, and implied warranties or conditions of merchantability and +fitness for a particular purpose; + +ii) effectively excludes on behalf of all Contributors all liability for +damages, including direct, indirect, special, incidental and consequential +damages, such as lost profits; + +iii) states that any provisions which differ from this Agreement are offered by +that Contributor alone and not by any other party; and + +iv) states that source code for the Program is available from such Contributor, +and informs licensees how to obtain it in a reasonable manner on or through a +medium customarily used for software exchange. + +When the Program is made available in source code form: + +a) it must be made available under this Agreement; and + +b) a copy of this Agreement must be included with each copy of the Program. + +Contributors may not remove or alter any copyright notices contained within the +Program. + +Each Contributor must identify itself as the originator of its Contribution, if +any, in a manner that reasonably allows subsequent Recipients to identify the +originator of the Contribution. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities with +respect to end users, business partners and the like. While this license is +intended to facilitate the commercial use of the Program, the Contributor who +includes the Program in a commercial product offering should do so in a manner +which does not create potential liability for other Contributors. Therefore, if +a Contributor includes the Program in a commercial product offering, such +Contributor ("Commercial Contributor") hereby agrees to defend and indemnify +every other Contributor ("Indemnified Contributor") against any losses, damages +and costs (collectively "Losses") arising from claims, lawsuits and other legal +actions brought by a third party against the Indemnified Contributor to the +extent caused by the acts or omissions of such Commercial Contributor in +connection with its distribution of the Program in a commercial product +offering. The obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. In order +to qualify, an Indemnified Contributor must: a) promptly notify the Commercial +Contributor in writing of such claim, and b) allow the Commercial Contributor to +control, and cooperate with the Commercial Contributor in, the defense and any +related settlement negotiations. The Indemnified Contributor may participate in +any such claim at its own expense. + +For example, a Contributor might include the Program in a commercial product +offering, Product X. That Contributor is then a Commercial Contributor. If that +Commercial Contributor then makes performance claims, or offers warranties +related to Product X, those performance claims and warranties are such +Commercial Contributor's responsibility alone. Under this section, the +Commercial Contributor would have to defend claims against the other +Contributors related to those performance claims and warranties, and if a court +requires any other Contributor to pay any damages as a result, the Commercial +Contributor must pay those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR +IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, +NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each +Recipient is solely responsible for determining the appropriateness of using and +distributing the Program and assumes all risks associated with its exercise of +rights under this Agreement, including but not limited to the risks and costs of +program errors, compliance with applicable laws, damage to or loss of data, +programs or equipment, and unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY +CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST +PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS +GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under applicable +law, it shall not affect the validity or enforceability of the remainder of the +terms of this Agreement, and without further action by the parties hereto, such +provision shall be reformed to the minimum extent necessary to make such +provision valid and enforceable. + +If Recipient institutes patent litigation against a Contributor with respect to +a patent applicable to software (including a cross-claim or counterclaim in a +lawsuit), then any patent licenses granted by that Contributor to such Recipient +under this Agreement shall terminate as of the date such litigation is filed. In +addition, if Recipient institutes patent litigation against any entity +(including a cross-claim or counterclaim in a lawsuit) alleging that the Program +itself (excluding combinations of the Program with other software or hardware) +infringes such Recipient's patent(s), then such Recipient's rights granted under +Section 2(b) shall terminate as of the date such litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it fails to +comply with any of the material terms or conditions of this Agreement and does +not cure such failure in a reasonable period of time after becoming aware of +such noncompliance. If all Recipient's rights under this Agreement terminate, +Recipient agrees to cease use and distribution of the Program as soon as +reasonably practicable. However, Recipient's obligations under this Agreement +and any licenses granted by Recipient relating to the Program shall continue and +survive. + +Everyone is permitted to copy and distribute copies of this Agreement, but in +order to avoid inconsistency the Agreement is copyrighted and may only be +modified in the following manner. The Agreement Steward reserves the right to +publish new versions (including revisions) of this Agreement from time to time. +No one other than the Agreement Steward has the right to modify this Agreement. +IBM is the initial Agreement Steward. IBM may assign the responsibility to serve +as the Agreement Steward to a suitable separate entity. Each new version of the +Agreement will be given a distinguishing version number. The Program (including +Contributions) may always be distributed subject to the version of the Agreement +under which it was received. In addition, after a new version of the Agreement +is published, Contributor may elect to distribute the Program (including its +Contributions) under the new version. Except as expressly stated in Sections +2(a) and 2(b) above, Recipient receives no rights or licenses to the +intellectual property of any Contributor under this Agreement, whether +expressly, by implication, estoppel or otherwise. All rights in the Program not +expressly granted under this Agreement are reserved. + +This Agreement is governed by the laws of the State of New York and the +intellectual property laws of the United States of America. No party to this +Agreement will bring a legal action under this Agreement more than one year +after the cause of action arose. Each party waives its rights to a jury trial in +any resulting litigation. + +Special exception for LZMA compression module + +Igor Pavlov and Amir Szekely, the authors of the LZMA compression module for +NSIS, expressly permit you to statically or dynamically link your code (or bind +by name) to the files from the LZMA compression module for NSIS without +subjecting your linked code to the terms of the Common Public license version +1.0. Any modifications or additions to files from the LZMA compression module +for NSIS, however, are subject to the terms of the Common Public License version +1.0. + + +For the following XML Schemas for Java EE Deployment Descriptors: + - javaee_5.xsd + - javaee_web_services_1_2.xsd + - javaee_web_services_client_1_2.xsd + - javaee_6.xsd + - javaee_web_services_1_3.xsd + - javaee_web_services_client_1_3.xsd + - jsp_2_2.xsd + - web-app_3_0.xsd + - web-common_3_0.xsd + - web-fragment_3_0.xsd + - javaee_7.xsd + - javaee_web_services_1_4.xsd + - javaee_web_services_client_1_4.xsd + - jsp_2_3.xsd + - web-app_3_1.xsd + - web-common_3_1.xsd + - web-fragment_3_1.xsd + - javaee_8.xsd + - web-app_4_0.xsd + - web-common_4_0.xsd + - web-fragment_4_0.xsd + +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 + +1. Definitions. + + 1.1. Contributor. means each individual or entity that creates or contributes + to the creation of Modifications. + + 1.2. Contributor Version. means the combination of the Original Software, + prior Modifications used by a Contributor (if any), and the + Modifications made by that particular Contributor. + + 1.3. Covered Software. means (a) the Original Software, or (b) Modifications, + or (c) the combination of files containing Original Software with files + containing Modifications, in each case including portions thereof. + + 1.4. Executable. means the Covered Software in any form other than Source + Code. + + 1.5. Initial Developer. means the individual or entity that first makes + Original Software available under this License. + + 1.6. Larger Work. means a work which combines Covered Software or portions + thereof with code not governed by the terms of this License. + + 1.7. License. means this document. + + 1.8. Licensable. means having the right to grant, to the maximum extent + possible, whether at the time of the initial grant or subsequently + acquired, any and all of the rights conveyed herein. + + 1.9. Modifications. means the Source Code and Executable form of any of the + following: + + A. Any file that results from an addition to, deletion from or + modification of the contents of a file containing Original Software + or previous Modifications; + + B. Any new file that contains any part of the Original Software or + previous Modification; or + + C. Any new file that is contributed or otherwise made available under + the terms of this License. + + 1.10. Original Software. means the Source Code and Executable form of + computer software code that is originally released under this License. + + 1.11. Patent Claims. means any patent claim(s), now owned or hereafter + acquired, including without limitation, method, process, and apparatus + claims, in any patent Licensable by grantor. + + 1.12. Source Code. means (a) the common form of computer software code in + which modifications are made and (b) associated documentation included + in or with such code. + + 1.13. You. (or .Your.) means an individual or a legal entity exercising + rights under, and complying with all of the terms of, this License. For + legal entities, .You. includes any entity which controls, is controlled + by, or is under common control with You. For purposes of this + definition, .control. means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + +2. License Grants. + + 2.1. The Initial Developer Grant. + + Conditioned upon Your compliance with Section 3.1 below and subject to + third party intellectual property claims, the Initial Developer hereby + grants You a world-wide, royalty-free, non-exclusive license: + + (a) under intellectual property rights (other than patent or trademark) + Licensable by Initial Developer, to use, reproduce, modify, display, + perform, sublicense and distribute the Original Software (or + portions thereof), with or without Modifications, and/or as part of + a Larger Work; and + + (b) under Patent Claims infringed by the making, using or selling of + Original Software, to make, have made, use, practice, sell, and + offer for sale, and/or otherwise dispose of the Original Software + (or portions thereof). + + (c) The licenses granted in Sections 2.1(a) and (b) are effective on the + date Initial Developer first distributes or otherwise makes the + Original Software available to a third party under the terms of this + License. + + (d) Notwithstanding Section 2.1(b) above, no patent license is granted: + (1) for code that You delete from the Original Software, or (2) for + infringements caused by: (i) the modification of the Original + Software, or (ii) the combination of the Original Software with + other software or devices. + + 2.2. Contributor Grant. + + Conditioned upon Your compliance with Section 3.1 below and subject to third + party intellectual property claims, each Contributor hereby grants You a + world-wide, royalty-free, non-exclusive license: + + (a) under intellectual property rights (other than patent or trademark) + Licensable by Contributor to use, reproduce, modify, display, + perform, sublicense and distribute the Modifications created by such + Contributor (or portions thereof), either on an unmodified basis, + with other Modifications, as Covered Software and/or as part of a + Larger Work; and + + (b) under Patent Claims infringed by the making, using, or selling of + Modifications made by that Contributor either alone and/or in + combination with its Contributor Version (or portions of such + combination), to make, use, sell, offer for sale, have made, and/or + otherwise dispose of: (1) Modifications made by that Contributor (or + portions thereof); and (2) the combination of Modifications made by + that Contributor with its Contributor Version (or portions of such + combination). + + (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on + the date Contributor first distributes or otherwise makes the + Modifications available to a third party. + + (d) Notwithstanding Section 2.2(b) above, no patent license is granted: + (1) for any code that Contributor has deleted from the Contributor + Version; (2) for infringements caused by: (i) third party + modifications of Contributor Version, or (ii) the combination of + Modifications made by that Contributor with other software (except + as part of the Contributor Version) or other devices; or (3) under + Patent Claims infringed by Covered Software in the absence of + Modifications made by that Contributor. + +3. Distribution Obligations. + + 3.1. Availability of Source Code. + Any Covered Software that You distribute or otherwise make available in + Executable form must also be made available in Source Code form and that + Source Code form must be distributed only under the terms of this License. + You must include a copy of this License with every copy of the Source Code + form of the Covered Software You distribute or otherwise make available. + You must inform recipients of any such Covered Software in Executable form + as to how they can obtain such Covered Software in Source Code form in a + reasonable manner on or through a medium customarily used for software + exchange. + + 3.2. Modifications. + The Modifications that You create or to which You contribute are governed + by the terms of this License. You represent that You believe Your + Modifications are Your original creation(s) and/or You have sufficient + rights to grant the rights conveyed by this License. + + 3.3. Required Notices. + You must include a notice in each of Your Modifications that identifies + You as the Contributor of the Modification. You may not remove or alter + any copyright, patent or trademark notices contained within the Covered + Software, or any notices of licensing or any descriptive text giving + attribution to any Contributor or the Initial Developer. + + 3.4. Application of Additional Terms. + You may not offer or impose any terms on any Covered Software in Source + Code form that alters or restricts the applicable version of this License + or the recipients. rights hereunder. You may choose to offer, and to + charge a fee for, warranty, support, indemnity or liability obligations to + one or more recipients of Covered Software. However, you may do so only on + Your own behalf, and not on behalf of the Initial Developer or any + Contributor. You must make it absolutely clear that any such warranty, + support, indemnity or liability obligation is offered by You alone, and + You hereby agree to indemnify the Initial Developer and every Contributor + for any liability incurred by the Initial Developer or such Contributor as + a result of warranty, support, indemnity or liability terms You offer. + + 3.5. Distribution of Executable Versions. + You may distribute the Executable form of the Covered Software under the + terms of this License or under the terms of a license of Your choice, + which may contain terms different from this License, provided that You are + in compliance with the terms of this License and that the license for the + Executable form does not attempt to limit or alter the recipient.s rights + in the Source Code form from the rights set forth in this License. If You + distribute the Covered Software in Executable form under a different + license, You must make it absolutely clear that any terms which differ + from this License are offered by You alone, not by the Initial Developer + or Contributor. You hereby agree to indemnify the Initial Developer and + every Contributor for any liability incurred by the Initial Developer or + such Contributor as a result of any such terms You offer. + + 3.6. Larger Works. + You may create a Larger Work by combining Covered Software with other code + not governed by the terms of this License and distribute the Larger Work + as a single product. In such a case, You must make sure the requirements + of this License are fulfilled for the Covered Software. + +4. Versions of the License. + + 4.1. New Versions. + Sun Microsystems, Inc. is the initial license steward and may publish + revised and/or new versions of this License from time to time. Each + version will be given a distinguishing version number. Except as provided + in Section 4.3, no one other than the license steward has the right to + modify this License. + + 4.2. Effect of New Versions. + You may always continue to use, distribute or otherwise make the Covered + Software available under the terms of the version of the License under + which You originally received the Covered Software. If the Initial + Developer includes a notice in the Original Software prohibiting it from + being distributed or otherwise made available under any subsequent version + of the License, You must distribute and make the Covered Software + available under the terms of the version of the License under which You + originally received the Covered Software. Otherwise, You may also choose + to use, distribute or otherwise make the Covered Software available under + the terms of any subsequent version of the License published by the + license steward. + + 4.3. Modified Versions. + When You are an Initial Developer and You want to create a new license for + Your Original Software, You may create and use a modified version of this + License if You: (a) rename the license and remove any references to the + name of the license steward (except to note that the license differs from + this License); and (b) otherwise make it clear that the license contains + terms which differ from this License. + +5. DISCLAIMER OF WARRANTY. + + COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN .AS IS. BASIS, WITHOUT + WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT + LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, + MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK + AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD + ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL + DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY + SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN + ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED + HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +6. TERMINATION. + + 6.1. This License and the rights granted hereunder will terminate + automatically if You fail to comply with terms herein and fail to + cure such breach within 30 days of becoming aware of the breach. + Provisions which, by their nature, must remain in effect beyond the + termination of this License shall survive. + + 6.2. If You assert a patent infringement claim (excluding declaratory + judgment actions) against Initial Developer or a Contributor (the + Initial Developer or Contributor against whom You assert such claim + is referred to as .Participant.) alleging that the Participant + Software (meaning the Contributor Version where the Participant is a + Contributor or the Original Software where the Participant is the + Initial Developer) directly or indirectly infringes any patent, then + any and all rights granted directly or indirectly to You by such + Participant, the Initial Developer (if the Initial Developer is not + the Participant) and all Contributors under Sections 2.1 and/or 2.2 + of this License shall, upon 60 days notice from Participant terminate + prospectively and automatically at the expiration of such 60 day + notice period, unless if within such 60 day period You withdraw Your + claim with respect to the Participant Software against such + Participant either unilaterally or pursuant to a written agreement + with Participant. + + 6.3. In the event of termination under Sections 6.1 or 6.2 above, all end + user licenses that have been validly granted by You or any + distributor hereunder prior to termination (excluding licenses + granted to You by any distributor) shall survive termination. + +7. LIMITATION OF LIABILITY. + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING + NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY + OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF + ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, + INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT + LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, + COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR + LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF + SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR + DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY.S NEGLIGENCE TO THE EXTENT + APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE + EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS + EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +8. U.S. GOVERNMENT END USERS. + + The Covered Software is a .commercial item,. as that term is defined in 48 + C.F.R. 2.101 (Oct. 1995), consisting of .commercial computer software. (as + that term is defined at 48 C.F.R. ? 252.227-7014(a)(1)) and commercial + computer software documentation. as such terms are used in 48 C.F.R. 12.212 + (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 + through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered + Software with only those rights set forth herein. This U.S. Government Rights + clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or + provision that addresses Government rights in computer software under this + License. + +9. MISCELLANEOUS. + + This License represents the complete agreement concerning subject matter + hereof. If any provision of this License is held to be unenforceable, such + provision shall be reformed only to the extent necessary to make it + enforceable. This License shall be governed by the law of the jurisdiction + specified in a notice contained within the Original Software (except to the + extent applicable law, if any, provides otherwise), excluding such + jurisdiction's conflict-of-law provisions. Any litigation relating to this + License shall be subject to the jurisdiction of the courts located in the + jurisdiction and venue specified in a notice contained within the Original + Software, with the losing party responsible for costs, including, without + limitation, court costs and reasonable attorneys. fees and expenses. The + application of the United Nations Convention on Contracts for the + International Sale of Goods is expressly excluded. Any law or regulation + which provides that the language of a contract shall be construed against + the drafter shall not apply to this License. You agree that You alone are + responsible for compliance with the United States export administration + regulations (and the export control laws and regulation of any other + countries) when You use, distribute or otherwise make available any Covered + Software. + +10. RESPONSIBILITY FOR CLAIMS. + + As between Initial Developer and the Contributors, each party is responsible + for claims and damages arising, directly or indirectly, out of its + utilization of rights under this License and You agree to work with Initial + Developer and Contributors to distribute such responsibility on an equitable + basis. Nothing herein is intended or shall be deemed to constitute any + admission of liability. + + NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION + LICENSE (CDDL) + + The code released under the CDDL shall be governed by the laws of the State + of California (excluding conflict-of-law provisions). Any litigation relating + to this License shall be subject to the jurisdiction of the Federal Courts of + the Northern District of California and the state courts of the State of + California, with venue lying in Santa Clara County, California. + diff --git a/docs/licenses/Apache Tomcat/NOTICE b/docs/licenses/Apache Tomcat/NOTICE new file mode 100644 index 0000000..3610c97 --- /dev/null +++ b/docs/licenses/Apache Tomcat/NOTICE @@ -0,0 +1,55 @@ +Apache Tomcat +Copyright 1999-2016 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + +This software contains code derived from netty-native +developed by the Netty project +(http://netty.io, https://github.com/netty/netty-tcnative/) +and from finagle-native developed at Twitter +(https://github.com/twitter/finagle). + +The Windows Installer is built with the Nullsoft +Scriptable Install System (NSIS), which is +open source software. The original software and +related information is available at +http://nsis.sourceforge.net. + +Java compilation software for JSP pages is provided by the Eclipse +JDT Core Batch Compiler component, which is open source software. +The original software and related information is available at +http://www.eclipse.org/jdt/core/. + +For portions of the Tomcat JNI OpenSSL API and the OpenSSL JSSE integration +The org.apache.tomcat.jni and the org.apache.tomcat.net.openssl packages +are derivative work originating from the Netty project and the finagle-native +project developed at Twitter +* Copyright 2014 The Netty Project +* Copyright 2014 Twitter + +The original XML Schemas for Java EE Deployment Descriptors: + - javaee_5.xsd + - javaee_web_services_1_2.xsd + - javaee_web_services_client_1_2.xsd + - javaee_6.xsd + - javaee_web_services_1_3.xsd + - javaee_web_services_client_1_3.xsd + - jsp_2_2.xsd + - web-app_3_0.xsd + - web-common_3_0.xsd + - web-fragment_3_0.xsd + - javaee_7.xsd + - javaee_web_services_1_4.xsd + - javaee_web_services_client_1_4.xsd + - jsp_2_3.xsd + - web-app_3_1.xsd + - web-common_3_1.xsd + - web-fragment_3_1.xsd + - javaee_8.xsd + - web-app_4_0.xsd + - web-common_4_0.xsd + - web-fragment_4_0.xsd + +may be obtained from: +http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/index.html diff --git a/docs/licenses/Apache Tomcat/RELEASE-NOTES b/docs/licenses/Apache Tomcat/RELEASE-NOTES new file mode 100644 index 0000000..4d5da54 --- /dev/null +++ b/docs/licenses/Apache Tomcat/RELEASE-NOTES @@ -0,0 +1,172 @@ +================================================================================ + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +================================================================================ + + + Apache Tomcat Version 9.0.0.M11 + Release Notes + + +========= +CONTENTS: +========= + +* Dependency Changes +* API Stability +* Bundled APIs +* Web application reloading and static fields in shared libraries +* Security manager URLs +* Symlinking static resources +* Viewing the Tomcat Change Log +* Cryptographic software notice +* When all else fails + + +=================== +Dependency Changes: +=================== +Tomcat 9.0 is designed to run on Java SE 8 and later. + + +============== +API Stability: +============== + +The public interfaces for the following classes are fixed and will not be +changed at all during the remaining lifetime of the 9.x series: +- None + +The public interfaces for the following classes may be added to in order to +resolve bugs and/or add new features. No existing interface method will be +removed or changed although it may be deprecated. +- None + +Note: As Tomcat 9 matures, the above list will be added to. The list is not + considered complete at this time. + +The remaining classes are considered part of the Tomcat internals and may change +without notice between point releases. + + +============= +Bundled APIs: +============= +A standard installation of Tomcat 9.0 makes all of the following APIs available +for use by web applications (by placing them in "lib"): +* annotations-api.jar (Annotations package) +* catalina.jar (Tomcat Catalina implementation) +* catalina-ant.jar (Tomcat Catalina Ant tasks) +* catalina-ha.jar (High availability package) +* catalina-storeconfig.jar (Generation of XML configuration from current state) +* catalina-tribes.jar (Group communication) +* ecj-4.5.1.jar (Eclipse JDT Java compiler) +* el-api.jar (EL 3.0 API) +* jasper.jar (Jasper 2 Compiler and Runtime) +* jasper-el.jar (Jasper 2 EL implementation) +* jsp-api.jar (JSP 2.3 API) +* servlet-api.jar (Servlet 4.0 API) +* tomcat-api.jar (Interfaces shared by Catalina and Jasper) +* tomcat-coyote.jar (Tomcat connectors and utility classes) +* tomcat-dbcp.jar (package renamed database connection pool based on Commons DBCP) +* tomcat-jdbc.jar (Tomcat's database connection pooling solution) +* tomcat-jni.jar (Interface to the native component of the APR/native connector) +* tomcat-util.jar (Various utilities) +* tomcat-websocket.jar (WebSocket 1.1 implementation) +* websocket-api.jar (WebSocket 1.1 API) + +You can make additional APIs available to all of your web applications by +putting unpacked classes into a "classes" directory (not created by default), +or by placing them in JAR files in the "lib" directory. + +To override the XML parser implementation or interfaces, use the appropriate +feature for your JVM. For Java <= 8 use the endorsed standards override +feature. For Java 9+ use the upgradeable modules feature. + + +================================================================ +Web application reloading and static fields in shared libraries: +================================================================ +Some shared libraries (many are part of the JDK) keep references to objects +instantiated by the web application. To avoid class loading related problems +(ClassCastExceptions, messages indicating that the classloader +is stopped, etc.), the shared libraries state should be reinitialized. + +Something which might help is to avoid putting classes which would be +referenced by a shared static field in the web application classloader, +and putting them in the shared classloader instead (JARs should be put in the +"lib" folder, and classes should be put in the "classes" folder). + + +====================== +Security manager URLs: +====================== +In order to grant security permissions to JARs located inside the +web application repository, use URLs of of the following format +in your policy file: + +file:${catalina.base}/webapps/examples/WEB-INF/lib/driver.jar + + +============================ +Symlinking static resources: +============================ +By default, Unix symlinks will not work when used in a web application to link +resources located outside the web application root directory. + +This behavior is optional, and the "allowLinking" flag may be used to disable +the check. + + +============================== +Viewing the Tomcat Change Log: +============================== +The full change log is available from http://tomcat.apache.org and is also +included in the documentation web application. + + +============================= +Cryptographic software notice +============================= +This distribution includes cryptographic software. The country in +which you currently reside may have restrictions on the import, +possession, use, and/or re-export to another country, of +encryption software. BEFORE using any encryption software, please +check your country's laws, regulations and policies concerning the +import, possession, or use, and re-export of encryption software, to +see if this is permitted. See