public void writeBigSmart(int value)
	{
		Preconditions.checkArgument(value >= 0);
		if (value >= 32768)
		{
			ensureRemaining(4);
			this.writeInt((1 << 31) | value);
		}
		else
		{
			ensureRemaining(2);
			this.writeShort(value);
		}
	}
@Test
	public void testWriteBigSmart()
	{
		OutputStream os = new OutputStream();
		os.writeBigSmart(42);
		os.writeBigSmart(70000);
		os.writeBigSmart(65535);

		InputStream is = new InputStream(os.getArray());
		assertEquals(42, is.readBigSmart());
		assertEquals(70000, is.readBigSmart());
		assertEquals(65535, is.readBigSmart());
	}