Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 39321
Collapse All | Expand All

(-)Connection.java.old (-3 / +17 lines)
Lines 16-18 Link Here
16
import java.io.OutputStream;
16
import java.io.OutputStream;
17
import java.io.UnsupportedEncodingException;
17
18
19
import org.eclipse.core.resources.ResourcesPlugin;
18
import org.eclipse.core.runtime.IProgressMonitor;
20
import org.eclipse.core.runtime.IProgressMonitor;
Lines 49-52 Link Here
49
	private byte[] readLineBuffer = new byte[256];
51
	private byte[] readLineBuffer = new byte[256];
52
	private String encoding;
50
53
51
	public Connection(ICVSRepositoryLocation cvsroot, IServerConnection serverConnection) {
54
	public Connection(ICVSRepositoryLocation cvsroot, IServerConnection serverConnection) {
55
		encoding = ResourcesPlugin.getEncoding();
52
		fCVSRoot = cvsroot;
56
		fCVSRoot = cvsroot;
Lines 148-150 Link Here
148
			}
152
			}
149
			String result = new String(readLineBuffer, 0, index);
153
			String result = new String(readLineBuffer, 0, index, encoding);
150
			if (Policy.DEBUG_CVS_PROTOCOL) System.out.println(result);
154
			if (Policy.DEBUG_CVS_PROTOCOL) System.out.println(result);
Lines 177-179 Link Here
177
	public void write(String s) throws CVSException {
181
	public void write(String s) throws CVSException {
178
		write(s.getBytes(), false);
182
		try {
183
			write(s.getBytes(encoding), false);
184
		}
185
		catch (UnsupportedEncodingException e) {
186
			throw new CVSCommunicationException(e);
187
		}
179
	}
188
	}
Lines 190-192 Link Here
190
	public void writeLine(String s) throws CVSException {
199
	public void writeLine(String s) throws CVSException {
191
		write(s.getBytes(), true);
200
		try {
201
			write(s.getBytes(encoding), true);
202
		}
203
		catch (UnsupportedEncodingException e) {
204
			throw new CVSCommunicationException(e);
205
		}
192
	}
206
	}

Return to bug 39321