A question regarding Android File I/O API?

I need to write multiple blocks of the following chunk into a file

+----------+--------------+---------------------+ | FileName | Size of File | Binary Dump Of File | +----------+--------------+---------------------+

There are two variants of file writers I could see. 1. FileWriter - allows writing [string,char[],one byte] 2. BufferFileoutputStream - allows writing [byte array]

I need an File object that can write String,Integer and binary data. But I could not find any direct way out. We can definitely have work-arounds, like converting Strings and Integers to byte array. But is there a better alternative ??

-------------Problems Reply------------

Yes there is an alternative. It is called: java.io.DataOutputStream. To know if it is helpful to your problem we would need more informations.

Category:android Views:4 Time:2010-08-11
Tags: file io android

Related post

  • How to download a large file using google-api-java-client on Android? 2012-03-30

    Recently, I try to use google-api-java-client library to access google document. I can use this library to get a list, create new documents, and update successfully. However, when I want to download a large file (> 10mb) from Google Document, it c

  • Few Questions regarding Android Kernel 2010-09-08

    I am new to android kernel and Mobile Operating Systems and I have a few questions regarding android kernel. 1) Does Android OS has Kernel Mode and a User mode like Normal desktop OSs ? Also does it support things like Virtual Memory ? Also I heard a

  • how to run android app in lower api target emulator? 2012-01-17

    I had made an application with target : Android 2.1 - API Level7. It works fine with the emulator with target : Android 2.1 - API level7. And after that i tried to run the same app in an emulator with target : Android 1.5 - API Level3. But it is not

  • Android File Manager Library 2011-04-10

    I am admittedly not experienced in developing for android. I am looking for some API that lets me browse the users files, without installing a separate app via intents. Right now I have found the OI File Manager, but that uses intents to get it's wor

  • how to implement dropbox in android application with REST API 2011-08-03

    https://www.dropbox.com/developers/docs is the best place, But I cannot get the proper answer, I want to implement dropbox in my android application with REST api, I don't want User Log in screen, want to put username and password dynamically. Any id

  • SDK Manager: Failed to install. SDK android platform 3.0 API 11, revision 2 2011-08-11

    Failed to rename directory D:\android-sdk-windows\platforms\android-11 to D:\android-sdk-windows\temp\PlatformPackage.old01. Failed to rename directory D:\android-sdk-windows\platforms\android-11 to D:\android-sdk-windows\temp\PlatformPackage.old01.

  • Where to get Android 1.0.0 API 2 SDK Platform 2011-08-21

    I just checked out the files in the repository for Cool Reader. I compiled it againt API7 but it's not working like the version I downloaded. It's not showing the icons and it doesn't open files. In in it's README file it says: If you are a developer

  • Deep Search in the android file system for text files 2011-08-24

    I would like to search within the Android file system for finding text files containing specific information (e.g., the device's battery current and voltage). I tried to use the Astro File Browser but it seems that its search functionality does not s

  • Android and Google client API NetHttptransport Class not found 2011-10-04

    I am trying to use the Google generated API library for the first time for Android. I have taken code from the the Sample Program provided by Google. My code looks like import java.io.BufferedReader; import java.io.IOException; import java.io.InputSt

  • Android File Chooser Return path to main class 2011-11-17

    I want to implement an Android file chooser for OCR. I have the source code from this site: here What I want is to create a main Activity using an intent to call the FileChooser public class MainFileChooser extends Activity { Button btnBrowse =null;

  • How to set a photo in android via the contacts api 2012-02-06

    i'm new to developing android apps and I'm currently trying to do the following: Search all contacts' notes for a certain string (say: "E-Plus") and, if found, place a certain icon (say the E-Plus logo) as their contact photo. I got it working using

  • Posting questions to groups via the graph API 2012-02-17

    I am new to the Facebook graph API and I am currently developing my first app using the php-sdk. I am looking to be able to post questions on a group via the graph API. I have come across Facebook's blog post here http://developers.facebook.com/blog/

  • how to use openipmp client (DRMPluginAll) in android file system(Ice Cream Sandwich) 2012-04-24

    First of all i want to say that i have searched each and every forum to get the answer. And i already asked so many questions related to this question and i didn't get ant answer. please atleast answer weather it's possible or not. We want to write a

  • How to translate .PDF files using google APIs? 2010-05-10

    How to translate .PDF files using google APIs? (translate from language the pdf's are to for example russian (new pdf file orplain text or html).) (code example needed) --------------Solutions------------- You could link the PDFs to http://translate.

  • How to use SQL file streaming win32 API and support WCF streaming 2010-05-21

    I'm using Sql server file stream type to store large files in the backend. I'm trying to use WCf to stream the file across to the clients. I'm able to get the handle to the file using SQLFileStream (API). I then try to return this stream. I have impl

  • Does Android support the OpenYmsg API? 2010-09-21

    Does Android support the OpenYmsg API? --------------Solutions------------- The Android SDK itself does not support the Yahoo messenger protocol - but it's no problem to add external Java libs. So have fun. :-)

  • This is a question about OS file storage management and Inode 2010-12-15

    This is a question about OS file storage management and Inode. This is a question for review of final exam..Lecturer didn't give the answer about second question. Does anybody can do this and help me or give some hints? THnaks! [10 points] File Stora

  • how to create a file using windows API? 2011-01-09

    I want to create a text file using windows API. I studied about HANDLE CreateFile( LPCTSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDispostion , DWORD dwFlagsAndAttributes, HAND

  • Questions regarding uploading files to Amazon S3 using browser based HTTP POST 2011-01-27

    I have a couple of questions regarding uploading files to Amazon S3 directly by the user using HTTP POST form generated by a JSP page The access key and the signature needs to be exposed to the user to allow him to upload files from a JSP form. In th

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.064 (s). 11 q(s)