hi skink,
Sorry it was my mistake at object of InputStream, that is 'is '
but i was using 'in'. Now it's receive the data and create a video.3gp file but
it's not a playable(corrupted). Now what can you suggest me, and Thanks a lot
for your kind help.
Thanks and Regards,
umer
> Date: Wed, 25 Jan 2012 03:58:29 -0800
> Subject: Re: [android-developers] Re: Encoder???
> From: [email protected]
> To: [email protected]
>
>
>
> Muhammad UMER wrote:
> > hi skink,
> > Now i have used inputstream but it give me Exeption (null) at
> > while((bytesRead = is.read(buffer)) != -1) on server side.
> >
> > here server side code that i am using.
> > try
> > {
> > // create stream to Network
> > InputStream in = clientSocket.getInputStream();
> >
> > // create stream to file
> > OutputStream os = new FileOutputStream("video.3gp", true);
> >
> > byte[] buffer = new byte[4096];
> > int bytesRead;
> > while((bytesRead = is.read(buffer)) != -1)
> > {
> >
> > os.write(buffer, 0, bytesRead);
> >
> >
> > }
> > is.close();
> > os.close();
> > }
> > catch (Exception e)
> > {
> > System.out.println(e.getMessage());
> > }
> >
> >
>
> what's stack trace? tried to debug it?
>
> pskink
>
> --
> 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
--
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