10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package java.io; 27 28 import java.util.*; 29 import java.nio.charset.Charset; 30 import jdk.internal.misc.JavaIOAccess; 31 import jdk.internal.misc.SharedSecrets; 32 import sun.nio.cs.StreamDecoder; 33 import sun.nio.cs.StreamEncoder; 34 35 /** 36 * Methods to access the character-based console device, if any, associated 37 * with the current Java virtual machine. 38 * 39 * <p> Whether a virtual machine has a console is dependent upon the 40 * underlying platform and also upon the manner in which the virtual 41 * machine is invoked. If the virtual machine is started from an 42 * interactive command line without redirecting the standard input and 43 * output streams then its console will exist and will typically be 44 * connected to the keyboard and display from which the virtual machine 45 * was launched. If the virtual machine is started automatically, for 46 * example by a background job scheduler, then it will typically not 47 * have a console. 48 * <p> 49 * If this virtual machine has a console then it is represented by a 50 * unique instance of this class which can be obtained by invoking the 51 * {@link java.lang.System#console()} method. If no console device is | 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package java.io; 27 28 import java.util.*; 29 import java.nio.charset.Charset; 30 import jdk.internal.access.JavaIOAccess; 31 import jdk.internal.access.SharedSecrets; 32 import sun.nio.cs.StreamDecoder; 33 import sun.nio.cs.StreamEncoder; 34 35 /** 36 * Methods to access the character-based console device, if any, associated 37 * with the current Java virtual machine. 38 * 39 * <p> Whether a virtual machine has a console is dependent upon the 40 * underlying platform and also upon the manner in which the virtual 41 * machine is invoked. If the virtual machine is started from an 42 * interactive command line without redirecting the standard input and 43 * output streams then its console will exist and will typically be 44 * connected to the keyboard and display from which the virtual machine 45 * was launched. If the virtual machine is started automatically, for 46 * example by a background job scheduler, then it will typically not 47 * have a console. 48 * <p> 49 * If this virtual machine has a console then it is represented by a 50 * unique instance of this class which can be obtained by invoking the 51 * {@link java.lang.System#console()} method. If no console device is |