Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ Licensed to the Apache Software Foundation (ASF) under one or more
* <td>g:</td>
* <td>-g [string]</td>
* </tr>
* <tr>
* <td>h&lt;</td>
* <td>-h [file name] (opens the existing file for reading, the caller must close the stream)</td>
* </tr>
* </table>
*
* <p>
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/org/apache/commons/cli/TypeHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ Licensed to the Apache Software Foundation (ASF) under one or more
* Options with custom converters and/or verifiers, using the default serialization methods, this class should be properly configured with the custom converters
* and verifiers for the specific class.
* </p>
* <p>
* The default converter for {@link FileInputStream} opens the named file each time it converts a value, and the caller must close the returned stream. As
* with {@link FileInputStream#FileInputStream(String)}, opening a special file such as a named pipe can block.
* </p>
*/
public class TypeHandler {

Expand Down Expand Up @@ -206,6 +210,9 @@ public static TypeHandler getDefault() {

/**
* Returns the opened FileInputStream represented by {@code string}.
* <p>
* The caller must close the returned stream.
* </p>
*
* @param string The file location.
* @return The file input stream represented by {@code string}.
Expand Down
Loading