Package com.android.io
Enum NonClosingInputStream.CloseBehavior
- java.lang.Object
-
- java.lang.Enum<NonClosingInputStream.CloseBehavior>
-
- com.android.io.NonClosingInputStream.CloseBehavior
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<NonClosingInputStream.CloseBehavior>
- Enclosing class:
- NonClosingInputStream
public static enum NonClosingInputStream.CloseBehavior extends java.lang.Enum<NonClosingInputStream.CloseBehavior>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CLOSEThe behavior ofNonClosingInputStream.close()is to close the underlying input stream.IGNOREThe behavior ofNonClosingInputStream.close()is to ignore the close request and do nothing.RESETThe behavior ofNonClosingInputStream.close()is to callInputStream.reset()on the underlying stream.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static NonClosingInputStream.CloseBehaviorvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static NonClosingInputStream.CloseBehavior[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CLOSE
public static final NonClosingInputStream.CloseBehavior CLOSE
The behavior ofNonClosingInputStream.close()is to close the underlying input stream. This is the default.
-
IGNORE
public static final NonClosingInputStream.CloseBehavior IGNORE
The behavior ofNonClosingInputStream.close()is to ignore the close request and do nothing.
-
RESET
public static final NonClosingInputStream.CloseBehavior RESET
The behavior ofNonClosingInputStream.close()is to callInputStream.reset()on the underlying stream. This will only succeed if the underlying stream supports it, e.g. it must haveInputStream.markSupported()return true and the caller should have calledInputStream.mark(int)at some point before.
-
-
Method Detail
-
values
public static NonClosingInputStream.CloseBehavior[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (NonClosingInputStream.CloseBehavior c : NonClosingInputStream.CloseBehavior.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static NonClosingInputStream.CloseBehavior valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-