Copied from {@link ResourceImpl#doUnload()} but doesn't call {@link #getContents()} to avoid derived state
computation.

@since 2.8
9319
@Override
	protected void doUnload() {
		Iterator<EObject> allContents = getAllProperContents(unloadingContents);
		// This guard is needed to ensure that clear doesn't make the resource become loaded.
		//
		if (!doGetContents().isEmpty()) {
			doGetContents().clear();
		}
		getErrors().clear();
		getWarnings().clear();
		while (allContents.hasNext()) {
			unloaded((InternalEObject) allContents.next());
		}
		setParseResult(null);
		setIsLoadedFromStorage(false);
	}
1055974
@Override
	public List<String> getPreloads() {
		final String sourceMethod = "getPreloads"; //$NON-NLS-1$
		if (isTraceLogging) {
			log.entering(RequestedModuleNames.class.getName(), sourceMethod);
			log.exiting(RequestedModuleNames.class.getName(), sourceMethod, preloads);
		}
		return preloads;
	}
457011
public synchronized void incrementLoad(ResourceType type) {
    Integer load = typeToTotalLoad.get(type);
    assert(load != null);
    typeToTotalLoad.put(type, load + 1);
  }
1001521
private void ensureContent() {
        if (mContentContainer != null && mProgressContainer != null) {
            return;
        }
        View root = getView();
        if (root == null) {
            throw new IllegalStateException("Content view not yet created");
        }
        mProgressContainer = root.findViewById(R.id.progress_container);
        if (mProgressContainer == null) {
            throw new RuntimeException("Your content must have a ViewGroup whose id attribute is 'R.id.progress_container'");
        }
        mContentContainer = root.findViewById(R.id.content_container);
        if (mContentContainer == null) {
            throw new RuntimeException("Your content must have a ViewGroup whose id attribute is 'R.id.content_container'");
        }
        mEmptyView = root.findViewById(android.R.id.empty);
        if (mEmptyView != null) {
            mEmptyView.setVisibility(View.GONE);
        }
        mContentShown = true;
        // We are starting without a content, so assume we won't
        // have our data right away and start with the progress indicator.
        if (mContentView == null) {
            setContentShown(false, false);
        }
    }
213383
@Override
    public boolean shouldRequestContents(ReadResultEntryType entryType, long streamSegmentOffset) {
        // We only care about data that has already been written, so this implies Cache and Storage.
        // Additionally, given that the Store acks an append prior to inserting it into the cache (but after the metadata
        // update), we may occasionally get Future reads. We should accept those too, as they should be completed shortly.
        return entryType == ReadResultEntryType.Cache || entryType == ReadResultEntryType.Storage || entryType == ReadResultEntryType.Future;
    }
346706
public java.lang.String getOnunload() {
        return (java.lang.String) getStateHelper().eval(PropertyKeys.onunload);

    }
669442
public MethodState loadNextMethodState() {
        MethodState ret = nextLoadPointer;
        nextLoadPointer = nextLoadPointer.getNext();
        
        // We've reached the end of load list, so set up the 'unload' list that gets called when a method continues execution from the point
        // where it's paused it.
        if (nextLoadPointer == null) {
            nextUnloadPointer = ret;
        }
        
        return ret;
    }
641790
@Override
	public Reader getResource(JoinableResourceBundle bundle, String resourceName, boolean processingBundle,
			List<Class<?>> excludedReader) throws ResourceNotFoundException {

		if (ThreadLocalJawrContext.isInterruptingProcessingBundle()) {
			throw new InterruptBundlingProcessException();
		}
		Reader rd = null;

		String resourceExtension = FileNameUtils.getExtension(resourceName);
		boolean generatedPath = generatorRegistry.isPathGenerated(resourceName);
		if (generatedPath || allowedExtensions.contains(resourceExtension.toLowerCase())) {
			List<TextResourceReader> list = new ArrayList<>();
			list.addAll(resourceReaders);
			for (TextResourceReader rsReader : list) {
				if (!isInstanceOf(rsReader, excludedReader)) {
					if (!(rsReader instanceof ResourceGenerator)
							|| ((ResourceGenerator) rsReader).getResolver().matchPath(resourceName)) {
						try {
							rd = rsReader.getResource(bundle, resourceName, processingBundle);
						} catch (Exception e) {
							if (LOGGER.isDebugEnabled()) {
								LOGGER.debug("An exception occured while trying to read resource '" + resourceName
										+ "'. Continuing with other readers. Error : ", e);
							} else if (LOGGER.isInfoEnabled()) {
								LOGGER.info("An exception occured while trying to read resource '" + resourceName
										+ "'. Continuing with other readers. Error : " + e.getMessage());
							}
						}
						if (rd != null) {
							break;
						}
					}
				}
			}
		} else {
			LOGGER.warn("The resource '" + resourceName + "' will not be read as its extension is not an allowed one.");
		}

		if (rd == null) {
			throw new ResourceNotFoundException(resourceName);
		}

		return rd;
	}
712947
static Properties loadClose(final InputStream in, final Object source) {
        final Properties props = new Properties();
        if (null != in) {
            try {
                props.load(in);
            } catch (final IOException e) {
                LowLevelLogUtil.logException("Unable to read " + source, e);
            } finally {
                try {
                    in.close();
                } catch (final IOException e) {
                    LowLevelLogUtil.logException("Unable to close " + source, e);
                }
            }
        }
        return props;
    }
229607
protected boolean loadMore()
        throws XMLStreamException
    {
        WstxInputSource input = mInput;
        do {
            /* Need to make sure offsets are properly updated for error
             * reporting purposes, and do this now while previous amounts
             * are still known.
             */
            mCurrInputProcessed += mInputEnd;
            verifyLimit("Maximum document characters", mConfig.getMaxCharacters(), mCurrInputProcessed);
            mCurrInputRowStart -= mInputEnd;
            int count;
            try {
                count = input.readInto(this);
                if (count > 0) {
                    return true;
                }
                input.close();
            } catch (IOException ioe) {
                throw constructFromIOE(ioe);
            }
            if (input == mRootInput) {
                /* Note: no need to check entity/input nesting in this
                 * particular case, since it will be handled by higher level
                 * parsing code (results in an unexpected EOF)
                 */
                return false;
            }
            WstxInputSource parent = input.getParent();
            if (parent == null) { // sanity check!
                throwNullParent(input);
            }
            /* 13-Feb-2006, TSa: Ok, do we violate a proper nesting constraints
             *   with this input block closure?
             */
            if (mCurrDepth != input.getScopeId()) {
                handleIncompleteEntityProblem(input);
            }

            mInput = input = parent;
            input.restoreContext(this);
            mInputTopDepth = input.getScopeId();
            /* 21-Feb-2006, TSa: Since linefeed normalization needs to be
             *   suppressed for internal entity expansion, we may need to
             *   change the state...
             */
            if (!mNormalizeLFs) {
                mNormalizeLFs = !input.fromInternalEntity();
            }
            // Maybe there are leftovers from that input in buffer now?
        } while (mInputPtr >= mInputEnd);

        return true;
    }
526217
Source getSourceFromBodyContent() throws JspTagException, SAXException, ParserConfigurationException {
        if (bodyContent == null) {
            throw new JspTagException(Resources.getMessage("TRANSFORM_BODY_IS_NULL"));
        }
        String s = bodyContent.getString();
        if (s == null) {
            throw new JspTagException(Resources.getMessage("TRANSFORM_BODY_CONTENT_IS_NULL"));
        }
        s = s.trim();
        if (s.length() == 0) {
            throw new JspTagException(Resources.getMessage("TRANSFORM_BODY_IS_EMPTY"));
        }
        return XmlUtil.newSAXSource(new StringReader(s), xmlSystemId, entityResolver);
    }
188121
@Override
    public String getContent() {
        FileReader reader = null;
        try {
            reader = new FileReader(this.contentFile);
            return IOUtils.toString(reader);
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            IOUtils.closeQuietly(reader);
        }
    }
25567
public final boolean loadOwnedLinks() throws SevereMessageStoreException
    {
        boolean loaded = false;
        if (null == _items)
        {
            _items();
            loaded = true;
        }
        return loaded;
    }
117301
public <T> T loadResources(Class<T> type, List<String> resources) {
    if (resources == null || resources.isEmpty()) {
      throw new IllegalArgumentException("resources must be defined");
    }
    Config config = null;
    for (String resource : resources) {
      if (config == null) {
        config = ConfigFactory.load(classLoader, resource);
      } else {
        config = config.withFallback(ConfigFactory.load(classLoader, resource));
      }
    }
    return map(checkNotNull(config, "config cannot be null").resolve(), type);
  }
788665
public final boolean loadOwnedLinks() throws SevereMessageStoreException
    {
        boolean loaded = false;
        if (null == _references)
        {
            _references();
            loaded = true;
        }
        return loaded;
    }
679447
protected void load(boolean needContent) throws IOException, CmsException {

        try {
            if (m_resource.isFolder() && needContent) {
                throw new AccessDeniedException("Operation not supported for directories!");
            }
            if (m_resource.isFile() && needContent && (!(m_resource instanceof CmsFile))) {
                m_resource = m_cms.readFile(m_cms.getSitePath(m_resource), CmsJlanDiskInterface.STANDARD_FILTER);
            }
            if (!m_bufferInitialized && (getFile() != null)) {
                // readResource may already have returned a CmsFile, this is why we need to initialize the buffer
                // here and not in the if-block above
                m_buffer.init(getFile().getContents());
                m_bufferInitialized = true;
            }
        } catch (CmsException e) {
            throw e;
        }
    }
275916
protected boolean _load ()
    {
        java.util.Iterator it =
            this.getOjbMetaTreeModel ().getRepository().iterator();
        java.util.ArrayList newChildren = new java.util.ArrayList();

        /* @todo make this work */

//        newChildren.add(new OjbMetaJdbcConnectionDescriptorNode(
//            this.getOjbMetaTreeModel ().getRepository(),
//            this.getOjbMetaTreeModel (),
//            this,
//            this.getOjbMetaTreeModel ().getRepository().getDefaultJdbcConnection()));

        while (it.hasNext())
        {
            org.apache.ojb.broker.metadata.ClassDescriptor cld = (org.apache.ojb.broker.metadata.ClassDescriptor)it.next();
            OjbMetaClassDescriptorNode cldNode =
            	new OjbMetaClassDescriptorNode(this.getOjbMetaTreeModel ().getRepository(),
					                           this.getOjbMetaTreeModel (),
     						                   this, cld);
            cldToNodes.put(cld, cldNode);
            newChildren.add(cldNode);
        }
        java.util.Collections.sort(newChildren);
        this.alChildren = newChildren;
        this.getOjbMetaTreeModel ().nodeStructureChanged(this);
        return true;
    }