public int calcSerializedSize() { NullDataOutputStream dos = new NullDataOutputStream(); try { toData(dos); return dos.size(); } catch (IOException ex) { RuntimeException ex2 = new IllegalArgumentException(LocalizedStrings.InitialImageOperation_COULD_NOT_CALCULATE_SIZE_OF_OBJECT.toLocalizedString()); ex2.initCause(ex); throw ex2; } } @Override
/** * Return length of this value in bytes. */ @Override public int getLengthInBytes(final DataTypeDescriptor dtd) throws StandardException { if (!isNull()) { NullDataOutputStream ndos = new NullDataOutputStream(); try { toDataForOptimizedResultHolder(ndos); } catch (IOException ioe) { throw GemFireXDRuntimeException.newRuntimeException( "Exception in UserType.getLengthInBytes.", ioe); } return ndos.size(); } return 0; }
/** * Return length of this value in bytes. */ @Override public int getLengthInBytes(final DataTypeDescriptor dtd) throws StandardException { if (!isNull()) { NullDataOutputStream ndos = new NullDataOutputStream(); try { toDataForOptimizedResultHolder(ndos); } catch (IOException ioe) { throw GemFireXDRuntimeException.newRuntimeException( "Exception in UserType.getLengthInBytes.", ioe); } return ndos.size(); } return 0; }
/** * Return length of this value in bytes. */ @Override public int getLengthInBytes(final DataTypeDescriptor dtd) throws StandardException { if (!isNull()) { NullDataOutputStream ndos = new NullDataOutputStream(); try { toDataForOptimizedResultHolder(ndos); } catch (IOException ioe) { throw GemFireXDRuntimeException.newRuntimeException( "Exception in UserType.getLengthInBytes.", ioe); } return ndos.size(); } return 0; }
} else if (calcSerializedSize) { result = Sizeable.PER_OBJECT_OVERHEAD + 4; NullDataOutputStream dos = new NullDataOutputStream(); try { DataSerializer.writeObject(o, dos);
} else { result = 4; NullDataOutputStream dos = new NullDataOutputStream(); try { DataSerializer.writeObject(o, dos);
} else { result = 4; NullDataOutputStream dos = new NullDataOutputStream(); try { DataSerializer.writeObject(o, dos);
} else if (calcSerializedSize) { result = Sizeable.PER_OBJECT_OVERHEAD + 4; NullDataOutputStream dos = new NullDataOutputStream(); try { DataSerializer.writeObject(o, dos);
.create("region"); DataSerializer.writeObject(new TestPdx("a"), new NullDataOutputStream());
final NullDataOutputStream countingStream = new NullDataOutputStream(); if (InitialImageOperation.internalDuringPackingImage != null && getFullPath().endsWith(