com.android.sdklib.io
Enum NonClosingInputStream.CloseBehavior

java.lang.Object
  extended by java.lang.Enum<NonClosingInputStream.CloseBehavior>
      extended by com.android.sdklib.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
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.
 
Method Summary
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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CLOSE

public static final NonClosingInputStream.CloseBehavior CLOSE
The behavior of NonClosingInputStream.close() is to close the underlying input stream. This is the default.


IGNORE

public static final NonClosingInputStream.CloseBehavior IGNORE
The behavior of NonClosingInputStream.close() is to ignore the close request and do nothing.


RESET

public static final NonClosingInputStream.CloseBehavior RESET
The behavior of 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.

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 name
java.lang.NullPointerException - if the argument is null