0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3171N/A * (C) Copyright IBM Corp. 1998-2010 - All Rights Reserved 1693N/A * \brief C++ API: Endian independent access to data for LayoutEngine 0N/A * A convenience macro which invokes the swapWord member function 0N/A * from a concise call. 0N/A * A convenience macro which invokes the swapLong member function 0N/A * from a concise call. 0N/A * This class is used to access data which stored in big endian order 0N/A * regardless of the conventions of the platform. It has been designed 0N/A * to automatically detect the endian-ness of the platform, so that a 0N/A * compilation flag is not needed. 0N/A * All methods are static and inline in an attempt to induce the compiler 0N/A * to do most of the calculations at compile time. 0N/A * This method detects the endian-ness of the platform by 0N/A * casting a pointer to a word to a pointer to a byte. On 0N/A * big endian platforms the FF will be in the byte with the 0N/A * lowest address. On little endian platforms, the FF will 0N/A * be in the byte with the highest address. 0N/A * @return TRUE if the platform is big endian 0N/A * This method does the byte swap required on little endian platforms 0N/A * to correctly access a (16-bit) word. 0N/A * @param value - the word to be byte swapped 0N/A * @return the byte swapped word 0N/A * This method does the byte swapping required on little endian platforms 0N/A * to correctly access a (32-bit) long. 0N/A * @param value - the long to be byte swapped 0N/A * @return the byte swapped long