public byte[] getRawContent() throws UnsupportedEncodingException { byte[] idBytes = getBytes(getId(), "ISO-8859-1"); byte[] contentBytes = getBytes(content, getEncoding()); byte[] buf = new byte[4 + 4 + idBytes.length + 1 + contentBytes.length]; byte[] flags = {0x00, 0x00, 0x00, 0x00}; int offset = 0; Utils.copy(getSize(contentBytes.length), buf, offset); offset += 4; Utils.copy(flags, buf, offset); offset += 4; Utils.copy(idBytes, buf, offset); offset += idBytes.length; buf[offset] = 0; offset += 1; Utils.copy(contentBytes, buf, offset); offset += contentBytes.length; return buf; }
public int getSamplingRate() { return Utils.getNumber(b, 20, 23); }
public int getBitsPerSample() { return Utils.getNumber(b, 16, 17); }
public int getChannelNumber() { return Utils.getNumber(b, 18, 19); }
public long getTotalFrames() { return Utils.getLongNumber(b, 12, 15); }
public long getFinalFrameBlocks() { return Utils.getLongNumber(b, 8, 11); }
public long getBlocksPerFrame() { return Utils.getLongNumber(b, 4, 7); }
public int getFormatFlags() { return Utils.getNumber(b, 2, 3); }
public int getCompressionLevel() { return Utils.getNumber(b, 0, 1); }