Exemple #1
0
 public FressianReader(Stream stream, org.fressian.handlers.ILookup <Object, ReadHandler> handlerLookup, bool validateAdler)
 {
     standardExtensionHandlers = Handlers.extendedReadHandlers;
     this.rawInput             = new RawInput(stream, validateAdler);
     this.handlerLookup        = handlerLookup;
     resetCaches();
 }
Exemple #2
0
 static Handlers()
 {
     tagToCode             = initTagToCode();
     extendedReadHandlers  = initExtendedReadHandlers();
     coreWriteHandlers     = initCoreWriteHandlers();
     extendedWriteHandlers = initExtendedWriteHandlers();
 }
        /**
         *  Create a writer that combines userHandlers with the normal type handlers
         *  built into Fressian.
         */
        public FressianWriter(Stream stream, org.fressian.handlers.ILookup <Type, IDictionary <String, WriteHandler> > userHandlers)
        {
            this.writeHandlerLookup = new WriteHandlerLookup(userHandlers);

            clearCaches();
            this.stream = stream;
            this.rawOut = new RawOutput(this.stream);
        }
Exemple #4
0
 public InheritanceLookup(org.fressian.handlers.ILookup <Type, V> lookup)
 {
     this.lookup = lookup;
 }
Exemple #5
0
 public FressianReader(Stream stream, org.fressian.handlers.ILookup <Object, ReadHandler> handlerLookup)
     : this(stream, handlerLookup, true)
 {
 }
 public FressianReader(Stream stream, org.fressian.handlers.ILookup<Object, ReadHandler> handlerLookup, bool validateAdler)
 {
     standardExtensionHandlers = Handlers.extendedReadHandlers;
     this.rawInput = new RawInput(stream, validateAdler);
     this.handlerLookup = handlerLookup;
     resetCaches();
 }
Exemple #7
0
 public static org.fressian.handlers.ILookup <Type, IDictionary <String, WriteHandler> > customWriteHandlers(org.fressian.handlers.ILookup <Type, IDictionary <String, WriteHandler> > userHandlers)
 {
     if (userHandlers != null)
     {
         return(new CachingLookup <Type, IDictionary <String, WriteHandler> >
                    (new ChainedLookup <Type, IDictionary <String, WriteHandler> >(coreWriteHandlers, userHandlers, extendedWriteHandlers)));
     }
     else
     {
         return(defaultWriteHandlers());
     }
 }