提交 d573e9b2 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Rename JdbcLob.Output to LobPipedOutputStream

上级 7ef94b7f
...@@ -176,7 +176,7 @@ public class JdbcBlob extends JdbcLob implements Blob { ...@@ -176,7 +176,7 @@ public class JdbcBlob extends JdbcLob implements Blob {
completeWrite(conn.createBlob(in, -1)); completeWrite(conn.createBlob(in, -1));
} }
}; };
Output out = new Output(in, task); LobPipedOutputStream out = new LobPipedOutputStream(in, task);
task.execute(); task.execute();
state = State.SET_CALLED; state = State.SET_CALLED;
return new BufferedOutputStream(out); return new BufferedOutputStream(out);
......
...@@ -25,10 +25,10 @@ import org.h2.value.Value; ...@@ -25,10 +25,10 @@ import org.h2.value.Value;
*/ */
public abstract class JdbcLob extends TraceObject { public abstract class JdbcLob extends TraceObject {
final class Output extends PipedOutputStream { final class LobPipedOutputStream extends PipedOutputStream {
private final Task task; private final Task task;
Output(PipedInputStream snk, Task task) throws IOException { LobPipedOutputStream(PipedInputStream snk, Task task) throws IOException {
super(snk); super(snk);
this.task = task; this.task = task;
} }
...@@ -150,7 +150,7 @@ public abstract class JdbcLob extends TraceObject { ...@@ -150,7 +150,7 @@ public abstract class JdbcLob extends TraceObject {
return IOUtils.getBufferedWriter(setClobOutputStreamImpl()); return IOUtils.getBufferedWriter(setClobOutputStreamImpl());
} }
Output setClobOutputStreamImpl() throws IOException { LobPipedOutputStream setClobOutputStreamImpl() throws IOException {
// PipedReader / PipedWriter are a lot slower // PipedReader / PipedWriter are a lot slower
// than PipedInputStream / PipedOutputStream // than PipedInputStream / PipedOutputStream
// (Sun/Oracle Java 1.6.0_20) // (Sun/Oracle Java 1.6.0_20)
...@@ -161,7 +161,7 @@ public abstract class JdbcLob extends TraceObject { ...@@ -161,7 +161,7 @@ public abstract class JdbcLob extends TraceObject {
completeWrite(conn.createClob(IOUtils.getReader(in), -1)); completeWrite(conn.createClob(IOUtils.getReader(in), -1));
} }
}; };
Output out = new Output(in, task); LobPipedOutputStream out = new LobPipedOutputStream(in, task);
task.execute(); task.execute();
return out; return out;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论