net.jini.security.proxytrust
Class ProxyTrustVerifier.MOStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.ObjectOutputStream
          extended by net.jini.security.proxytrust.ProxyTrustVerifier.MOStream
All Implemented Interfaces:
Closeable, DataOutput, Flushable, ObjectOutput, ObjectStreamConstants, ObjectStreamContext
Enclosing class:
ProxyTrustVerifier

private static class ProxyTrustVerifier.MOStream
extends ObjectOutputStream
implements ObjectStreamContext

Marshal output stream that looks for a class with a given codebase but in a different class loader than the one we have.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.io.ObjectOutputStream
ObjectOutputStream.PutField
 
Field Summary
private  String bcb
          bootstrap proxy codebase
private  ClassLoader bcl
          bootstrap proxy class loader
(package private)  boolean replace
          true if we see a class with same codebase in different loader
 
Fields inherited from interface java.io.ObjectStreamConstants
baseWireHandle, PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, SC_BLOCK_DATA, SC_ENUM, SC_EXTERNALIZABLE, SC_SERIALIZABLE, SC_WRITE_METHOD, STREAM_MAGIC, STREAM_VERSION, SUBCLASS_IMPLEMENTATION_PERMISSION, SUBSTITUTION_PERMISSION, TC_ARRAY, TC_BASE, TC_BLOCKDATA, TC_BLOCKDATALONG, TC_CLASS, TC_CLASSDESC, TC_ENDBLOCKDATA, TC_ENUM, TC_EXCEPTION, TC_LONGSTRING, TC_MAX, TC_NULL, TC_OBJECT, TC_PROXYCLASSDESC, TC_REFERENCE, TC_RESET, TC_STRING
 
Constructor Summary
ProxyTrustVerifier.MOStream(ByteArrayOutputStream out, String bcb, ClassLoader bcl)
           
 
Method Summary
protected  void annotateClass(Class c)
           
protected  void annotateProxyClass(Class c)
           
 Collection getObjectStreamContext()
          Returns this object stream's collection of context information objects.
private  void writeAnnotation(Class c)
           
 
Methods inherited from class java.io.ObjectOutputStream
close, defaultWriteObject, drain, enableReplaceObject, flush, putFields, replaceObject, reset, useProtocolVersion, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeClassDescriptor, writeDouble, writeFields, writeFloat, writeInt, writeLong, writeObject, writeObjectOverride, writeShort, writeStreamHeader, writeUnshared, writeUTF
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bcb

private final String bcb
bootstrap proxy codebase


bcl

private final ClassLoader bcl
bootstrap proxy class loader


replace

boolean replace
true if we see a class with same codebase in different loader

Constructor Detail

ProxyTrustVerifier.MOStream

ProxyTrustVerifier.MOStream(ByteArrayOutputStream out,
                            String bcb,
                            ClassLoader bcl)
                      throws IOException
Throws:
IOException
Method Detail

getObjectStreamContext

public Collection getObjectStreamContext()
Description copied from interface: ObjectStreamContext
Returns this object stream's collection of context information objects.

The context information available from a given element of the collection is determined by that element's type. The order of the elements is insignificant. The collection may be empty.

The caller of this method cannot assume that the returned collection is modifiable.

Specified by:
getObjectStreamContext in interface ObjectStreamContext
Returns:
a collection of this stream's context objects

annotateClass

protected void annotateClass(Class c)
                      throws IOException
Overrides:
annotateClass in class ObjectOutputStream
Throws:
IOException

annotateProxyClass

protected void annotateProxyClass(Class c)
                           throws IOException
Overrides:
annotateProxyClass in class ObjectOutputStream
Throws:
IOException

writeAnnotation

private void writeAnnotation(Class c)
                      throws IOException
Throws:
IOException


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.