private static Object readObjectDescriptionFromStreaming(final ObjectsCache cache,
final int reference, ObjectsCache.JBossSeralizationInputInterface input) throws IOException
{
byte defClass = input.readByte();
StreamingClass streamingClass = null;
if (defClass==DataContainerConstants.NEWDEF)
{
int referenceId = input.readObjectReference();
streamingClass = StreamingClass.readStream(input,cache.getClassResolver(),cache.getLoader());
cache.putObjectInCacheRead(referenceId,streamingClass);
}
else
{
int referenceId = input.readObjectReference();
streamingClass = (StreamingClass)cache.findObjectInCacheRead(referenceId);
if (streamingClass==null)
{
throw new IOException("Didn't find StreamingClass circular refernce id=" + referenceId);
}
}
ClassMetaData metaData = streamingClass.getMetadata();
if (isDebug)
{
log.debug("Reading object for id=" + reference + " classLoader=" + cache.getLoader() + " className = " + metaData.getClassName());
}