|
What this is
Other links
The source code/* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is NetBeans. The Initial Developer of the Original * Code is Sun Microsystems, Inc. Portions Copyright 1997-2001 Sun * Microsystems, Inc. All Rights Reserved. */ package org.openide.execution; import java.io.FilePermission; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.URL; import java.net.URLConnection; import java.net.UnknownServiceException; import java.security.Permission; import org.openide.filesystems.*; /** Special URL connection directly accessing an internal file object. * * @author Ales Novak, Petr Hamernik, Jan Jancura, Jaroslav Tulach * @deprecated Use {@link URLMapper} instead. */ public final class NbfsURLConnection extends URLConnection { /** Protocol name for this type of URL. */ public static final String PROTOCOL = "nbfs"; // NOI18N /** Connection created by the fileobject that we want to delegate to */ private URLConnection del; /** * Create a new connection to a {@link FileObject}. * @param u URL of the connection. Please use {@link #encodeFileObject(FileObject)} to create the URL. */ public NbfsURLConnection (URL u) { super (u); } /** Provides a URL to access a file object. * @param fo the file object * @return a URL using the correct syntax and {@link #PROTOCOL protocol} * @exception FileStateInvalidException if the file object is not valid (typically, if its filesystem is inconsistent or no longer present) */ public static URL encodeFileObject (FileObject fo) throws FileStateInvalidException { return fo.getURL (); } /** Retrieves the file object specified by an internal URL. * @param u the url to decode * @return the file object that is represented by the URL, or |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.