/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
* THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
*/
/**
* An encoder for handling Short values. Suppports the builtin SHORT encoder.
*
* @author Alan Hudson
* @author Paul Sandoz
*/
public final int getPrimtiveLengthFromOctetLength(int octetLength) throws EncodingAlgorithmException {
}
return octetLength / SHORT_SIZE;
}
return primitiveLength * SHORT_SIZE;
}
public final Object decodeFromBytes(byte[] b, int start, int length) throws EncodingAlgorithmException {
return data;
}
return decodeFromInputStreamToShortArray(s);
}
if (!(data instanceof short[])) {
throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.dataNotShortArray"));
}
}
new WordListener() {
}
}
);
return generateArrayFromList(shortList);
}
if (!(data instanceof short[])) {
throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.dataNotShortArray"));
}
}
public final void decodeFromBytesToShortArray(short[] sdata, int istart, byte[] b, int start, int length) {
for (int i = 0; i < size; i++) {
(b[start++] & 0xFF));
}
}
final byte[] b = new byte[SHORT_SIZE];
while (true) {
int n = s.read(b);
if (n != 2) {
if (n == -1) {
break;
}
while(n != 2) {
final int m = s.read(b, n, SHORT_SIZE - n);
if (m == -1) {
throw new EOFException();
}
n += m;
}
}
final int i = ((b[0] & 0xFF) << 8) |
(b[1] & 0xFF);
}
return generateArrayFromList(shortList);
}
public final void encodeToOutputStreamFromShortArray(short[] idata, OutputStream s) throws IOException {
}
}
}
public final void encodeToBytesFromShortArray(short[] sdata, int istart, int ilength, byte[] b, int start) {
}
}
for (int i = 0; i <= end; i++) {
if (i != end) {
s.append(' ');
}
}
}
}
return sdata;
}
}