01: /*
02: * ====================================================================
03: * Copyright (c) 2004-2008 TMate Software Ltd. All rights reserved.
04: *
05: * This software is licensed as described in the file COPYING, which
06: * you should have received as part of this distribution. The terms
07: * are also available at http://svnkit.com/license.html
08: * If newer versions of this license are posted there, you may use a
09: * newer version instead, at your option.
10: * ====================================================================
11: */
12: package org.tmatesoft.svn.util;
13:
14: import java.io.InputStream;
15: import java.io.OutputStream;
16:
17: import org.tmatesoft.svn.core.internal.util.SVNLogInputStream;
18: import org.tmatesoft.svn.core.internal.util.SVNLogOutputStream;
19: import org.tmatesoft.svn.core.internal.util.SVNLogStream;
20:
21: /**
22: * @version 1.1.1
23: * @author TMate Software Ltd.
24: */
25: public class SVNDebugLogAdapter implements ISVNDebugLog {
26:
27: public void info(String message) {
28: }
29:
30: public void error(String message) {
31: }
32:
33: public void info(Throwable th) {
34: }
35:
36: public void error(Throwable th) {
37: }
38:
39: public void log(String message, byte[] data) {
40: }
41:
42: public void flushStream(Object stream) {
43: if (stream instanceof SVNLogInputStream) {
44: SVNLogInputStream logStream = (SVNLogInputStream) stream;
45: logStream.flushBuffer();
46: } else if (stream instanceof SVNLogOutputStream) {
47: SVNLogOutputStream logStream = (SVNLogOutputStream) stream;
48: logStream.flushBuffer();
49: }
50: }
51:
52: public InputStream createLogStream(InputStream is) {
53: return new SVNLogInputStream(is, this );
54: }
55:
56: public OutputStream createLogStream(OutputStream os) {
57: return new SVNLogOutputStream(os, this );
58: }
59:
60: public OutputStream createInputLogStream() {
61: return new SVNLogStream(this , false);
62: }
63:
64: public OutputStream createOutputLogStream() {
65: return new SVNLogStream(this , true);
66: }
67: }
|