public static enum NonClosingInputStream.CloseBehavior extends java.lang.Enum<NonClosingInputStream.CloseBehavior>
Enum Constant and Description |
---|
CLOSE
The behavior of
NonClosingInputStream.close() is to close the
underlying input stream. |
IGNORE
The behavior of
NonClosingInputStream.close() is to ignore the
close request and do nothing. |
RESET
The behavior of
NonClosingInputStream.close() is to call
InputStream.reset() on the underlying stream. |
Modifier and Type | Method and Description |
---|---|
static NonClosingInputStream.CloseBehavior |
valueOf(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.
|
public static final NonClosingInputStream.CloseBehavior CLOSE
NonClosingInputStream.close()
is to close the
underlying input stream. This is the default.public static final NonClosingInputStream.CloseBehavior IGNORE
NonClosingInputStream.close()
is to ignore the
close request and do nothing.public static final NonClosingInputStream.CloseBehavior RESET
NonClosingInputStream.close()
is to call
InputStream.reset()
on the underlying stream. This will
only succeed if the underlying stream supports it, e.g. it must
have InputStream.markSupported()
return true and
the caller should have called InputStream.mark(int)
at some
point before.public static NonClosingInputStream.CloseBehavior[] values()
for (NonClosingInputStream.CloseBehavior c : NonClosingInputStream.CloseBehavior.values()) System.out.println(c);
public static NonClosingInputStream.CloseBehavior valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null