jdk/src/share/classes/javax/imageio/stream/ImageOutputStream.java
changeset 22260 c9185e010e03
parent 19168 ff364494f2b8
equal deleted inserted replaced
22259:8e5afc67dca8 22260:c9185e010e03
     1 /*
     1 /*
     2  * Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   377      *
   377      *
   378      * <p> If a character <code>c</code> is in the range
   378      * <p> If a character <code>c</code> is in the range
   379      * <code>&#92;u0001</code> through <code>&#92;u007f</code>, it is
   379      * <code>&#92;u0001</code> through <code>&#92;u007f</code>, it is
   380      * represented by one byte:
   380      * represented by one byte:
   381      *
   381      *
   382      * <p><pre>
   382      * <pre>
   383      * (byte)c
   383      * (byte)c
   384      * </pre>
   384      * </pre>
   385      *
   385      *
   386      * <p> If a character <code>c</code> is <code>&#92;u0000</code> or
   386      * <p> If a character <code>c</code> is <code>&#92;u0000</code> or
   387      * is in the range <code>&#92;u0080</code> through
   387      * is in the range <code>&#92;u0080</code> through
   388      * <code>&#92;u07ff</code>, then it is represented by two bytes,
   388      * <code>&#92;u07ff</code>, then it is represented by two bytes,
   389      * to be written in the order shown:
   389      * to be written in the order shown:
   390      *
   390      *
   391      * <p> <pre><code>
   391      * <pre><code>
   392      * (byte)(0xc0 | (0x1f &amp; (c &gt;&gt; 6)))
   392      * (byte)(0xc0 | (0x1f &amp; (c &gt;&gt; 6)))
   393      * (byte)(0x80 | (0x3f &amp; c))
   393      * (byte)(0x80 | (0x3f &amp; c))
   394      * </code></pre>
   394      * </code></pre>
   395      *
   395      *
   396      * <p> If a character <code>c</code> is in the range
   396      * <p> If a character <code>c</code> is in the range
   397      * <code>&#92;u0800</code> through <code>uffff</code>, then it is
   397      * <code>&#92;u0800</code> through <code>uffff</code>, then it is
   398      * represented by three bytes, to be written in the order shown:
   398      * represented by three bytes, to be written in the order shown:
   399      *
   399      *
   400      * <p> <pre><code>
   400      * <pre><code>
   401      * (byte)(0xe0 | (0x0f &amp; (c &gt;&gt; 12)))
   401      * (byte)(0xe0 | (0x0f &amp; (c &gt;&gt; 12)))
   402      * (byte)(0x80 | (0x3f &amp; (c &gt;&gt; 6)))
   402      * (byte)(0x80 | (0x3f &amp; (c &gt;&gt; 6)))
   403      * (byte)(0x80 | (0x3f &amp; c))
   403      * (byte)(0x80 | (0x3f &amp; c))
   404      * </code></pre>
   404      * </code></pre>
   405      *
   405      *