messageIndex.put(new Integer(sequence), new long[] { offset, size }); headerFile.write((Integer.toString(sequence) + "," + Long.toString(offset) + "," + Integer .toString(size)).getBytes());
messageIndex.put(new Long(sequence), new long[] { offset, size }); headerBuffer.append(sequence); headerBuffer.append(","); headerBuffer.append(offset); headerBuffer.append(","); headerBuffer.append(size); headerFile.write(headerBuffer.toString().getBytes());
    public boolean set(int sequence, String message) throws IOException {        msgFile.seek(msgFile.length());        headerFile.seek(headerFile.length());        long offset = msgFile.getFilePointer();        if (offset > 0) {            headerFile.write(' ');        }        int size = message.length();        messageIndex.put(new Integer(sequence), new long[] { offset, size });        headerFile.write((Integer.toString(sequence) + "," + Long.toString(offset) + "," + Integer                .toString(size)).getBytes());        msgFile.write(message.getBytes());        return true;    }