com.mucommander.file
Interface SchemeParser

All Known Implementing Classes:
DefaultSchemeParser

public interface SchemeParser

SchemeParser is an interface that provides a single parse(String, FileURL) method used by FileURL.getFileURL(String) to turn a URL string into a corresponding FileURL instance.

Author:
Maxence Bernard
See Also:
FileURL.getFileURL(String), SchemeHandler

Method Summary
 void parse(java.lang.String url, FileURL fileURL)
          Extracts the different parts from the given URL string and sets them in the specified FileURL instance.
 

Method Detail

parse

void parse(java.lang.String url,
           FileURL fileURL)
           throws java.net.MalformedURLException
Extracts the different parts from the given URL string and sets them in the specified FileURL instance. The FileURL is empty when it is passed, with just the handler set. The scheme, host, port, login, password, path, ... parts must all be set, using the corresponding setter methods.

Some parts such as the query and fragment have a meaning only for certain schemes such as HTTP, other schemes may simply ignore the corresponding query/fragment delimiters ('?' and '#' resp.) and include them in the path part.

Parameters:
url - the URL to parse
fileURL - the FileURL instance to
Throws:
java.net.MalformedURLException - if the specified string is not a valid URL and cannot be parsed


This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard