/*
* 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* 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.
*/
class PacketStream {
private boolean isCommitted = false;
}
this.isCommitted = true; /* read only stream */
}
int id() {
}
void send() {
if (!isCommitted) {
isCommitted = true;
}
}
if (!isCommitted) {
throw new InternalException("waitForReply without send");
}
}
}
if(data) {
} else {
}
}
}
}
}
}
}
}
}
switch (size) {
case 8:
break;
case 4:
break;
case 2:
writeShort((short)data);
break;
default:
}
}
void writeNullObjectRef() {
writeObjectRef(0);
}
}
}
}
}
}
}
try {
throw new InternalException("Cannot convert string to UTF8 bytes");
}
}
byte tag;
} else if (refType instanceof InterfaceType) {
// It's possible to have executable code in an interface
} else {
throw new InternalException("Invalid Location");
}
}
try {
throw new RuntimeException(
}
}
}
try {
throw new RuntimeException(
}
}
if (isObjectTag(tag)) {
writeObjectRef(0);
} else {
if (!(val instanceof ObjectReference)) {
throw new InvalidTypeException();
}
}
} else {
switch (tag) {
throw new InvalidTypeException();
break;
throw new InvalidTypeException();
break;
if(!(val instanceof FloatValue))
throw new InvalidTypeException();
break;
if(!(val instanceof DoubleValue))
throw new InvalidTypeException();
break;
if(!(val instanceof IntegerValue))
throw new InvalidTypeException();
break;
throw new InvalidTypeException();
break;
if(!(val instanceof ShortValue))
throw new InvalidTypeException();
break;
if(!(val instanceof BooleanValue))
throw new InvalidTypeException();
break;
}
}
}
/**
* Read byte represented as one bytes.
*/
byte readByte() {
inCursor += 1;
return ret;
}
/**
* Read boolean represented as one byte.
*/
boolean readBoolean() {
return (ret != 0);
}
/**
* Read char represented as two bytes.
*/
char readChar() {
}
/**
* Read short represented as two bytes.
*/
short readShort() {
}
/**
* Read int represented as four bytes.
*/
int readInt() {
}
/**
* Read long represented as eight bytes.
*/
long readLong() {
}
/**
* Read float represented as four bytes.
*/
float readFloat() {
}
/**
* Read double represented as eight bytes.
*/
double readDouble() {
}
/**
* Read string represented as four byte length followed by
* characters of the string.
*/
try {
ret = "Conversion error!";
}
return ret;
}
switch (size) {
case 8:
return readLong();
case 4:
return (long)readInt();
case 2:
return (long)readShort();
default:
}
}
/**
* Read object represented as vm specific byte sequence.
*/
long readObjectRef() {
}
long readClassRef() {
}
}
}
long ref = readObjectRef();
}
long ref = readObjectRef();
}
long ref = readObjectRef();
}
long ref = readObjectRef();
}
long ref = readObjectRef();
}
long ref = readObjectRef();
}
long ref = readObjectRef();
}
/**
* Read method reference represented as vm specific byte sequence.
*/
long readMethodRef() {
}
/**
* Read field reference represented as vm specific byte sequence.
*/
long readFieldRef() {
}
/**
* Read field represented as vm specific byte sequence.
*/
long fieldRef = readFieldRef();
}
/**
* Read frame represented as vm specific byte sequence.
*/
long readFrameRef() {
}
/**
* Read a value, first byte describes type of value to read.
*/
return readUntaggedValue(typeKey);
}
if (isObjectTag(typeKey)) {
} else {
switch(typeKey) {
break;
break;
break;
break;
break;
break;
break;
break;
break;
}
}
return val;
}
/**
* Read location represented as vm specific byte sequence.
*/
long classRef = readObjectRef();
long methodRef = readMethodRef();
if (classRef != 0) {
/* Valid location */
} else {
/* Null location (example: uncaught exception) */
return null;
}
}
return array;
}
for (int i = 0; i < length; i++) {
/*
* Each object comes back with a type key which might
* identify a more specific type than the type key we
* passed in, so we use it in the decodeValue call.
* (For primitives, we just use the original one)
*/
if (gettingObjects) {
}
}
return list;
}
}
}
int skipBytes(int n) {
inCursor += n;
return n;
}
byte command() {
}
}
}