redis.clients.util
Class RedisOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
redis.clients.util.RedisOutputStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
public final class RedisOutputStream
- extends java.io.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
|
Fields inherited from class java.io.FilterOutputStream |
out |
Methods inherited from class java.io.FilterOutputStream |
close, write |
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(java.io.OutputStream out)
RedisOutputStream
public RedisOutputStream(java.io.OutputStream out,
int size)
write
public void write(byte b)
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(byte[] b)
throws java.io.IOException
- Overrides:
write
in class java.io.FilterOutputStream
- Throws:
java.io.IOException
write
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
- Overrides:
write
in class java.io.FilterOutputStream
- Throws:
java.io.IOException
writeAsciiCrLf
public void writeAsciiCrLf(java.lang.String in)
throws java.io.IOException
- Throws:
java.io.IOException
isSurrogate
public static boolean isSurrogate(char ch)
utf8Length
public static int utf8Length(java.lang.String str)
writeCrLf
public void writeCrLf()
throws java.io.IOException
- Throws:
java.io.IOException
writeUtf8CrLf
public void writeUtf8CrLf(java.lang.String str)
throws java.io.IOException
- Throws:
java.io.IOException
writeIntCrLf
public void writeIntCrLf(int value)
throws java.io.IOException
- Throws:
java.io.IOException
flush
public void flush()
throws java.io.IOException
- Specified by:
flush
in interface java.io.Flushable
- Overrides:
flush
in class java.io.FilterOutputStream
- Throws:
java.io.IOException
Copyright © 2010. All Rights Reserved.