Need to truncate data and having some problems

Hi folks.
I'm relatively new to Java so forgive my naivety please.
I have a situation where I'm receiving XML address data in the format of 4 address lines of 35 characters each......and a postcode. Unfortunately, I have to find a way of evaluating this data and shoe horning it in to 3 address lines of 30 characters each on the system I'm maintaining.
If the combined data is still more than 3 lines of 30 characters I've just been told to send back an error response. Lovely system eh?
Does anyone have any suggestions as to how I can tackle this problem in Java? I'm still looking about and having a think about it, but being new to the language I'm struggling a little.
Any help you can offer would be much appreciated. Thanks.

Axiom: A requirement isn't a requirement without a test case.
Work with your customer to establish the acceptance tests for the requirements. That will help you with the "find a way of evaluating" part. Once you know the rules, you can start coding. We'll help you with the language translation issues (i.e., business-ese to Java), but it's up to you to make sure the requirements are firm and to write the initial failing test cases.
~

Similar Messages

  • HT4557 Hi, we have just purchased Apple TV and having some problems connecting to the iPad. It is asking us to 'connect to Home Sharing in iTunes' however I can't find the link/ button to press. iPad has been updated. Any help please

    Hi,
    We have just purchased Apple TV and can't connect to Home Sharing. We have wifi, the iPad is updated. I can't find the link on ITunes on the iPad that the tv is telling me to click. I've also tried turning it on via settings then music which seems to be connected. I can view YouTube clicks on the tv, but not an app so I can watch the footy. What am I doing wrong.
    Any help would be greatly appreciated,
    Thanks

    Make sure your Apple TV is on the same network as your iPad. The SSID and password of router must be set in your Apple TV.
    http://i1224.photobucket.com/albums/ee374/Diavonex/491f4b34c45018abef609c832b0f2 56a_zps0d1c18e7.jpg
    Message was edited by: Diavonex

  • Hello, well im having some problems with my ipod 4th gen it will not turn on and when i plug it in to itunes it will not come up saying i need to restore. when i try that it will not compleet. the ipod will not do anything at all... please help me

    Hello, well im having some problems with my ipod 4th gen it will not turn on and when i plug it in to itunes it will not come up saying i need to restore. when i try that it will not complet. the ipod will not do anything at all... please help me i havent got  extra money to spend..

    Just what happens when the restore does not complete?
    Error message?
    Does it freeze? Is so what is listed in the status bar of iTunes?

  • I just upgraded my iMac to Lion, and a few seconds ago, I upgraded the iWork package and now I'm having some problems with the new version of Pages (4.1) When I try to change something in a document, a message says "the program is not responding"

    I just upgraded my iMac to Lion, and a few seconds ago, I upgraded the iWork package and now I'm having some problems with the new version of Pages (4.1) When I try to change something in a document, a message says "the program is not responding", so I have to force it to close. By the way, the SAVE botton stays the same even I change erverything in my document. Please, a have a work to finish, **** me. What I can do abou it?

    I just upgraded my iMac to Lion, and a few seconds ago, I upgraded the iWork package and now I'm having some problems with the new version of Pages (4.1) When I try to change something in a document, a message says "the program is not responding", so I have to force it to close. By the way, the SAVE botton stays the same even I change erverything in my document. Please, a have a work to finish, **** me. What I can do abou it?

  • My ipod touch will not switch on and is no longer recognised by itunes.  Before this i tried to restore it as I was having some problems with it switching off and on by itself randomly.

    My ipod touch will not switch on and is no longer recognized by itunes.  Before this i tried to restore it as I was having some problems with it switching off and on by itself randomly.
    I tried to restore it and I got error code 2009, so I closed it tried again got error code 1659, now it wont do anything and it's not recognized by my pc /itunes please help x

    For the restore error messages try:
    iTunes: Specific update-and-restore error messages and advanced troubleshooting

  • I downloaded the 09 version without deleting the 0, and now I am having some problems : when I open a document, it opens with 09, and then when I try to re-open it with 08 it is not possible !

    I downloaded the 09 version without deleting the 08 (didn't know), and now I am having some problems : when I open a document, it opens with 09, and then when I try to re-open it with 08 it is not possible ! I have a message saying tha "the fichier index xml is absent" (my computer is in French. I want to work with pages 08 until I get familiar with the 09 version. What shall I do ? What does this happen?

    Once you open the files in the new version you can't open them in the old version. Pick one version to use (have to be 9 now as you already have converted files)

  • I'm having some problems wiht Firefox, for example; Youtube isn't loading right, Facebook won't let me send messages, search up people, and this website i made wont load right also. I've re-installed and updated it but still the same problems. Any help?

    I'm having some problems wiht Firefox, for example; Youtube isn't loading right, Facebook won't let me send messages, search up people, and this website i made wont load right also. I've re-installed and updated it but still the same problems. Any help?

    Because I know enough to be dangerous...  I was trying to extend the two outside columns down....  Instead of just using faux columns which I have fixed since I posted the question.
    The other link problem is the left sidebar links.  When you go to the event photos page I have a repeat of the sidebar links that are on the newsletter page.  I used named anchors on the newsletter page to link to the particular article.  From the Event Photos page the links look like this:
    <a href="1112Visions_Iss1.html/#puzzle" target="_self">[Puzzle]</a>
    The problem I am having is that some of these go to the newsletter page and the anchor and some do not (I get an error message saying it  can't find the page).  To add to the problem is that when we choose say the President's Message, when it goes to the newsletter page and the correct anchor, the newsletter page is missing all the links to the graphics... the photos are missing the graphic for the faux columns is missing.  It makes no sense.  When I preview the newsletter page from Dreamweaver everything shows up fine.
    I do not know if all of this is being caused because I haven't posted this stuff to the site or what.  I've tried re-booting both the browser and Dreamweaver, dumping the cache and still the same nonsense.
    Got any ideas?

  • HT4060 I'm having some problems with my ipad and charging it. I am having to leave it in charge for a lot longer, but when I take it out and want to use it the battery is still not completely full and goes down a lot faster than usual

    I'm having some problems with my ipad and charging it. I am having to leave it in charge for a lot longer, but when I take it out and want to use it the battery is still not completely full and goes down a lot faster than usual. The other day, I had charged  my iPad overnight so that I could take it to university with me for the day, and when I had switched it on the next day the battery was on 5% and I had not used it since charge.

    Your battery may be dying. THey are only good for so many charges/discharges. If you have an apple store near by make an appointment and have them check itout

  • Hi. An application me and my friends are having some problems starting is called League of Legends and we want to know more why we cant start the app.

    Hi. An application me and my friends are having some problems starting is called League of Legends and we want to know more why we cant start the app.

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Click the Clear Display icon in the toolbar. Then try the action that you're having trouble with again. Select any messages that appear in the Console window. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message (command-V).
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.

  • Hi having some problems. flashing question mark!!!!!!!!!!!!

    hi iv been having some problems with my mac i was unable to start it up which had the new os x operating system was on it. it had a dreaded flashing question mark on startup. So i did the hold down option key start up manager thing. no luck it couldn't find the disk. So i looked on disk utility and got the message
    Invalid B-tree node size
    Volume check failed.
    Error: Filesystem verify or repair failed.
    disk would not repair. so intalled again on my other hard disk to get it up and running again. its sorted now but cannot get the old data off the original hard disk. it is still showing up on disk utillity but carnt do anything with it.
    hmmmmmmmm should of backed it all up me thinks...
    do you think i could retrive data on this?
    can anyone help me out on what to do i dont have a clue.
    cheers Jamie
    Message was edited by: jamie8286

    Hi Jamie, It sounds like the directory is corrupted or your HD is going bad.
    Did you check the system profiler and see if the S.M.A.R.T passed. Do you have TechTool or Disk Warrior? There are some programs out there that will allow you extract information from a dieing drive.
    The flashing question mark is telling you that it cannot find a functional operating system. And disk utility will only repair drives with a bootable OS.
    I know you said you did but, did you boot _from the install disc_ and run disc repair?
    I'll see what software for recovery there is for free.....

  • I am having some problems finalizing the project, it says error code -108. I read some tips but i couldn't figure out what AppleMan1958 suggested ,can someone explain this to me ,thank you

    I am having some problems finalizing the project, it says error code -108. I read some tips but i couldn't figure out what AppleMan1958 suggested ,can anyone help me with this problem? thank you

    Oh ok, well that was what the test said prior to reformatting the hard drive. Now, it doesn't find any trouble no matter how many times I run it. That's what has me so confused, everything seems to check out and yet...I can't do anything, not even install the software!

  • I am having some problems setting up my new Airport Express! Can anyone help?

    I am having some problems setting up my new Airport Express.  I have registered it online, and downloaded all the new software, but for some reason it still doesn't work, and now my computer cannot find it! Anyone know what to do?

    Reset it and start again, use airport utility to find it (after the reset) and follow the instructions in the setup wizard.

  • Having some problems. Plz help!!!

    Hello there guys. I am here for the first time because I have a problem. I would appreciate if anyone would help.
    I am using the HP slate 7 voicetab and dancing some problems with the touch. Whenever I play a game, the touch stops working correctly after some time. For example when I try to touch any control or button, it does not get selected at all.
    Thx for your help.☺

    Hey @Tushar25 ,
    Welcome to the HP forums.
    I understand you're experiencing issues with touch screen response on your Slate 7 Voice Tab.
    Reinstall the problem app: Go to Settings > Storage > Apps > Select the app > Uninstall. Once uninstalled go to the Google Play Store app > Select My apps from the menu on the left > Select the All tab > Select the app > Install.
    Clear all cache on the tablet: Settings > Storage > Cached Data. You should have the option to erase all the cached data here.
    Hard reset: While the tablet is on, press and hold the power button for 8+ seconds to force shut down. Turn the tablet back on and see if that helps.
    Factory reset: Make sure you backup any important files or information first. Settings > Backup & reset > Factory data reset.
    Let me know if that helps.
    Please click the "Kudos, Thumbs Up" at the bottom of this post if you want to say "Thanks" for helping!
    Please click "Accept as Solution" if you feel my post solved your issue, it will help others find the solution.
    The Great Deku Tree
    I work on behalf of HP.

  • Having some problems with my c6-01

    Hello there, I have recently bought a nokia c6-01 but I am having some problems with it. Such as, sometimes it freeze and it restart itself then it continues as nothing happened(dont ask me my pin code) my other problem is when I assign ringtone to my contacts it does not bell the tone normally , it plays the music in weird tone (btw my phone play that ringtone normally in music player ) what can I do against these problems ? Is this a software or hardware problem? Should I take it to the provider? Thanks.

    random reboots are quite common
    try updating the software before you do anything else.
    If  i have helped at all a click on the white star below would be nice thanks.
    Now using the Lumia 1520

  • Having some problems with apps froms the app store

    Hello. Since I got my iTouch I've been having some problems with some apps. Some work perfectly fine, but some others are just crashing after a few seconds. I've tried everything I found, but it seems like my problem is different from the one related by lots of others iPod users. Here's a video a friend of mine who's having the same problems I am did showing it:
    http://www.youtube.com/watch?v=MI-gBhP_cgU
    It's really annoying us. Does anyone know how to fix it? Does it look like a firmware problem? Thanks in advance.

    Have youy tried:
    - Reset:
    Reset iPod touch:  Press and hold the On/Off Sleep/Wake button and the Home
    button at the same time for at least ten seconds, until the Apple logo appears.
    - iOS: Troubleshooting applications purchased from the App Store
    - Restoring the iPod from backup
    - Restoring the iPod to factory defaults/new iPod.

Maybe you are looking for

  • Connect MBP to Sony TV

    My MBP (MacBookPro5,4, Intel Core 2 Duo 2.53GHz) will not display when I connect it to my Sony TV. I am using the MiniDisplay to DVI adapter, then DVI to HDMI to my TV. The display shows up in the System Preferences, but nothing is displayed on the T

  • How to create list of a View's column names and source

    Using SQL 2005, 2008, and 2012 How to create list of a View's column names and source. For the following example would like to @Print something like the following.  Does anyone already have some code to do this? I realize there are probably some gotc

  • Macbook Pro and Thunderbolt USB problem

    I have read a few threads regarding problems with the Thunderbolt displays and Macbook Airs. None of the suggestions in there work for me including doing an SMC Reset. Here is my problem. I have a brand new Macbook Pro 17", 2.5Ghz Core i7,  8gb ram,

  • Help, cannot download software updates after HD erased!

    Hello community, Back story: I'm an ISM major, so I'm typically pretty good with computers. I've also played with some torrents and I understand the risks that come with them but I'm someone who does my research before downloading. Well, I have Leopa

  • Users saving half completed forms

    I have set up my enquiry form which our users complete and submit to me via a butoon (XML).  they are mainly using adobe reader to view the form.  If they are half way through the form and they wish to save it and continue filling it in later they ca