CharToByteUnicode.java revision 0
2362N/A * Copyright 1996-2002 Sun Microsystems, Inc. All Rights Reserved. 249N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 249N/A * This code is free software; you can redistribute it and/or modify it 249N/A * under the terms of the GNU General Public License version 2 only, as 249N/A * published by the Free Software Foundation. Sun designates this 249N/A * particular file as subject to the "Classpath" exception as provided 249N/A * by Sun in the LICENSE file that accompanied this code. 249N/A * This code is distributed in the hope that it will be useful, but WITHOUT 249N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 249N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 249N/A * version 2 for more details (a copy is included in the LICENSE file that 249N/A * accompanied this code). 249N/A * You should have received a copy of the GNU General Public License version 249N/A * 2 along with this work; if not, write to the Free Software Foundation, 2362N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 249N/A * CA 95054 USA or visit www.sun.com if you need additional information or 249N/A * Convert arrays containing Unicode characters into arrays of bytes, using the 249N/A * platform-default byte order. 249N/A * @author Mark Reinhold 249N/A protected boolean usesMark =
true;
/* A mark should be written */ return usesMark ?
"UnicodeBig" :
"UnicodeBigUnmarked";
return usesMark ?
"UnicodeLittle" :
"UnicodeLittleUnmarked";
return 4;
/* To allow for writing the byte-order mark */