473,395 Members | 1,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

how to change the url string of URL object

Hi:

Do you know how to change the url string of URL object? For example, I
have an URL object declared as:

URL myurl = new URL("http://www.cnn.com");

How to change the url string of myurl to be "http://www.yahoo.com"?
Thanks.
Jul 17 '05 #1
1 8656
"Cyper Hunter" <cy*******@gmail.com> wrote in message
news:5T**********************@news4.srv.hcvlny.cv. net...
Hi:

Do you know how to change the url string of URL object? For example, I have an URL object declared as:

URL myurl = new URL("http://www.cnn.com");

How to change the url string of myurl to be "http://www.yahoo.com"?
Thanks.

From the docs:

set
protected void set(String protocol,
String host,
int port,
String file,
String ref)
Sets the fields of the URL. This is not a public method so that only
URLStreamHandlers can modify URL fields. URLs are otherwise constant.

In other words, you can't.

In the future, please direct your posts to comp.lang.java.help. This group
is deprecated.
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Fabrizio | last post by:
(Sorry for the crosspost, but I really don't know which is the right newsgroup!) Hi all, I try to change the password to a user that as to change the password at first logon: try {
0
by: Yannick Béot | last post by:
Hi, I'm trying to make an application that allow a user, through a web form to change its password On a click event, here is the code DirectoryEntry usr = new DirectoryEntry( theUserDN,...
3
by: spielmann | last post by:
Hello I want to change the scrollbar size of windows, How can I do that with vb.net I have find this in VB6 but how can we convert simply this code. thx
2
by: Greg Strong | last post by:
Hello All, Is it possible to change table field lookup properties in code? I've been able to change other field properties in code, however so far no luck with field lookup properties. What...
0
by: hfleong | last post by:
I am trying to change the Active Directory password using C#. However, it seems to me it does not really works. I wonder what is wrong with my code. Hope somene can help me with this and thanks in...
0
by: zeng.hui.stephen | last post by:
I download the demo http://msdn.microsoft.com/msdnmag/issues/02/10/cuttingedge/. I inherite the demo, and write my code. I want to use Hook to monitor C++ Edit change. I use a C# form...
13
by: sonald | last post by:
Hi, Can anybody tell me how to change the text delimiter in FastCSV Parser ? By default the text delimiter is double quotes(") I want to change it to anything else... say a pipe (|).. can anyone...
1
by: Sankalp | last post by:
Hi, I am using VB 2005. My application has many data bound controls. The connection is stored in the app.config file. I want the application to start with a default connection string and while...
1
by: Simon | last post by:
Dear reader, I am familiar with the possibility to change the Caption of a field in a form. But is there also a possibility to change the Caption of a field in the table structure it self.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.