commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1302750 - /commons/proper/io/trunk/src/main/java/org/apache/commons/io/ByteOrderMark.java
Date Tue, 20 Mar 2012 01:47:35 GMT
Author: ggregory
Date: Tue Mar 20 01:47:35 2012
New Revision: 1302750

URL: http://svn.apache.org/viewvc?rev=1302750&view=rev
Log:
[IO-310] Add ByteOrderMark constants for UTF-32.

Modified:
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/ByteOrderMark.java

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/ByteOrderMark.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/ByteOrderMark.java?rev=1302750&r1=1302749&r2=1302750&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/ByteOrderMark.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/ByteOrderMark.java Tue Mar
20 01:47:35 2012
@@ -23,7 +23,8 @@ import java.io.Serializable;
  * see {@link org.apache.commons.io.input.BOMInputStream}.
  *
  * @see org.apache.commons.io.input.BOMInputStream
- * @see <a href="http://en.wikipedia.org/wiki/Byte_order_mark">Wikipedia - Byte Order
Mark</a>
+ * @see <a href="http://en.wikipedia.org/wiki/Byte_order_mark">Wikipedia: Byte Order
Mark</a>
+ * @see <a href=http://www.w3.org/TR/2006/REC-xml-20060816/#sec-guessing>W3C: Autodetection
of Character Encodings (Non-Normative)</a>
  * @version $Id$
  * @since Commons IO 2.0
  */
@@ -33,11 +34,19 @@ public class ByteOrderMark implements Se
 
     /** UTF-8 BOM */
     public static final ByteOrderMark UTF_8    = new ByteOrderMark("UTF-8",    0xEF, 0xBB,
0xBF);
-    /** UTF-16BE BOM (Big Endian) */
+    
+    /** UTF-16BE BOM (Big-Endian) */
     public static final ByteOrderMark UTF_16BE = new ByteOrderMark("UTF-16BE", 0xFE, 0xFF);
-    /** UTF-16LE BOM (Little Endian) */
+    
+    /** UTF-16LE BOM (Little-Endian) */
     public static final ByteOrderMark UTF_16LE = new ByteOrderMark("UTF-16LE", 0xFF, 0xFE);
 
+    /** UFT-32BE BOM (Big-Endian) */
+    public static final ByteOrderMark UTF_32BE = new ByteOrderMark("UTF-32BE", 0x00, 0x00,
0xFE, 0xFF);
+    
+    /** UTF-32LE BOM (Big-Endian) */
+    public static final ByteOrderMark UTF_32LE = new ByteOrderMark("UTF-32LE", 0xFE, 0xFF,
0x00, 0x00);
+    
     private final String charsetName;
     private final int[] bytes;
 



Mime
View raw message