redis.clients.util
Class RedisOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
redis.clients.util.RedisOutputStream
- All Implemented Interfaces:
- Closeable, Flushable
public final class RedisOutputStream
- extends FilterOutputStream
The class implements a buffered output stream without synchronization
There are also special operations like in-place string encoding.
This stream fully ignore mark/reset and should not be used outside Jedis
Field Summary |
protected byte[] |
buf
|
protected int |
count
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
buf
protected final byte[] buf
count
protected int count
RedisOutputStream
public RedisOutputStream(OutputStream out)
RedisOutputStream
public RedisOutputStream(OutputStream out,
int size)
write
public void write(byte b)
throws IOException
- Throws:
IOException
write
public void write(byte[] b)
throws IOException
- Overrides:
write
in class FilterOutputStream
- Throws:
IOException
write
public void write(byte[] b,
int off,
int len)
throws IOException
- Overrides:
write
in class FilterOutputStream
- Throws:
IOException
writeAsciiCrLf
public void writeAsciiCrLf(String in)
throws IOException
- Throws:
IOException
isSurrogate
public static boolean isSurrogate(char ch)
utf8Length
public static int utf8Length(String str)
writeCrLf
public void writeCrLf()
throws IOException
- Throws:
IOException
writeUtf8CrLf
public void writeUtf8CrLf(String str)
throws IOException
- Throws:
IOException
writeIntCrLf
public void writeIntCrLf(int value)
throws IOException
- Throws:
IOException
flush
public void flush()
throws IOException
- Specified by:
flush
in interface Flushable
- Overrides:
flush
in class FilterOutputStream
- Throws:
IOException
Copyright © 2012. All Rights Reserved.