Results 1 to 7 of 7
  1. #1
    nvkuriseti is offline Member
    Join Date
    Jan 2015
    Posts
    7
    Rep Power
    0

    Default Generate a file in Java with Unix TimeStamp

    Hello Gurus,

    I need your guidance/suggestion to generate a file in Java with Unix TimeStamp. Want to generate an ordered list of Data entry objects for a defined period of time e.g., getData (long startTimeStamp, endTimeStamp, long resolution).

    1) I would like to generate resolution with random numbers by using Random class.
    2) I have no idea how to take Start and end timestamps to generate a file (i.e., writing into a file).

    Please give some idea how to go.

    Thank You.

    - Venkat

  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: Generate a file in Java with Unix TimeStamp

    I don't have the slightest clue what you are describing here. Rather than trying to describe it, create an example of what you want to achieve. Also be more specific about what you are stuck on. I mean in point 1) you mention wanting to do random number generation, but I'm sure you are perfectly capable of googling for examples on how to do that yourself.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    12,059
    Rep Power
    26

    Default Re: Generate a file in Java with Unix TimeStamp

    Quote Originally Posted by gimbal2 View Post
    I don't have the slightest clue what you are describing here.
    And you probably never will, as this one doesn't bother to return.
    http://www.java-forums.org/new-java/...fer-issue.html

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  4. #4
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: Generate a file in Java with Unix TimeStamp

    Ah yes, him. Note to self: check post history if post count is between 2 .. 5
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  5. #5
    nvkuriseti is offline Member
    Join Date
    Jan 2015
    Posts
    7
    Rep Power
    0

    Default Re: Generate a file in Java with Unix TimeStamp

    Quote Originally Posted by gimbal2 View Post
    I don't have the slightest clue what you are describing here. Rather than trying to describe it, create an example of what you want to achieve. Also be more specific about what you are stuck on. I mean in point 1) you mention wanting to do random number generation, but I'm sure you are perfectly capable of googling for examples on how to do that yourself.
    Hello gimbal2, thanks for your message. What I need first step is to generate a file to capture Unix Timstamps from start and end as parameters. Want to write those (between start and end) Unix TimeStamps into a file. This is one column in a file to generate and another column is to generate Random numbers and write into the same file as 2nd column. This entire generation is write in Java/J2EE.

  6. #6
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: Generate a file in Java with Unix TimeStamp

    What I ask: provide an actual example of what you want to achieve
    What you do: repeat what you said before in less words and thus even more vague
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  7. #7
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    14

    Default Re: Generate a file in Java with Unix TimeStamp

    What, exactly, is a Unix Timestamp? Timestamps may have a variety of formats. So please include an example. In your first post, you indicated the timestamps were long values. So are you simply looking for some number of time units (msecs, secs, mins) from an epoch?

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

Similar Threads

  1. Replies: 0
    Last Post: 05-19-2011, 07:46 AM
  2. Replies: 0
    Last Post: 05-18-2011, 11:37 AM
  3. create the tar.gz file for UNIX plateform in java
    By ashu_knw in forum New To Java
    Replies: 3
    Last Post: 04-16-2010, 11:22 AM
  4. How to generate comment or javadoc in java file ?
    By Tonny in forum Advanced Java
    Replies: 2
    Last Post: 01-03-2010, 05:49 PM
  5. Filter a file in java (unix cut command equivalent)
    By marcosabel in forum New To Java
    Replies: 0
    Last Post: 02-11-2008, 07:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •