mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
Fix for read() vs. readInstruction() issue. Consistency with placement of import vs. license
This commit is contained in:
@@ -1,9 +1,6 @@
|
|||||||
|
|
||||||
package net.sourceforge.guacamole.io;
|
package net.sourceforge.guacamole.io;
|
||||||
|
|
||||||
import net.sourceforge.guacamole.GuacamoleException;
|
|
||||||
import net.sourceforge.guacamole.protocol.GuacamoleInstruction;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Guacamole - Clientless Remote Desktop
|
* Guacamole - Clientless Remote Desktop
|
||||||
* Copyright (C) 2010 Michael Jumper
|
* Copyright (C) 2010 Michael Jumper
|
||||||
@@ -22,6 +19,9 @@ import net.sourceforge.guacamole.protocol.GuacamoleInstruction;
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import net.sourceforge.guacamole.GuacamoleException;
|
||||||
|
import net.sourceforge.guacamole.protocol.GuacamoleInstruction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides abstract and raw character read access to a stream of Guacamole
|
* Provides abstract and raw character read access to a stream of Guacamole
|
||||||
* instructions.
|
* instructions.
|
||||||
|
@@ -1,9 +1,6 @@
|
|||||||
|
|
||||||
package net.sourceforge.guacamole.io;
|
package net.sourceforge.guacamole.io;
|
||||||
|
|
||||||
import net.sourceforge.guacamole.GuacamoleException;
|
|
||||||
import net.sourceforge.guacamole.protocol.GuacamoleInstruction;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Guacamole - Clientless Remote Desktop
|
* Guacamole - Clientless Remote Desktop
|
||||||
* Copyright (C) 2010 Michael Jumper
|
* Copyright (C) 2010 Michael Jumper
|
||||||
@@ -22,6 +19,9 @@ import net.sourceforge.guacamole.protocol.GuacamoleInstruction;
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import net.sourceforge.guacamole.GuacamoleException;
|
||||||
|
import net.sourceforge.guacamole.protocol.GuacamoleInstruction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides abstract and raw character write access to a stream of Guacamole
|
* Provides abstract and raw character write access to a stream of Guacamole
|
||||||
* instructions.
|
* instructions.
|
||||||
|
@@ -1,12 +1,6 @@
|
|||||||
|
|
||||||
package net.sourceforge.guacamole.io;
|
package net.sourceforge.guacamole.io;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.Reader;
|
|
||||||
import net.sourceforge.guacamole.GuacamoleException;
|
|
||||||
import net.sourceforge.guacamole.protocol.GuacamoleInstruction;
|
|
||||||
import net.sourceforge.guacamole.protocol.GuacamoleInstruction.Operation;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Guacamole - Clientless Remote Desktop
|
* Guacamole - Clientless Remote Desktop
|
||||||
* Copyright (C) 2010 Michael Jumper
|
* Copyright (C) 2010 Michael Jumper
|
||||||
@@ -25,6 +19,12 @@ import net.sourceforge.guacamole.protocol.GuacamoleInstruction.Operation;
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.Reader;
|
||||||
|
import net.sourceforge.guacamole.GuacamoleException;
|
||||||
|
import net.sourceforge.guacamole.protocol.GuacamoleInstruction;
|
||||||
|
import net.sourceforge.guacamole.protocol.GuacamoleInstruction.Operation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A GuacamoleReader which wraps a standard Java Reader, using that Reader as
|
* A GuacamoleReader which wraps a standard Java Reader, using that Reader as
|
||||||
* the Guacamole instruction stream.
|
* the Guacamole instruction stream.
|
||||||
@@ -54,6 +54,17 @@ public class ReaderGuacamoleReader implements GuacamoleReader {
|
|||||||
@Override
|
@Override
|
||||||
public char[] read() throws GuacamoleException {
|
public char[] read() throws GuacamoleException {
|
||||||
|
|
||||||
|
// If data was previously read via readInstruction(), return remaining
|
||||||
|
// data instead of reading more.
|
||||||
|
if (instructionBuffer != null) {
|
||||||
|
|
||||||
|
char[] chunk = new char[instructionBuffer.length - instructionStart];
|
||||||
|
System.arraycopy(instructionBuffer, instructionStart, chunk, 0, chunk.length);
|
||||||
|
instructionBuffer = null;
|
||||||
|
|
||||||
|
return chunk;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
// While we're blocking, or input is available
|
// While we're blocking, or input is available
|
||||||
|
@@ -1,11 +1,6 @@
|
|||||||
|
|
||||||
package net.sourceforge.guacamole.io;
|
package net.sourceforge.guacamole.io;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.Writer;
|
|
||||||
import net.sourceforge.guacamole.GuacamoleException;
|
|
||||||
import net.sourceforge.guacamole.protocol.GuacamoleInstruction;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Guacamole - Clientless Remote Desktop
|
* Guacamole - Clientless Remote Desktop
|
||||||
* Copyright (C) 2010 Michael Jumper
|
* Copyright (C) 2010 Michael Jumper
|
||||||
@@ -24,6 +19,11 @@ import net.sourceforge.guacamole.protocol.GuacamoleInstruction;
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.Writer;
|
||||||
|
import net.sourceforge.guacamole.GuacamoleException;
|
||||||
|
import net.sourceforge.guacamole.protocol.GuacamoleInstruction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A GuacamoleWriter which wraps a standard Java Writer, using that Writer as
|
* A GuacamoleWriter which wraps a standard Java Writer, using that Writer as
|
||||||
* the Guacamole instruction stream.
|
* the Guacamole instruction stream.
|
||||||
|
@@ -1,10 +1,6 @@
|
|||||||
|
|
||||||
package net.sourceforge.guacamole.net;
|
package net.sourceforge.guacamole.net;
|
||||||
|
|
||||||
import net.sourceforge.guacamole.GuacamoleException;
|
|
||||||
import net.sourceforge.guacamole.io.GuacamoleReader;
|
|
||||||
import net.sourceforge.guacamole.io.GuacamoleWriter;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Guacamole - Clientless Remote Desktop
|
* Guacamole - Clientless Remote Desktop
|
||||||
* Copyright (C) 2010 Michael Jumper
|
* Copyright (C) 2010 Michael Jumper
|
||||||
@@ -23,6 +19,10 @@ import net.sourceforge.guacamole.io.GuacamoleWriter;
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import net.sourceforge.guacamole.GuacamoleException;
|
||||||
|
import net.sourceforge.guacamole.io.GuacamoleReader;
|
||||||
|
import net.sourceforge.guacamole.io.GuacamoleWriter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides abstract socket-like access to a Guacamole connection.
|
* Provides abstract socket-like access to a Guacamole connection.
|
||||||
*
|
*
|
||||||
|
@@ -1,8 +1,6 @@
|
|||||||
|
|
||||||
package net.sourceforge.guacamole.properties;
|
package net.sourceforge.guacamole.properties;
|
||||||
|
|
||||||
import net.sourceforge.guacamole.GuacamoleException;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Guacamole - Clientless Remote Desktop
|
* Guacamole - Clientless Remote Desktop
|
||||||
* Copyright (C) 2010 Michael Jumper
|
* Copyright (C) 2010 Michael Jumper
|
||||||
@@ -21,6 +19,8 @@ import net.sourceforge.guacamole.GuacamoleException;
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import net.sourceforge.guacamole.GuacamoleException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An abstract representation of a property in the guacamole.properties file,
|
* An abstract representation of a property in the guacamole.properties file,
|
||||||
* which parses into a specific type.
|
* which parses into a specific type.
|
||||||
|
@@ -1,12 +1,6 @@
|
|||||||
|
|
||||||
package net.sourceforge.guacamole.protocol;
|
package net.sourceforge.guacamole.protocol;
|
||||||
|
|
||||||
import net.sourceforge.guacamole.io.GuacamoleReader;
|
|
||||||
import net.sourceforge.guacamole.io.GuacamoleWriter;
|
|
||||||
import net.sourceforge.guacamole.GuacamoleException;
|
|
||||||
import net.sourceforge.guacamole.net.GuacamoleSocket;
|
|
||||||
import net.sourceforge.guacamole.protocol.GuacamoleInstruction.Operation;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Guacamole - Clientless Remote Desktop
|
* Guacamole - Clientless Remote Desktop
|
||||||
* Copyright (C) 2010 Michael Jumper
|
* Copyright (C) 2010 Michael Jumper
|
||||||
@@ -25,6 +19,12 @@ import net.sourceforge.guacamole.protocol.GuacamoleInstruction.Operation;
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import net.sourceforge.guacamole.io.GuacamoleReader;
|
||||||
|
import net.sourceforge.guacamole.io.GuacamoleWriter;
|
||||||
|
import net.sourceforge.guacamole.GuacamoleException;
|
||||||
|
import net.sourceforge.guacamole.net.GuacamoleSocket;
|
||||||
|
import net.sourceforge.guacamole.protocol.GuacamoleInstruction.Operation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A GuacamoleSocket which pre-configures the connection based on a given
|
* A GuacamoleSocket which pre-configures the connection based on a given
|
||||||
* GuacamoleConfiguration, completing the initial protocol handshake before
|
* GuacamoleConfiguration, completing the initial protocol handshake before
|
||||||
|
@@ -1,8 +1,6 @@
|
|||||||
|
|
||||||
package net.sourceforge.guacamole.protocol;
|
package net.sourceforge.guacamole.protocol;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Guacamole - Clientless Remote Desktop
|
* Guacamole - Clientless Remote Desktop
|
||||||
* Copyright (C) 2010 Michael Jumper
|
* Copyright (C) 2010 Michael Jumper
|
||||||
@@ -21,6 +19,8 @@ import java.util.HashMap;
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* All information necessary to complete the initial protocol handshake of a
|
* All information necessary to complete the initial protocol handshake of a
|
||||||
* Guacamole session.
|
* Guacamole session.
|
||||||
|
@@ -1,8 +1,6 @@
|
|||||||
|
|
||||||
package net.sourceforge.guacamole.protocol;
|
package net.sourceforge.guacamole.protocol;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Guacamole - Clientless Remote Desktop
|
* Guacamole - Clientless Remote Desktop
|
||||||
* Copyright (C) 2010 Michael Jumper
|
* Copyright (C) 2010 Michael Jumper
|
||||||
@@ -21,6 +19,8 @@ import java.util.HashMap;
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An abstract representation of a Guacamole instruction, as defined by the
|
* An abstract representation of a Guacamole instruction, as defined by the
|
||||||
* Guacamole protocol.
|
* Guacamole protocol.
|
||||||
|
Reference in New Issue
Block a user