Package java.io

Examples of java.io.StreamCorruptedException


                        String className = readUTF();
                        Class<?> clazz =
                            Class.forName(className, true, classLoader);
                        return ObjectStreamClass.lookup(clazz);
                    default:
                        throw new StreamCorruptedException(
                                "Unexpected class descriptor type: " + type);
                    }
                }

                @Override
View Full Code Here


    }
    else if ( name.equals( PARTIAL.name ) ) {
      return PARTIAL;
    }
    else {
      throw new StreamCorruptedException( "unrecognized value inclusion [" + name + "]" );
    }
  }
View Full Code Here

    }
    else if ( name.equals( PARTIAL.name ) ) {
      return PARTIAL;
    }
    else {
      throw new StreamCorruptedException( "unrecognized value inclusion [" + name + "]" );
    }
  }
View Full Code Here

            }
            this.className = (String) in.readObject();
            break;
         }
         default:
            throw new StreamCorruptedException("Unknown version seen: " + version);
      }
   }
View Full Code Here

            }

            break;
         }
         default:
            throw new StreamCorruptedException("Unkown version seen: " + version);
      }
   }
View Full Code Here

            return null;
        }

        int dataLen = buffer.getInt(buffer.readerIndex());
        if (dataLen <= 0) {
            throw new StreamCorruptedException("invalid data length: " + dataLen);
        }
        if (dataLen > maxObjectSize) {
            throw new StreamCorruptedException(
                    "data length too big: " + dataLen + " (max: " + maxObjectSize + ')');
        }

        if (buffer.readableBytes() < dataLen + 4) {
            return null;
View Full Code Here

            }

            break;
         }
         default:
            throw new StreamCorruptedException("Unkown version seen: " + version);
      }
   }
View Full Code Here

    }

    public Object readObject() throws ClassNotFoundException, IOException {
        int objectSize = in.readInt();
        if (objectSize <= 0) {
            throw new StreamCorruptedException("Invalid objectSize: "
                    + objectSize);
        }
        if (objectSize > maxObjectSize) {
            throw new StreamCorruptedException("ObjectSize too big: "
                    + objectSize + " (expected: <= " + maxObjectSize + ')');
        }

        IoBuffer buf = IoBuffer.allocate(objectSize + 4, false);
        buf.putInt(objectSize);
View Full Code Here

            return null;
        }

        int dataLen = buffer.getInt(buffer.readerIndex());
        if (dataLen <= 0) {
            throw new StreamCorruptedException("invalid data length: " + dataLen);
        }
        if (dataLen > maxObjectSize) {
            throw new StreamCorruptedException(
                    "data length too big: " + dataLen + " (max: " + maxObjectSize + ')');
        }

        if (buffer.readableBytes() < dataLen + 4) {
            return null;
View Full Code Here

                        String className = readUTF();
                        Class<?> clazz = Class.forName(className, true,
                                classLoader);
                        return ObjectStreamClass.lookup(clazz);
                    default:
                        throw new StreamCorruptedException(
                                "Unexpected class descriptor type: " + type);
                    }
                }

                @Override
View Full Code Here

TOP

Related Classes of java.io.StreamCorruptedException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.