Adds a short
@param s Short
@throws IllegalStateException see {@link #checkBuilt()}
543655
public synchronized PacketBuilder withShort(final short s)
    {
        checkBuilt();
        try
        {
            dataOutputStream.writeShort(s);
        }
        catch (final IOException e)
        {
            logger.error("Unable to add short: {} : {}", e.getClass(), e.getMessage());
        }
        return this;
    }
771945
public void addUnsignedByte( short value ) {
        if ( 1 + length < capacity ) {
            DynamicByteBufferHelper.unsignedByteTo( buffer, length, value );
        } else {
            buffer = DynamicByteBufferHelper.grow( buffer, buffer.length * 2 + 1 );
            capacity = buffer.length;

            DynamicByteBufferHelper.unsignedByteTo( buffer, length, value );
        }

        length += 1;

    }
897772
private static void writeLEShort(OutputStream out, short s) throws IOException {
		out.write((byte)s);
		out.write((byte)((s >> 8) & 0xFF));
	}
716747
public StrBuilder insert(int index, char[] src) {
		if (ArrayUtil.isEmpty(src)) {
			return this;
		}
		return insert(index, src, 0, src.length);
	}
558758
public final void putShort(Object parent, long offset, short value) {
		THE_UNSAFE.putShort(parent, offset, value);
	}
432503
public StrBuilder append(final char[] chars) {
        if (chars == null) {
            return appendNull();
        }
        final int strLen = chars.length;
        if (strLen > 0) {
            final int len = length();
            ensureCapacity(len + strLen);
            System.arraycopy(chars, 0, buffer, len, strLen);
            size += strLen;
        }
        return this;
    }
734612
protected void putShort(short data)
    {
        if (tc.isEntryEnabled()) Tr.entry(tc, "putShort", new Object[] { this, new Short(data)});

        if (tc.isDebugEnabled()) Tr.debug(tc, "Writing at position " + _buffer.position());
        _buffer.putShort(data);

        if (tc.isEntryEnabled()) Tr.exit(tc, "putShort");
    }
117929
public static void writeShortString(ByteBuffer buffer, String s) {
        if (s == null) {
            buffer.putShort((short) -1);
        } else if (s.length() > Short.MAX_VALUE) {
            throw new IllegalArgumentException("String exceeds the maximum size of " + Short.MAX_VALUE + ".");
        } else {
            byte[] data = getBytes(s); //topic support non-ascii character
            buffer.putShort((short) data.length);
            buffer.put(data);
        }
    }
613037
public static Short checkNull(Short value, Short elseValue) {
        return isNull(value) ? elseValue : value;
    }
297997
public WrappedByteBuffer putShortAt(int index, short v) {
        _checkForWriteAt(index, 2);
        _buf.putShort(index, v);
        return this;
    }
1104990
public StrBuilder append(char[] src, int srcPos, int length) {
		return insert(this.position, src, srcPos, length);
	}
721514
public void setShortAttribute(String name, Short value) {
		Attribute attribute = getAttributes().get(name);
		if (!(attribute instanceof ShortAttribute)) {
			throw new IllegalStateException("Cannot set short value on attribute with different type, " +
					attribute.getClass().getName() + " setting value " + value);
		}
		((ShortAttribute) attribute).setValue(value);
	}
146631
public static boolean addDefaultExclude(String s) {
        if (defaultExcludes.indexOf(s) == -1) {
            defaultExcludes.add(s);
            return true;
        }
        return false;
    }
1343405
public void writeShort(short value) throws UnsupportedEncodingException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "writeShort", Short.valueOf(value));
    getBodyList().add(Short.valueOf(value));
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "writeShort");
  }
792710
public StrBuilder append(char[] src) {
		if (ArrayUtil.isEmpty(src)) {
			return this;
		}
		return append(src, 0, src.length);
	}
173373
@Override
    public void setShort(int parameterIndex, short x) throws SQLException
    {
        checkParameterBounds(parameterIndex);
        this.parameters[parameterIndex-1] = x;
    }
397450
public void append(String s) {
        int length = s.length();
        if (this.length + length > this.ch.length) {
            int newLength = this.ch.length*2;
            if (newLength < this.length + length + DEFAULT_SIZE)
                newLength = this.ch.length + length + DEFAULT_SIZE;
            char[] newch = new char[newLength];            
            System.arraycopy(this.ch, 0, newch, 0, this.length);
            this.ch = newch;
        }
        s.getChars(0, length, this.ch, this.length);
        this.length += length;
    }