Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Converting data source

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I need to send a video to a remote computer through the internet. I am using RTPSockets for this transmition. But I need to convert the data source to an array of bytes. Is there a way to do it? But even if I convert it I am not sure this will work.
So if any one has some code that could send a live stream to a remote computer thought the internet place forward it to me

Thanks lot
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
there is some package called javazoom which is used to upload the files u can upload it to any where from server
just search in net i was sending some sample code
****************************code***********************


<html>
<%@ page language="java" import="javazoom.upload.*,java.util.*" %>
<%@ page errorPage="ExceptionHandler.jsp" %>
<jsp:useBean id="upBean" scope="page" class="javazoom.upload.UploadBean" >
<jsp:setProperty name="upBean" property="folderstore" value="D:/uploads" />
</jsp:useBean>
<head>
<title>Samples : Simple Upload</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<ul><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">
<%
if (MultipartFormDataRequest.isMultipartFormData(request))
{
// Uses MultipartFormDataRequest to parse the HTTP request.
MultipartFormDataRequest mrequest = new MultipartFormDataRequest(request);
String todo = mrequest.getParameter("todo");
if ( (todo != null) && (todo.equalsIgnoreCase("upload")) )
{
Hashtable files = mrequest.getFiles();
if ( (files != null) || (!files.isEmpty()) )
{
UploadFile file = (UploadFile) files.get("uploadfile");
out.println("<li>Form field : uploadfile"+"<BR> Uploaded file : "+file.getFileName()+" ("+file.getFileSize()+" bytes)"+"<BR> Content Type : "+file.getContentType());
// Uses the bean now to store specified by jsp:setProperty at the top.
upBean.store(mrequest, "uploadfile");
}
else
{
out.println("<li>No uploaded files");
}
}
else out.println("<BR> todo="+todo);
}
%>
</font></ul>
<form method="post" action="SimpleUpload.jsp" name="upform" enctype="multipart/form-data">
<table width="60%" border="0" cellspacing="1" cellpadding="1" align="center">
<tr>
<td align="left"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><b>Select
a file to upload :</b></font></td>
</tr>
<tr>
<td align="left"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">
<input type="file" name="uploadfile" size="50">
</font></td>
</tr>
<tr>
<td align="left"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">
<input type="hidden" name="todo" value="upload">
<input type="submit" name="Submit" value="Upload">
<input type="reset" name="Reset" value="Cancel">
</font></td>
</tr>
</table>
<br>
<br>
<table width="90%" border="0" cellspacing="1" cellpadding="0" align="center">
<tr>
<td bgcolor="#666666">
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
<tr>
<td bgcolor="#FFFFFF"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><b><font color="#0000FF"> Needed
HTML tags :</font></b></font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"> <<b>form</b>
<b>method</b>="<b><font color="#FF0000">post</font></b>"
<b>action</b>="<b><font color="#FF0000">SimpleUpload.jsp</font></b>"
name="upload" <b>enctype</b>="<b><font color="#FF0000">multipart/form-data</font></b>"></font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"> <<b>input</b>
<b>type</b>="<b><font color="#FF0000">file</font></b>"
<b>name</b>="<font color="#FF0000"><b>uploadfile</b></font>"
size="50"></font></td>
</tr>
</table>
</td>
</tr>
</table>
<p> </p>
<p> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"><font size="-1" face="Courier New, Courier, mono">Copyright
© <a href="http://www.javazoom.net" target="_blank">JavaZOOM</a> 1999-2002</font></p>
</form>
</body>
</html>
***********************************************************
 
I wish to win the lottery. I wish for a lovely piece of pie. And I wish for a tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic