@Test public void messageFormatUndeleteUpdateRecordTest() throws Exception { MessageFormatRecord.headerVersionToUse = MessageFormatRecord.Message_Header_Version_V3; StoreKey key = new MockId("id1"); short accountId = Utils.getRandomShort(TestUtils.RANDOM); short containerId = Utils.getRandomShort(TestUtils.RANDOM); long updateTimeMs = SystemTime.getInstance().milliseconds() + TestUtils.RANDOM.nextInt(); short lifeVersion = Utils.getRandomShort(TestUtils.RANDOM); MessageFormatInputStream messageFormatInputStream = new UndeleteMessageFormatInputStream(key, accountId, containerId, updateTimeMs, lifeVersion); long undeleteRecordSize = MessageFormatRecord.Update_Format_V3.getRecordSize(SubRecord.Type.UNDELETE); int headerSize = MessageFormatRecord.getHeaderSizeForVersion(MessageFormatRecord.Message_Header_Version_V3); Assert.assertEquals(headerSize + undeleteRecordSize + key.sizeInBytes(), messageFormatInputStream.getSize()); checkUndeleteMessage(messageFormatInputStream, undeleteRecordSize, key, accountId, containerId, updateTimeMs, lifeVersion); }
public long getSize() { return messageLength; }
MessageFormatInputStream extends InputStream { public long getSize() { return messageLength; } }
MessageFormatInputStream extends InputStream { public long getSize() { return messageLength; }  }
MessageFormatInputStream extends InputStream { public long getSize() { return messageLength; }  @Override int read(); @Override int read(byte b[], int off, int len); @Override int available(); long getSize(); }
MessageFormatInputStream extends InputStream { public long getSize() { return messageLength; }  @Override int read(); @Override int read(byte b[], int off, int len); @Override int available(); long getSize();  }