Use a PrintWriter.

On Fri, Feb 4, 2011 at 12:33 PM, MobileVisuals <[email protected]> wrote:
> I am making a timelimited trial version of a live wallpaper app. I
> need to store the timestamp on the SD card, to keep track of the
> trialperiod. I can get the current time with
>
> long currentTime=System.currentTimeMillis();
>
> I want to store this with a FileOutputStream object. The problem is
> that FileOutputStream only has write methods for byte vectors. Byte
> can only be up to 128, and timestamps are bigger numbers than that. I
> assume that I have to convert the timestamp number, which is a long,
> into a byte vector. Is there any easy way to do this?
>
> Or is there any other way of storing the long value without using the
> write methods for byte vectors?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to