@Test(expected = NumberFormatException.class) public void testFloatNaNThrowsException() { w.writeValue(Float.NaN); }
public JsonWriter writeValue(int value) { clearMetadata(); beforeValue(); if ((_len + 11) >= _bufferSize) flushBuffer(); if (value < 0) { _buffer[_len++] = '-'; writeInt(-((long) value)); } else writeInt(value); _hasPrevious = true; return this; }
JsonWriter implements ObjectWriter { public JsonWriter writeValue(int value) { clearMetadata(); beforeValue(); if ((_len + 11) >= _bufferSize) flushBuffer(); if (value < 0) { _buffer[_len++] = '-'; writeInt(-((long) value)); } else writeInt(value); _hasPrevious = true; return this; } }
JsonWriter implements ObjectWriter { public JsonWriter writeValue(int value) { clearMetadata(); beforeValue(); if ((_len + 11) >= _bufferSize) flushBuffer(); if (value < 0) { _buffer[_len++] = '-'; writeInt(-((long) value)); } else writeInt(value); _hasPrevious = true; return this; } JsonWriter(Writer writer);  JsonWriter(Writer writer, final boolean skipNull, final boolean htmlSafe,
                    boolean indentation); }
JsonWriter implements ObjectWriter { public JsonWriter writeValue(int value) { clearMetadata(); beforeValue(); if ((_len + 11) >= _bufferSize) flushBuffer(); if (value < 0) { _buffer[_len++] = '-'; writeInt(-((long) value)); } else writeInt(value); _hasPrevious = true; return this; } JsonWriter(Writer writer);  JsonWriter(Writer writer, final boolean skipNull, final boolean htmlSafe,
                    boolean indentation); JsonType enclosingType(); void close(); void flush(); JsonWriter beginArray(); JsonWriter beginObject(); JsonWriter endArray(); JsonWriter endObject(); JsonWriter writeName(final String name); ObjectWriter writeEscapedName(char[] name); JsonWriter writeValue(int value); JsonWriter writeValue(final double value); JsonWriter writeValue(long value); ObjectWriter writeValue(short value); ObjectWriter writeValue(float value); JsonWriter writeValue(final boolean value); JsonWriter writeValue(final Number value); ObjectWriter writeBoolean(final Boolean value); ObjectWriter writeNumber(final Number value); ObjectWriter writeString(String value); ObjectWriter writeBytes(byte[] value); ObjectWriter writeValue(byte[] value); JsonWriter writeUnsafeValue(final String value); JsonWriter writeValue(final String value); final static char[] escapeString(final String value); ObjectWriter writeNull(); ObjectWriter beginNextObjectMetadata(); ObjectWriter writeMetadata(String name, String value); ObjectWriter writeBoolean(String name, Boolean value); ObjectWriter writeNumber(String name, Number value); ObjectWriter writeString(String name, String value); ObjectWriter writeBytes(String name, byte[] value); Writer unwrap(); }
JsonWriter implements ObjectWriter { public JsonWriter writeValue(int value) { clearMetadata(); beforeValue(); if ((_len + 11) >= _bufferSize) flushBuffer(); if (value < 0) { _buffer[_len++] = '-'; writeInt(-((long) value)); } else writeInt(value); _hasPrevious = true; return this; } JsonWriter(Writer writer);  JsonWriter(Writer writer, final boolean skipNull, final boolean htmlSafe,
                    boolean indentation); JsonType enclosingType(); void close(); void flush(); JsonWriter beginArray(); JsonWriter beginObject(); JsonWriter endArray(); JsonWriter endObject(); JsonWriter writeName(final String name); ObjectWriter writeEscapedName(char[] name); JsonWriter writeValue(int value); JsonWriter writeValue(final double value); JsonWriter writeValue(long value); ObjectWriter writeValue(short value); ObjectWriter writeValue(float value); JsonWriter writeValue(final boolean value); JsonWriter writeValue(final Number value); ObjectWriter writeBoolean(final Boolean value); ObjectWriter writeNumber(final Number value); ObjectWriter writeString(String value); ObjectWriter writeBytes(byte[] value); ObjectWriter writeValue(byte[] value); JsonWriter writeUnsafeValue(final String value); JsonWriter writeValue(final String value); final static char[] escapeString(final String value); ObjectWriter writeNull(); ObjectWriter beginNextObjectMetadata(); ObjectWriter writeMetadata(String name, String value); ObjectWriter writeBoolean(String name, Boolean value); ObjectWriter writeNumber(String name, Number value); ObjectWriter writeString(String name, String value); ObjectWriter writeBytes(String name, byte[] value); Writer unwrap();  }