/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
*/
public class MultiSocketFactory {
public static class ServerFactory
implements RMIServerSocketFactory, Serializable
{
private byte[] data;
}
{
return new CompressServerSocket(port);
throw new IOException("invalid argument for XOR protocol");
}
}
}
public static class ClientFactory
implements RMIClientSocketFactory, Serializable
{
private byte[] data;
}
throws IOException
{
throw new IOException("invalid argument for XOR protocol");
}
}
}
public CompressSocket() { super(); }
}
}
return in;
}
}
return out;
}
}
super(port);
}
Socket s = new CompressSocket();
implAccept(s);
return s;
}
}
private byte pattern;
throws IOException
{
}
}
return in;
}
}
return out;
}
}
private byte pattern;
super(port);
}
implAccept(s);
return s;
}
}
private byte pattern;
super(out);
}
}
for (int i = 0; i < len; i++)
}
}
private byte pattern;
super(in);
}
// System.out.print("BEFORE: " + Integer.toHexString(b));
if (b != -1)
b = (b ^ pattern) & 0xFF;
// System.out.println("\tAFTER: " + Integer.toHexString(b));
return b;
}
if (len <= 0) {
return 0;
}
int c = read();
if (c == -1) {
return -1;
}
b[off] = (byte)c;
int i = 1;
/*****
try {
for (; i < len ; i++) {
c = read();
if (c == -1) {
break;
}
if (b != null) {
b[off + i] = (byte)c;
}
}
} catch (IOException ee) {
}
*****/
return i;
}
}
}