git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit '738dd8c426dcc6ed2508d68b7985f68d66549889'
[fanfix.git]
/
src
/
jexer
/
net
/
TelnetOutputStream.java
diff --git
a/src/jexer/net/TelnetOutputStream.java
b/src/jexer/net/TelnetOutputStream.java
index 905c52a799e732588975af64099864a97d4621ed..6e7536a847f3bcb5e9a68b2c90f38026f2ed2694 100644
(file)
--- a/
src/jexer/net/TelnetOutputStream.java
+++ b/
src/jexer/net/TelnetOutputStream.java
@@
-146,7
+146,7
@@
public class TelnetOutputStream extends OutputStream {
@Override
public void write(final int b) throws IOException {
byte [] bytes = new byte[1];
@Override
public void write(final int b) throws IOException {
byte [] bytes = new byte[1];
- bytes[0] = (byte)b;
+ bytes[0] = (byte)
b;
writeImpl(bytes, 0, 1);
}
writeImpl(bytes, 0, 1);
}
@@
-196,8
+196,8
@@
public class TelnetOutputStream extends OutputStream {
if (ch == TELNET_IAC) {
// IAC -> IAC IAC
if (ch == TELNET_IAC) {
// IAC -> IAC IAC
- writeBuffer[writeBufferI++] = (byte)TELNET_IAC;
- writeBuffer[writeBufferI++] = (byte)TELNET_IAC;
+ writeBuffer[writeBufferI++] = (byte)
TELNET_IAC;
+ writeBuffer[writeBufferI++] = (byte)
TELNET_IAC;
} else {
// Anything else -> just send
writeBuffer[writeBufferI++] = ch;
} else {
// Anything else -> just send
writeBuffer[writeBufferI++] = ch;
@@
-213,15
+213,15
@@
public class TelnetOutputStream extends OutputStream {
if (writeCR == true) {
// Flush the previous CR to the stream.
// CR <anything> -> CR NULL
if (writeCR == true) {
// Flush the previous CR to the stream.
// CR <anything> -> CR NULL
- writeBuffer[writeBufferI++] = (byte)C_CR;
- writeBuffer[writeBufferI++] = (byte)C_NUL;
+ writeBuffer[writeBufferI++] = (byte)
C_CR;
+ writeBuffer[writeBufferI++] = (byte)
C_NUL;
}
writeCR = true;
} else if (ch == C_LF) {
if (writeCR == true) {
// CR LF -> CR LF
}
writeCR = true;
} else if (ch == C_LF) {
if (writeCR == true) {
// CR LF -> CR LF
- writeBuffer[writeBufferI++] = (byte)C_CR;
- writeBuffer[writeBufferI++] = (byte)C_LF;
+ writeBuffer[writeBufferI++] = (byte)
C_CR;
+ writeBuffer[writeBufferI++] = (byte)
C_LF;
writeCR = false;
} else {
// Bare LF -> LF
writeCR = false;
} else {
// Bare LF -> LF
@@
-230,18
+230,18
@@
public class TelnetOutputStream extends OutputStream {
} else if (ch == TELNET_IAC) {
if (writeCR == true) {
// CR <anything> -> CR NULL
} else if (ch == TELNET_IAC) {
if (writeCR == true) {
// CR <anything> -> CR NULL
- writeBuffer[writeBufferI++] = (byte)C_CR;
- writeBuffer[writeBufferI++] = (byte)C_NUL;
+ writeBuffer[writeBufferI++] = (byte)
C_CR;
+ writeBuffer[writeBufferI++] = (byte)
C_NUL;
writeCR = false;
}
// IAC -> IAC IAC
writeCR = false;
}
// IAC -> IAC IAC
- writeBuffer[writeBufferI++] = (byte)TELNET_IAC;
- writeBuffer[writeBufferI++] = (byte)TELNET_IAC;
+ writeBuffer[writeBufferI++] = (byte)
TELNET_IAC;
+ writeBuffer[writeBufferI++] = (byte)
TELNET_IAC;
} else {
if (writeCR == true) {
// CR <anything> -> CR NULL
} else {
if (writeCR == true) {
// CR <anything> -> CR NULL
- writeBuffer[writeBufferI++] = (byte)C_CR;
- writeBuffer[writeBufferI++] = (byte)C_NUL;
+ writeBuffer[writeBufferI++] = (byte)
C_CR;
+ writeBuffer[writeBufferI++] = (byte)
C_NUL;
writeCR = false;
} else {
// Normal character */
writeCR = false;
} else {
// Normal character */