src/main/java/org/nustaq/serialization/coders/FSTStreamEncoder.java
public void writeFShortArr(short[] arr, int off, int len) throws IOException {
        buffout.ensureFree(len*3);
        for (int i = off; i < off+len; i++) {
            short c = arr[i];
            if (c < 255 && c >= 0) {
                buffout.buf[buffout.pos++] = (byte) c;
            } else {
                buffout.buf[buffout.pos] = (byte) 255;
                buffout.buf[buffout.pos+1] = (byte) (c >>> 0);
                buffout.buf[buffout.pos+2] = (byte) (c >>> 8);
                buffout.pos += 3;
            }
        }
    }
public void writeFShortArr(short[] arr, int off, int len) throws IOException {
        buffout.ensureFree(len*3);
        for (int i = off; i < off+len; i++) {
            short c = arr[i];
            if (c < 255 && c >= 0) {
                buffout.buf[buffout.pos++] = (byte) c;
            } else {
                buffout.buf[buffout.pos] = (byte) 255;
                buffout.buf[buffout.pos+1] = (byte) (c >>> 0);
                buffout.buf[buffout.pos+2] = (byte) (c >>> 8);
                buffout.pos += 3;
            }
        }
    }
public void writeFShortArr ( short [ ] arr , int off , int len ) throws IOException { buffout . ensureFree ( len * 3 ) ; for ( int i = off ; i < off + len ; i ++ ) { short c = arr [ i ] ; if ( c < 255 && c >= 0 ) { buffout . buf [ buffout . pos ++ ] = ( byte ) c ; } else { buffout . buf [ buffout . pos ] = ( byte ) 255 ; buffout . buf [ buffout . pos + 1 ] = ( byte ) ( c >>> 0 ) ; buffout . buf [ buffout . pos + 2 ] = ( byte ) ( c >>> 8 ) ; buffout . pos += 3 ; } } }
}
}