public void writeBuffer(byte[] buffer, int len) throws IOException { writeInt(len); if (buffer != null && len > 0) { write(buffer, 0, len); write(pad,0,((4 - len) & 3));
public void writeBuffer(byte[] buffer) throws IOException { if (buffer == null) writeInt(0); else { int len = buffer.length; writeInt(len); write(buffer, len, (4 - len) & 3);
    public void writeBuffer(byte[] buffer, int len) throws IOException {        writeInt(len);        if (buffer != null && len > 0) {            write(buffer, 0, len);            write(pad,0,((4 - len) & 3));        }    }