Interface ClassTable

  • All Known Implementing Classes:
    ChainingClassTable, ModularClassTable

    public interface ClassTable
    A lookup mechanism for predefined classes. Some marshallers can use this to avoid sending lengthy class descriptor information.
    • Method Detail

      • getClassWriter

        ClassTable.Writer getClassWriter​(java.lang.Class<?> clazz)
                                  throws java.io.IOException
        Determine whether the given class reference is a valid predefined reference.
        Parameters:
        clazz - the candidate class
        Returns:
        the class writer, or null to use the default mechanism
        Throws:
        java.io.IOException - if an I/O error occurs
      • readClass

        java.lang.Class<?> readClass​(Unmarshaller unmarshaller)
                              throws java.io.IOException,
                                     java.lang.ClassNotFoundException
        Read a class from the stream. The class will have been written by the getClassWriter(Class) method's Writer instance, as defined above.
        Parameters:
        unmarshaller - the unmarshaller to read from
        Returns:
        the class
        Throws:
        java.io.IOException - if an I/O error occurs
        java.lang.ClassNotFoundException - if a class could not be found