jdk/src/share/classes/java/io/OutputStreamWriter.java
author henryjen
Tue, 10 Jun 2014 16:18:54 -0700
changeset 24865 09b1d992ca72
parent 18786 52a2658627c2
permissions -rw-r--r--
8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo Reviewed-by: mduigou, lancea, alanb, mullan
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
18786
52a2658627c2 8020091: Fix HTML doclint issues in java.io
juh
parents: 5506
diff changeset
     2
 * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package java.io;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.nio.charset.Charset;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import java.nio.charset.CharsetEncoder;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
import sun.nio.cs.StreamEncoder;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * An OutputStreamWriter is a bridge from character streams to byte streams:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * Characters written to it are encoded into bytes using a specified {@link
18786
52a2658627c2 8020091: Fix HTML doclint issues in java.io
juh
parents: 5506
diff changeset
    36
 * java.nio.charset.Charset charset}.  The charset that it uses
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * may be specified by name or may be given explicitly, or the platform's
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 * default charset may be accepted.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 * <p> Each invocation of a write() method causes the encoding converter to be
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * invoked on the given character(s).  The resulting bytes are accumulated in a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * buffer before being written to the underlying output stream.  The size of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * this buffer may be specified, but by default it is large enough for most
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 * purposes.  Note that the characters passed to the write() methods are not
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 * buffered.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 * <p> For top efficiency, consider wrapping an OutputStreamWriter within a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
 * BufferedWriter so as to avoid frequent converter invocations.  For example:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 * Writer out
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 *   = new BufferedWriter(new OutputStreamWriter(System.out));
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 * </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 * <p> A <i>surrogate pair</i> is a character represented by a sequence of two
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
 * <tt>char</tt> values: A <i>high</i> surrogate in the range '&#92;uD800' to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 * '&#92;uDBFF' followed by a <i>low</i> surrogate in the range '&#92;uDC00' to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
 * '&#92;uDFFF'.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
 * <p> A <i>malformed surrogate element</i> is a high surrogate that is not
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
 * followed by a low surrogate or a low surrogate that is not preceded by a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
 * high surrogate.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
 * <p> This class always replaces malformed surrogate elements and unmappable
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
 * character sequences with the charset's default <i>substitution sequence</i>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
 * The {@linkplain java.nio.charset.CharsetEncoder} class should be used when more
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
 * control over the encoding process is required.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
 * @see BufferedWriter
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
 * @see OutputStream
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
 * @see java.nio.charset.Charset
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
 * @author      Mark Reinhold
24865
09b1d992ca72 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents: 18786
diff changeset
    74
 * @since       1.1
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
public class OutputStreamWriter extends Writer {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
    private final StreamEncoder se;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
     * Creates an OutputStreamWriter that uses the named charset.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
     * @param  out
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
     *         An OutputStream
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
     * @param  charsetName
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
     *         The name of a supported
18786
52a2658627c2 8020091: Fix HTML doclint issues in java.io
juh
parents: 5506
diff changeset
    89
     *         {@link java.nio.charset.Charset charset}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
     * @exception  UnsupportedEncodingException
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
     *             If the named encoding is not supported
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
    public OutputStreamWriter(OutputStream out, String charsetName)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
        throws UnsupportedEncodingException
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
        super(out);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
        if (charsetName == null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
            throw new NullPointerException("charsetName");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
        se = StreamEncoder.forOutputStreamWriter(out, this, charsetName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
     * Creates an OutputStreamWriter that uses the default character encoding.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
     * @param  out  An OutputStream
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
    public OutputStreamWriter(OutputStream out) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
        super(out);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
            se = StreamEncoder.forOutputStreamWriter(out, this, (String)null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
        } catch (UnsupportedEncodingException e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
            throw new Error(e);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
    /**
18786
52a2658627c2 8020091: Fix HTML doclint issues in java.io
juh
parents: 5506
diff changeset
   118
     * Creates an OutputStreamWriter that uses the given charset.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
     * @param  out
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
     *         An OutputStream
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
     * @param  cs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
     *         A charset
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
     * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
     * @spec JSR-51
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
    public OutputStreamWriter(OutputStream out, Charset cs) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
        super(out);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
        if (cs == null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
            throw new NullPointerException("charset");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
        se = StreamEncoder.forOutputStreamWriter(out, this, cs);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
    /**
18786
52a2658627c2 8020091: Fix HTML doclint issues in java.io
juh
parents: 5506
diff changeset
   137
     * Creates an OutputStreamWriter that uses the given charset encoder.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
     * @param  out
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
     *         An OutputStream
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
     * @param  enc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
     *         A charset encoder
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
     * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
     * @spec JSR-51
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
    public OutputStreamWriter(OutputStream out, CharsetEncoder enc) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
        super(out);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
        if (enc == null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
            throw new NullPointerException("charset encoder");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
        se = StreamEncoder.forOutputStreamWriter(out, this, enc);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
     * Returns the name of the character encoding being used by this stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
     * <p> If the encoding has an historical name then that name is returned;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
     * otherwise the encoding's canonical name is returned.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
     * <p> If this instance was created with the {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
     * #OutputStreamWriter(OutputStream, String)} constructor then the returned
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
     * name, being unique for the encoding, may differ from the name passed to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
     * the constructor.  This method may return <tt>null</tt> if the stream has
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
     * been closed. </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
     * @return The historical name of this encoding, or possibly
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
     *         <code>null</code> if the stream has been closed
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
     * @see java.nio.charset.Charset
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
     * @revised 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
     * @spec JSR-51
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
    public String getEncoding() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
        return se.getEncoding();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
     * Flushes the output buffer to the underlying byte stream, without flushing
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
     * the byte stream itself.  This method is non-private only so that it may
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
     * be invoked by PrintStream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
    void flushBuffer() throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
        se.flushBuffer();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
     * Writes a single character.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
     * @exception  IOException  If an I/O error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
    public void write(int c) throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
        se.write(c);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
     * Writes a portion of an array of characters.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
     * @param  cbuf  Buffer of characters
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
     * @param  off   Offset from which to start writing characters
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
     * @param  len   Number of characters to write
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
     * @exception  IOException  If an I/O error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
    public void write(char cbuf[], int off, int len) throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
        se.write(cbuf, off, len);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
     * Writes a portion of a string.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
     * @param  str  A String
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
     * @param  off  Offset from which to start writing characters
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
     * @param  len  Number of characters to write
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
     * @exception  IOException  If an I/O error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
    public void write(String str, int off, int len) throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
        se.write(str, off, len);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
     * Flushes the stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
     * @exception  IOException  If an I/O error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
    public void flush() throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
        se.flush();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
    public void close() throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
        se.close();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
}