CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: zebbi

Search: Search took 0.03 seconds.

  1. Replies
    2
    Views
    1,527

    How to write more than one String to file?

    I have a program that writes data to a file as part of its functionality, however the way it is programmed means it can only write one String and i wish for it to be able to write more than this; a...
  2. Replies
    7
    Views
    1,039

    Re: looping back to beginning of code

    if they did enter yes or no, i would want the user to have to enter quit, the execution of other code in the program and thus other functions of the program should just happen automatically, a user...
  3. Replies
    7
    Views
    1,039

    Re: looping back to beginning of code

    sorry it was probably me not being clear then.

    If they enter "yes" then thats fine and the program will go ahead and write data, if they enter "no" then thats fine again and the program will not...
  4. Replies
    7
    Views
    1,039

    Re: looping back to beginning of code

    but that wouldn't allow the original question prompt to be displayed again and the program operate as normal from that point on again, should they happen to enter anything other than "yes" or "no"...
  5. Replies
    7
    Views
    1,039

    looping back to beginning of code

    I have some code within a main method that asks a user if they would like to write data to a file, and depending on their input answer at the prompt, which can be either "yes" or "no", it either asks...
  6. Replies
    1
    Views
    2,677

    File last accessed and created time

    Hi, how would one go about retreiving the last accessed and created time of a file in JAVA?
    I can't find any examples on google, and wondered if anyone here knew.

    Thanks
  7. Converting retreived mod time to a readable time

    hi, i have a class in my program that displays the last modified time of a file (passed into the method in the parameter "filepath"), but when it diplays it, it isn't really a human readable number,...
  8. Replies
    9
    Views
    1,025

    Re: class to delete file

    Thanks program this, i'll do that for all of my classes, and have for the DeleteFile class, however i still have the problem that the file doesnt get deleted, i still get the "deletion failed"...
  9. Replies
    9
    Views
    1,025

    Re: class to delete file

    its for a college project and we had to use uml and clas diagrams, and so although all of what my program is doing could be done with static methods really (as it used to be, i have converted it into...
  10. Replies
    9
    Views
    1,025

    Re: class to delete file

    I don't see how it can be a problem with permissions because when i go to the file directly, click it and press the delete button it is sent to the recycle bin as normal, does this mean it can't be...
  11. Replies
    9
    Views
    1,025

    Re: class to delete file

    I've tried printing out the parameter and the path is being passed and processed because the error message says "failed to delete.. (and then the path)", so the path parameter is passed and then...
  12. Replies
    9
    Views
    1,025

    class to delete file

    I call a class in my main class and method with an if statement depending on the users answer "yes" or "no" like so:

    System.out.println("Would you like to delete this file? (yes\\no)\n");

    ...
  13. Replies
    11
    Views
    5,021

    Re: MD5 code errors, another way?

    here is the calculateMD5 method with the catch for NoSuchAlgorithmException added:


    public static void calculateMD5(String path) throws NoSuchAlgorithmException, FileNotFoundException
    {
    ...
  14. Replies
    11
    Views
    5,021

    Re: MD5 code errors, another way?

    I have read up on exceptions, but i can't find anything that explains how to deal with this problem i have. I know exceptions must be either caught in the method they are thrown or caught by another...
  15. Replies
    11
    Views
    5,021

    Re: MD5 code errors, another way?

    i thought the method was declaring the exception in:

    public static void calculateMD5(String path) throws NoSuchAlgorithmException, FileNotFoundException

    I am unsure of how to update this code...
  16. Replies
    11
    Views
    5,021

    Re: MD5 code errors, another way?

    OK lol. i have one last problem, i have included that md5 method in a program, instead of hard coding the path to a file to be MD5'd into the method, i've altered it so that a parameter named "path"...
  17. Replies
    11
    Views
    5,021

    Re: MD5 code errors, another way?

    thats great thanks, i thought it was a relatively simple problem. by the way, has anyone ever written a program to generate sha1 hashes of files in JAVA? or know of a good tutorial?
  18. Replies
    11
    Views
    5,021

    MD5 code errors, another way?

    Hi, i'm trying to compile some example source code i found on the net to calculate an md5 hash for a file. but i get errors and i'm not sure how to correct the code. Sorry i'm new to the language....
  19. Replies
    2
    Views
    809

    Re: if statement depending on "yes" or "no"

    sorry double posted by mistake lol, don't think i could delete? thanks
  20. Replies
    2
    Views
    809

    if statement depending on "yes" or "no"

    I'm having problems with the following if statement, if the user enters "yes" at the console, i want the statement to write to the file (as you can see), however if the enter "no" i want it to print...
Results 1 to 20 of 20





Click Here to Expand Forum to Full Width

Featured