< prev index next >

src/java.base/share/classes/sun/nio/cs/StreamDecoder.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 26,49 **** /* */ package sun.nio.cs; ! import java.io.FileInputStream; ! import java.io.IOException; ! import java.io.InputStream; ! import java.io.UnsupportedEncodingException; ! import java.io.Reader; ! import java.nio.ByteBuffer; ! import java.nio.CharBuffer; ! import java.nio.channels.FileChannel; ! import java.nio.channels.ReadableByteChannel; ! import java.nio.charset.Charset; ! import java.nio.charset.CharsetDecoder; ! import java.nio.charset.CoderResult; ! import java.nio.charset.CodingErrorAction; ! import java.nio.charset.IllegalCharsetNameException; public class StreamDecoder extends Reader { private static final int MIN_BYTE_BUFFER_SIZE = 32; --- 26,39 ---- /* */ package sun.nio.cs; ! import java.io.*; ! import java.nio.*; ! import java.nio.channels.*; ! import java.nio.charset.*; public class StreamDecoder extends Reader { private static final int MIN_BYTE_BUFFER_SIZE = 32;
*** 198,212 **** public void close() throws IOException { synchronized (lock) { if (closed) return; ! try { ! implClose(); ! } finally { ! closed = true; ! } } } private boolean isOpen() { return !closed; --- 188,199 ---- public void close() throws IOException { synchronized (lock) { if (closed) return; ! implClose(); ! closed = true; } } private boolean isOpen() { return !closed;
< prev index next >