public byte[] getBytes() {
		ByteArrayOutputStream b = new ByteArrayOutputStream();

		try {
			b.write(magic);

			byte[] ascii = command.getBytes("ASCII");

			for (int i = 0; i < 12; i++) {
				if (i < ascii.length) {
					b.write(ascii[i]);
				} else {
					b.write(0);
				}
			}

			byte[] pbytes = payload.getBytes();
			length = pbytes.length;
			checksum = Digest.sha512(pbytes, 4);

			b.write(Util.getBytes(length));
			b.write(checksum);
			b.write(pbytes);
		} catch (UnsupportedEncodingException e) {
			LOG.log(Level.SEVERE, "ASCII not supported!", e);
			System.exit(1);
		} catch (IOException e) {
			LOG.log(Level.SEVERE, "Could not write bytes!", e);
			System.exit(1);
		}

		return b.toByteArray();
	}