Package com.reportmill.flash
Class RMFlashBuffer
java.lang.Object
com.reportmill.base.RMObject
com.reportmill.base.RMData
com.reportmill.flash.RMFlashBuffer
- All Implemented Interfaces:
- RMArchiver.Archiving,- Serializable,- Cloneable
This class is like a StringBuffer, except its for writing binary bit data instead of strings,
 including signed and unsigned bit values, but, more importantly Flash file format primitives (Tags,
 Rects, Colors, Matrices, records, etc.).
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintbitsNeededForInt(int aValue) Returns the minimun number of bits required to display given int value.intbitsNeededForRect(RMRect aRect) Returns the minimun number of bits required to display given rect.intbitsNeededForUInt(long aValue) Returns the minimun number of bits required to display given long value.voidMarks the remaining bits in the last byte to used.voidwriteColor(RMColor aColor) Writes flash for a color.voidwriteColorTransform(RMColor c1, RMColor c2, float anOpacity) Writes a flash color transform from color 1 to color 2 with given opacity.voidwriteColorWithAlpha(RMColor aColor) Writes flash for a color with alpha.voidwriteFillStyle(RMColor aColor) Writes the given color as a solid fill style.voidwriteLineStyle(RMColor aColor, float lineWidth) Writes the given color and line with as a line style.voidwriteMatrix(float a, float b, float c, float d, float tx, float ty) Write the given transform components.voidWrites the given rect (Nbits UB5, Xmin, Xmax, Ymin, Ymax).voidwriteSB(int bits, long value) Write the given signed long value out using exactly the given number of bits.voidwriteSB16(int val) Writes the given int value as a signed 16 bit value.voidwriteSB9(int val) Writes the given int value as a signed 9 bit value.voidwriteSI16(int val) Writes the given int value as a signed 16 bit value.voidwriteUB(int bits, long value) Write the given unsigned long value out using exactly the given number of bits.voidwriteUB1(int val) Writes the given int value as an unsigned 1 bit value.voidwriteUB2(int val) Writes the given int value as an unsigned 2 bit value.voidwriteUB3(int val) Writes the given int value as an unsigned 3 bit value.voidwriteUB4(int val) Writes the given int value as an unsigned 4 bit value.voidwriteUB5(int val) Writes the given int value as an unsigned 5 bit value.voidwriteUB7(int val) Writes the given int value as an unsigned 7 bit value.voidwriteUB8(int val) Writes the given int value as an unsigned 8 bit value.voidwriteUI16(int val) Writes the given int value as an unsigned 16 bit value.voidwriteUI32(long val) Writes the given long value as an unsigned 32 bit value.voidwriteUI8(int value) Writes the given int value as an unsigned 8 bit value.Methods inherited from class com.reportmill.base.RMDataappend, append, append, append, append, append, append, append, append, append, append, appendByte, appendInt, appendLittleInt, appendLittleShort, appendLittleUInt, appendLittleUShort, appendShort, appendUByte, byteAt, capacity, clone, ensureCapacity, equals, flateCompressedData, getBytes, getBytes, getBytes, getData, initWithArchiver, inputStream, insert, insert, insert, insertLittleUIntAtIndex, length, replace, setLittleIntAtIndex, setLittleShortAtIndex, setLittleUShortAtIndex, toByteArray, toByteArray, toString, toString, writeToFileMethods inherited from class com.reportmill.base.RMObjectcopy, didChange, didUndo, getAnimAttribute, getClassNameShort, undoClone, undoCopy, undoEquals
- 
Constructor Details- 
RMFlashBufferpublic RMFlashBuffer()
 
- 
- 
Method Details- 
writeUBpublic void writeUB(int bits, long value) Write the given unsigned long value out using exactly the given number of bits.
- 
writeSBpublic void writeSB(int bits, long value) Write the given signed long value out using exactly the given number of bits.
- 
writeUI8public void writeUI8(int value) Writes the given int value as an unsigned 8 bit value.
- 
writeUI16public void writeUI16(int val) Writes the given int value as an unsigned 16 bit value.
- 
writeUI32public void writeUI32(long val) Writes the given long value as an unsigned 32 bit value.
- 
writeSI16public void writeSI16(int val) Writes the given int value as a signed 16 bit value.
- 
writeUB1public void writeUB1(int val) Writes the given int value as an unsigned 1 bit value.
- 
writeUB2public void writeUB2(int val) Writes the given int value as an unsigned 2 bit value.
- 
writeUB3public void writeUB3(int val) Writes the given int value as an unsigned 3 bit value.
- 
writeUB4public void writeUB4(int val) Writes the given int value as an unsigned 4 bit value.
- 
writeUB5public void writeUB5(int val) Writes the given int value as an unsigned 5 bit value.
- 
writeUB7public void writeUB7(int val) Writes the given int value as an unsigned 7 bit value.
- 
writeUB8public void writeUB8(int val) Writes the given int value as an unsigned 8 bit value.
- 
writeSB9public void writeSB9(int val) Writes the given int value as a signed 9 bit value.
- 
writeSB16public void writeSB16(int val) Writes the given int value as a signed 16 bit value.
- 
writeRectWrites the given rect (Nbits UB5, Xmin, Xmax, Ymin, Ymax).
- 
writeMatrixpublic void writeMatrix(float a, float b, float c, float d, float tx, float ty) Write the given transform components.
- 
writeColorWrites flash for a color.
- 
writeColorWithAlphaWrites flash for a color with alpha.
- 
writeColorTransformWrites a flash color transform from color 1 to color 2 with given opacity.
- 
writeFillStyleWrites the given color as a solid fill style.
- 
writeLineStyleWrites the given color and line with as a line style.
- 
bitsNeededForUIntpublic int bitsNeededForUInt(long aValue) Returns the minimun number of bits required to display given long value.
- 
bitsNeededForIntpublic int bitsNeededForInt(int aValue) Returns the minimun number of bits required to display given int value.
- 
bitsNeededForRectReturns the minimun number of bits required to display given rect.
- 
padToByteBoundarypublic void padToByteBoundary()Marks the remaining bits in the last byte to used.
 
-