Java 바이트 스트림 ObjectInputStream/ObjectOutputStream
ObjectInputStream 생성자
| 생성자 | 설명 | 
|---|---|
| ObjectInputStream(InputStream in) | in 으로부터의 unmarshalling을 위한 ObjectInputStream 객체를 생성한다. | 
ObjectInputStream 메소드
| 생성자 | 설명 | 
|---|---|
| int available() | 객체에서 읽을 수 있는 바이트 값을 반환한다. | 
| void close() | 객체를 닫는다. | 
| void defaultReadObject() | 현재 Stream에서 static,transient가 아닌 객체를 읽는다. | 
| protected boolean enableResolveObject(boolean enable) | 현재 Stream에서 객체를 읽는 것 허용 여부를 설정한다. | 
| int read() | 데이터를 바이트 단위로 읽는다. | 
| int read(byte[] buf, int off, int len) | buf 바이트 배열에 off 부터 len까지 읽는다. | 
| boolean readBoolean() | 객체의 boolean 값을 읽는다. | 
| byte readByte() | 객체의 1 byte를 읽는다. (8 비트) | 
| char readChar() | 객체의 1 Char를 읽는다. (16 비트) | 
| protected ObjectStreamClass readClassDescriptor() | 직렬화된 스트림에서 Descriptor를 읽는다. | 
| double readDouble() | 객체에서 1 double을 읽는다. (64 비트) | 
| ObjectInputStream.GetField.readFileds() | 객체에서 영속성이 보장된 형의 이름을 가져온다. | 
| float readFloat() | 객체에서 1 float을 읽는다. (32 비트) | 
| void readFully(byte[] buf) | 객체에서 buf 만큼 바이트를 읽는다. | 
| void readFully(byte[] buf, int off, int len) | 객체에서 buf 만큼 off 부터 len만큼 읽는다. | 
| int readInt() | 객체에서 1 int를 읽는다. (32 비트) | 
| Long readLong() | 객체에서 1 Long을 읽는다. (64 비트) | 
| Object readObject() | 객체에서 Object를 읽는다. | 
| Short readShort() | 객체에서 1 Short를 읽는다. (16비트) | 
| protected void readStreamHeader() | 스트림의 헤더를 읽는다. | 
| Object readUnshared() | 스트림에서 “unshared” 객체를 읽는다. | 
| String readUTF() | String을 UTF-8 방식으로 읽는다. | 
ObjectOutputStream 생성자
| 생성자 | 설명 | 
|---|---|
| ObjectOutputStream(OutputStream out) | out을 marshalling 하기 위한 ObjectOutputStream 객체를 생성한다. | 
ObjectOutputStream 메소드
| 생성자 | 설명 | 
|---|---|
| void close() | 객체를 닫는다. | 
| void defaultWriteObject() | 현재 Stream에 static,transient가 아닌 객체를 쓴다. | 
| protected void drain() | ObjectOutputStream의 버퍼에 있는 객체를 내보낸다. | 
| protected boolean enableReplaceObject(boolean enable) | 현재 Stream에서 객체를 쓰는것 허용 여부를 설정한다. | 
| void flush() | 스트림에 데이터를 내보낸다. | 
| protected Object replaceObject(Object obj) | 객체에 Object를 교체한다. | 
| void reset() | 스트림을 리셋한다. | 
| void useProtocolVersion(int version) | 스트림을 내보낼때 사용하는 프로토콜의 버전을 설정한다. | 
| void write(byte[] buf) | buf를 쓴다. | 
| void write(byte[] buf, int off, int len) | buf의 off부터 len 길이만큼을 스트림에 쓴다. | 
| void write(int val) | val 바이트만큼 스트림에 쓴다. | 
| void writeBoolean(boolean val) | val을 스트림에 쓴다. | 
| void writeByte(int val) | val을 byte로 스트림에 쓴다. (8 비트) | 
| void writeBytes(String str) | str을 sequence 바이트로 스트림에 쓴다. | 
| void writeChar(int val) | val을 Char로 스트림에 쓴다. (16 비트) | 
| void writeChars(String str) | str을 sequence char로 스트림에 쓴다. | 
| protected void writeClassDescriptor(ObjectStreamClass desc) | 스트림에 desc를 쓴다. | 
| void writeDouble(double val) | val을 Double로 스트림에 쓴다. (64 비트) | 
| void writeFilelds() | 스트림에 버퍼에 있는 필드를 쓴다. | 
| void writeFloat(float val) | val을 Float으로 스트림에 쓴다. (32 비트) | 
| void writeInt(int val) | val을 Int로 스트림에 쓴다.(32 비트) | 
| void writeLong(long val) | val을 long로 스트림에 쓴다. (64 비트) | 
| void writeObject(Object obj) | Obj 객체를 스트림에 쓴다. | 
| void writeShort(int val) | val을 Short로 스트림에 쓴다. | 
| protected void writeStreamHeader() | 스트림에 StreamHeader를 쓴다. | 
| void writeUnshared(Object obj) | “unshared” 객체를 스트림에 쓴다. | 
| void writeUTF(String str) | 객체의 문자의 인코딩을 UTF-8로 설정한다. |