public class SwfEncoder extends RandomAccessBuffer
| Modifier and Type | Field and Description |
|---|---|
int |
bytesWritten |
posbuf, count| Constructor and Description |
|---|
SwfEncoder(int version) |
| Modifier and Type | Method and Description |
|---|---|
void |
compress(CompressionLevel compressionLevel)
compress the marked section of our buffer, in place.
|
void |
flushBits() |
int |
getBytesWritten() |
void |
markComp() |
static int |
maxNum(int a,
int b,
int c,
int d)
Compares the absolute values of 4 signed integers and returns the unsigned magnitude of
the number with the greatest absolute value.
|
static int |
minBits(int number,
int bits)
Calculates the minimum number of bits necessary to represent the given number.
|
void |
reset() |
void |
write32(int c) |
void |
write32at(int pos,
int value) |
void |
write64(long c) |
void |
writeAt(int offset,
byte[] b) |
void |
writeBit(boolean data) |
void |
writeFixed8(float v) |
void |
writeFloat(float f) |
void |
writeLengthString(String name) |
void |
writeSBits(int data,
int size) |
void |
writeSI16(int c) |
void |
writeSI16at(int pos,
int value) |
void |
writeString(String s) |
void |
writeTo(OutputStream out,
CompressionLevel compressionLevel)
send buffer to the given stream.
|
void |
writeUBits(int data,
int size) |
void |
writeUI16(int c) |
void |
writeUI16at(int pos,
int value) |
void |
writeUI8(int c) |
void |
writeUI8at(int pos,
int value) |
getByteArray, getPos, readFully, setPos, toByteArray, write, write, write, writeToclose, size, toString, toString, toStringflushpublic void writeUI8(int c)
public void writeFixed8(float v)
public void writeUI16(int c)
public void writeSI16(int c)
public void write32(int c)
public void write64(long c)
public void writeFloat(float f)
public void markComp()
public void compress(CompressionLevel compressionLevel) throws IOException
IOExceptionpublic void writeTo(OutputStream out, CompressionLevel compressionLevel) throws IOException
out - IOExceptionpublic int getBytesWritten()
public void writeBit(boolean data)
public void writeUBits(int data,
int size)
public void writeSBits(int data,
int size)
public void flushBits()
public void reset()
reset in class RandomAccessBufferpublic void writeUI8at(int pos,
int value)
public void writeUI16at(int pos,
int value)
public void writeSI16at(int pos,
int value)
public void write32at(int pos,
int value)
public void writeString(String s)
public void writeLengthString(String name)
public static int maxNum(int a,
int b,
int c,
int d)
public static int minBits(int number,
int bits)
number - the number to compute the size ofbits - 1 if number is signed, 0 if unsignedpublic void writeAt(int offset,
byte[] b)
Copyright © 2018 The Apache Software Foundation. All rights reserved.