public int calcSerializedSize(final NullDataOutputStream dos) { dos.reset(); 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
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; }
try { DataSerializer.writeObject(o, dos); result += dos.size(); } catch (IOException ex) { RuntimeException ex2 = new IllegalArgumentException(LocalizedStrings.CachedDeserializableFactory_COULD_NOT_CALCULATE_SIZE_OF_OBJECT.toLocalizedString());
try { DataSerializer.writeObject(o, dos); result += dos.size(); } catch (IOException ex) { RuntimeException ex2 = new IllegalArgumentException(LocalizedStrings.CachedDeserializableFactory_COULD_NOT_CALCULATE_SIZE_OF_OBJECT.toLocalizedString());
try { DataSerializer.writeObject(o, dos); result += dos.size(); } catch (IOException ex) { RuntimeException ex2 = new IllegalArgumentException(LocalizedStrings.CachedDeserializableFactory_COULD_NOT_CALCULATE_SIZE_OF_OBJECT.toLocalizedString());
try { DataSerializer.writeObject(o, dos); result += dos.size(); } catch (IOException ex) { RuntimeException ex2 = new IllegalArgumentException(LocalizedStrings.CachedDeserializableFactory_COULD_NOT_CALCULATE_SIZE_OF_OBJECT.toLocalizedString());