This is a static copy of a profile report

Home

iofun/private/urlreadwrite (4 calls, 0.000 sec)
Generated 05-Nov-2014 07:52:32 using cpu time.
function in file /usr1/opt/matlab/7.13/toolbox/matlab/iofun/private/urlreadwrite.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
urlwritefunction4
Lines where the most time was spent
No measurable time spent in this function

Line NumberCodeCallsTotal Time% TimeTime Plot
55
urlConnection = url.openConnec...
40 s0%
54
if isempty(proxy)
40 s0%
50
proxy = mwtcp.getProxy(); 
40 s0%
49
mwtcp = com.mathworks.net.tran...
40 s0%
40
end
40 s0%
All other lines  0 s0%
Totals  0 s0% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
...mathworks.net.transport.DefaultTmwTCPJava method40 s0%
java.net.URLJava method80 s0%
sun.net.www.protocol.http.HandlerJava method40 s0%
Self time (built-ins, overhead, etc.)  0 s0%
Totals  0 s0% 
Code Analyzer results
Line numberMessage
14Use FIND with the 'first' or 'last' option.
Coverage results
[ Show coverage for parent directory ]
Total lines in function58
Non-code lines (comments, blank lines)20
Code lines (lines that can run)38
Code lines that did run17
Code lines that did not run21
Coverage (did run/can run)44.74 %
Function listing
   time   calls  line
1 function [urlConnection,errorid,errormsg] = urlreadwrite(fcn,urlChar)
2 %URLREADWRITE A helper function for URLREAD and URLWRITE.
3
4 % Matthew J. Simoneau, June 2005
5 % Copyright 1984-2009 The MathWorks, Inc.
6 % $Revision: 1.1.6.5 $ $Date: 2009/09/28 20:28:02 $
7
8 % Default output arguments.
4 9 urlConnection = [];
4 10 errorid = '';
4 11 errormsg = '';
12
13 % Determine the protocol (before the ":").
4 14 protocol = urlChar(1:min(find(urlChar==':'))-1);
15
16 % Try to use the native handler, not the ice.* classes.
4 17 switch protocol
4 18 case 'http'
4 19 try
4 20 handler = sun.net.www.protocol.http.Handler;
21 catch exception %#ok
22 handler = [];
23 end
24 case 'https'
25 try
26 handler = sun.net.www.protocol.https.Handler;
27 catch exception %#ok
28 handler = [];
29 end
30 otherwise
31 handler = [];
32 end
33
34 % Create the URL object.
4 35 try
4 36 if isempty(handler)
37 url = java.net.URL(urlChar);
4 38 else
4 39 url = java.net.URL([],urlChar,handler);
4 40 end
41 catch exception %#ok
42 errorid = ['MATLAB:' fcn ':InvalidUrl'];
43 errormsg = 'Either this URL could not be parsed or the protocol is not supported.';
44 return
45 end
46
47 % Get the proxy information using MathWorks facilities for unified proxy
48 % preference settings.
4 49 mwtcp = com.mathworks.net.transport.MWTransportClientPropertiesFactory.create();
4 50 proxy = mwtcp.getProxy();
51
52
53 % Open a connection to the URL.
4 54 if isempty(proxy)
4 55 urlConnection = url.openConnection;
56 else
57 urlConnection = url.openConnection(proxy);
58 end