kr.co.hit.live.web.flex.io.amf
Class AmfOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.io.DataOutputStream
kr.co.hit.live.web.flex.io.amf.AmfOutputStream
- All Implemented Interfaces:
- Closeable, DataOutput, Flushable, ObjectOutput
- Direct Known Subclasses:
- Amf0OutputStream, Amf3OutputStream
public abstract class AmfOutputStream
- extends DataOutputStream
- implements ObjectOutput
| Methods inherited from class java.io.DataOutputStream |
flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.io.DataOutput |
writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF |
AmfOutputStream
public AmfOutputStream(OutputStream out)
writeObject
public abstract void writeObject(Object obj)
throws IOException
- Specified by:
writeObject in interface ObjectOutput
- Throws:
IOException
reset
public abstract void reset()
getBuffer
protected byte[] getBuffer(int len)
writeS16
protected void writeS16(int v)
throws IOException
- Throws:
IOException
writeU16
protected void writeU16(int v)
throws IOException
- Throws:
IOException
writeU32
protected void writeU32(int v)
throws IOException
- Throws:
IOException
writeU29
protected void writeU29(int ref)
throws IOException
- AMF U29 타입을 전송한다.
- 0x00000000 - 0x0000007F : 0xxxxxxx
- 0x00000080 - 0x00003FFF : 1xxxxxxx 0xxxxxxx
- 0x00004000 - 0x001FFFFF : 1xxxxxxx 1xxxxxxx 0xxxxxxx
- 0x00200000 - 0x3FFFFFFF : 1xxxxxxx 1xxxxxxx 1xxxxxxx xxxxxxxx
- 0x40000000 - 0xFFFFFFFF : range exception
- Parameters:
ref -
- Throws:
IOException
encodeUTF
protected int encodeUTF(String s,
byte[] buf)
throws IOException
- 문자열을 UTF8 byte 배열에 담아 준다. byte 배열은 충분히 커야한다.
- Parameters:
s - encoding 대상 문자열buf - encoding 결과를 담아둘 byte 배열
- Returns:
- 실제 encode된 byte 수
- Throws:
IOException
Copyright © 2014. All Rights Reserved.