Package org.jboss.marshalling.util

Examples of org.jboss.marshalling.util.FlatNavigableMap


    @SuppressWarnings({ "unchecked" })
    private Object readSortedMapData(final boolean unshared, int cacheIdx, final int len, final SortedMap target) throws ClassNotFoundException, IOException {
        final ArrayList<Object> instanceCache = this.instanceCache;
        final int idx;
        final FlatNavigableMap filler = new FlatNavigableMap(target.comparator());

        if (cacheIdx == -1) {
            idx = instanceCache.size();
            instanceCache.add(target);
        } else {
            idx = cacheIdx;
            instanceCache.set(idx, target);
        }

        for (int i = 0; i < len; i ++) {
            filler.put(doReadMapObject(false, i, len, true), doReadMapObject(false, i, len, false));
        }
        // should install entries in order, bypassing any circular ref issues, unless the map is mutated during deserialize of one of its elements
        target.putAll(filler);
        final Object resolvedObject = objectResolver.readResolve(target);
        instanceCache.set(idx, unshared ? null : resolvedObject);
View Full Code Here


    @SuppressWarnings({ "unchecked" })
    private Object readSortedMapData(final boolean unshared, int cacheIdx, final int len, final SortedMap target, final boolean discardMissing) throws ClassNotFoundException, IOException {
        final ArrayList<Object> instanceCache = this.instanceCache;
        final int idx;
        final FlatNavigableMap filler = new FlatNavigableMap(target.comparator());

        if (cacheIdx == -1) {
            idx = instanceCache.size();
            instanceCache.add(target);
        } else {
            idx = cacheIdx;
            instanceCache.set(idx, target);
        }

        for (int i = 0; i < len; i ++) {
            filler.put(doReadMapObject(false, i, len, true, discardMissing), doReadMapObject(false, i, len, false, discardMissing));
        }
        // should install entries in order, bypassing any circular ref issues, unless the map is mutated during deserialize of one of its elements
        target.putAll(filler);
        final Object resolvedObject = objectResolver.readResolve(target);
        instanceCache.set(idx, unshared ? null : resolvedObject);
View Full Code Here

TOP

Related Classes of org.jboss.marshalling.util.FlatNavigableMap

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.