/** * */ protected SequentialFile createFile() { return storageManager.createFileForLargeMessage(getMessageID(), durable); }
@Override public synchronized void addBytes(final byte[] bytes) throws Exception { validateFile(); if (!file.isOpen()) { file.open(); } storageManager.addBytesToLargeMessage(file, getMessageID(), bytes); bodySize += bytes.length; }
@Override public synchronized void addBytes(final ActiveMQBuffer bytes) throws Exception { validateFile(); if (!file.isOpen()) { file.open(); } final int readableBytes = bytes.readableBytes(); storageManager.addBytesToLargeMessage(file, getMessageID(), bytes); bodySize += readableBytes; }