private void runBooleanTest(Output write) throws IOException { for (int i = 0; i < 100; i++) { write.writeBoolean(true); write.writeBoolean(false); } Input read = new Input(write.toBytes()); for (int i = 0; i < 100; i++) { assertEquals(true, read.readBoolean()); assertEquals(false, read.readBoolean()); } }
public void write(Kryo kryo, Output output, Calendar object) { timeZoneSerializer.write(kryo, output, object.getTimeZone()); // can't be null output.writeLong(object.getTimeInMillis(), true); output.writeBoolean(object.isLenient()); output.writeInt(object.getFirstDayOfWeek(), true); output.writeInt(object.getMinimalDaysInFirstWeek(), true); if (object instanceof GregorianCalendar) output.writeLong(((GregorianCalendar) object).getGregorianChange().getTime(), false); else output.writeLong(DEFAULT_GREGORIAN_CUTOVER, false); }
public void onOutput(long classId, long testId, TestOutputEvent outputEvent) { boolean stdout = outputEvent.getDestination() == TestOutputEvent.Destination.StdOut; mark(classId, testId, stdout); output.writeBoolean(stdout); output.writeLong(classId); output.writeLong(testId); byte[] bytes; try { bytes = outputEvent.getMessage().getBytes(messageStorageCharset.name()); } catch (UnsupportedEncodingException e) { throw UncheckedException.throwAsUncheckedException(e); } output.writeInt(bytes.length); output.writeBytes(bytes); }
public void writeBoolean(boolean value) throws IOException { output.writeBoolean(value); }
public void write(Kryo kryo, Output output, Boolean object) { output.writeBoolean(object); }