telnet socket stubs
[nikiroo-utils.git] / src / jexer / net / TelnetOutputStream.java
1 /**
2 * Jexer - Java Text User Interface
3 *
4 * License: LGPLv3 or later
5 *
6 * This module is licensed under the GNU Lesser General Public License
7 * Version 3. Please see the file "COPYING" in this directory for more
8 * information about the GNU Lesser General Public License Version 3.
9 *
10 * Copyright (C) 2015 Kevin Lamonte
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public License
14 * as published by the Free Software Foundation; either version 3 of
15 * the License, or (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this program; if not, see
24 * http://www.gnu.org/licenses/, or write to the Free Software
25 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
26 * 02110-1301 USA
27 *
28 * @author Kevin Lamonte [kevin.lamonte@gmail.com]
29 * @version 1
30 */
31 package jexer.net;
32
33 import java.io.OutputStream;
34 import java.io.IOException;
35
36 /**
37 * TelnetOutputStream works with TelnetSocket to perform the telnet protocol.
38 */
39 public final class TelnetOutputStream extends OutputStream {
40
41 /**
42 * The root TelnetSocket that has my telnet protocol state.
43 */
44 private TelnetSocket master;
45
46 /**
47 * The raw socket's OutputStream.
48 */
49 private OutputStream output;
50
51 /**
52 * Package private constructor.
53 *
54 * @param master the master TelnetSocket
55 * @param output the underlying socket's OutputStream
56 */
57 TelnetOutputStream(TelnetSocket master, OutputStream output) {
58 this.master = master;
59 this.output = output;
60 }
61
62 // OutputStream interface -------------------------------------------------
63
64 /**
65 * Closes this output stream and releases any system resources associated
66 * with this stream.
67 */
68 @Override
69 public void close() throws IOException {
70 // TODO
71 }
72
73 /**
74 * Flushes this output stream and forces any buffered output bytes to be
75 * written out.
76 */
77 @Override
78 public void flush() throws IOException {
79 }
80
81 /**
82 * Writes b.length bytes from the specified byte array to this output
83 * stream.
84 */
85 @Override
86 public void write(byte[] b) throws IOException {
87 // TODO
88 }
89
90 /**
91 * Writes len bytes from the specified byte array starting at offset off
92 * to this output stream.
93 */
94 @Override
95 public void write(byte[] b, int off, int len) throws IOException {
96 // TODO
97 }
98
99 /**
100 * Writes the specified byte to this output stream.
101 */
102 @Override
103 public void write(int b) throws IOException {
104 // TODO
105 }
106
107 }