2362N/A * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 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 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * Utilities for processing GSS Tokens. 0N/A * Copies an integer value to a byte array in little endian form. 0N/A * @param value the integer value to write 0N/A * @param array the byte array into which the integer must be copied. It 0N/A * is assumed that the array will be large enough to hold the 4 bytes of 0N/A * Copies an integer value to a byte array in little endian form. 0N/A * @param value the integer value to write 0N/A * @param array the byte array into which the integer must be copied. It 0N/A * is assumed that the array will be large enough to hold the 4 bytes of 0N/A * @param pos the position at which to start writing 0N/A * Reads an integer value from a byte array in little endian form. This 0N/A * method allows the reading of two byte values as well as four bytes 0N/A * values both of which are needed in the Kerberos v5 GSS-API mechanism. 0N/A * @param data the array containing the bytes of the integer value 0N/A * @param pos the offset in the array 0N/A * @size the number of bytes to read from the array. 0N/A * @return the integer value 0N/A * Writes a two byte integer value to a OutputStream. 0N/A * @param val the integer value. It will lose the high-order two bytes. 0N/A * @param os the OutputStream to write to 0N/A * @throws IOException if an error occurs while writing to the OutputStream 0N/A * Writes a two byte integer value to a byte array. 0N/A * @param val the integer value. It will lose the high-order two bytes. 0N/A * @param dest the byte array to write to 0N/A * @param pos the offset to start writing to 0N/A * Reads a two byte integer value from an InputStream. 0N/A * @param is the InputStream to read from 0N/A * @returns the integer value 0N/A * @throws IOException if some errors occurs while reading the integer 0N/A * Reads a two byte integer value from a byte array. 0N/A * @param src the byte arra to read from 0N/A * @param pos the offset to start reading from 0N/A * @returns the integer value 0N/A * Blocks till the required number of bytes have been read from the 0N/A * @param is the InputStream to read from 0N/A * @param buffer the buffer to store the bytes into 0N/A * @param throws EOFException if EOF is reached before all bytes are 0N/A * @throws IOException is an error occurs while reading 0N/A * Blocks till the required number of bytes have been read from the 0N/A * @param is the InputStream to read from 0N/A * @param buffer the buffer to store the bytes into 0N/A * @param offset the offset to start storing at 0N/A * @param len the number of bytes to read 0N/A * @param throws EOFException if EOF is reached before all bytes are 0N/A * @throws IOException is an error occurs while reading 0N/A +
" bytes needed to form this token!");