org.shoal.ha.cache.impl.util
Class ReplicationOutputStream
java.lang.Object
java.io.OutputStream
java.io.ByteArrayOutputStream
org.shoal.ha.cache.impl.util.ReplicationOutputStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
public class ReplicationOutputStream
- extends java.io.ByteArrayOutputStream
- Author:
- Mahesh Kannan
| Fields inherited from class java.io.ByteArrayOutputStream |
buf, count |
| Methods inherited from class java.io.ByteArrayOutputStream |
close, reset, size, toString, toString, toString, write, write, writeTo |
| Methods inherited from class java.io.OutputStream |
flush, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ReplicationOutputStream
public ReplicationOutputStream()
mark
public int mark()
reWrite
public void reWrite(int mark,
byte[] data)
writeInt
public void writeInt(int value)
throws java.io.IOException
- Throws:
java.io.IOException
writeLong
public void writeLong(long value)
throws java.io.IOException
- Throws:
java.io.IOException
writeLengthPrefixedString
public void writeLengthPrefixedString(java.lang.String str)
throws java.io.IOException
- Throws:
java.io.IOException
writeLengthPrefixedBytes
public void writeLengthPrefixedBytes(byte[] data)
throws java.io.IOException
- Throws:
java.io.IOException
writeBoolean
public void writeBoolean(boolean b)
throws java.io.IOException
- Throws:
java.io.IOException
moveTo
public int moveTo(int pos)
backToAppendMode
public void backToAppendMode()
- Note: This must be used only after a call to moveTo
toByteArray
public byte[] toByteArray()
- Overrides:
toByteArray in class java.io.ByteArrayOutputStream
Copyright © 2010. All Rights Reserved.