Object 에서 byte[]
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutput out = new ObjectOutputStream(bos);
out.writeObject(yourObject);
byte[] yourBytes = bos.toByteArray();
byte[]에서 Object
ByteArrayIntputSream bis = new ByteArrayInputStream(yourBytes);
ObjectInput in = new ObjectInputStream(bis);
Object o = in.readObject();
출처 : http://sdw8001.tistory.com/20
'Java > Common' 카테고리의 다른 글
[java]Calendar 사용법 (0) | 2015.05.29 |
---|---|
[암호화] JCA & JCE (0) | 2015.05.13 |
[java]한글 초성, 중성, 종성 분리 (0) | 2014.10.24 |