Using Flyer to send files over a Bluetooth connection

import mx.utils.Delegate;
import com.flyer.Bluetooth;
var connection_str:String = “127.0.0.1″;
var port_num:Number = 9100;
var connection_bt:Bluetooth = new Bluetooth();
var filePath_str:String = “E:\\photo_001.png”;
function sendFile():Void {
connection_bt.connect(connection_str, port_num);
status_txt.text = “Connecting to Python…”;
function onBluetoothConnect(success_bool:Boolean):Void {
if (success_bool) {
status_txt.text = “Sending file…”;
connection_bt.send(”sendFile” + “|”
+ filePath_str);
} else {
status_txt.text = “Connection failed.”;
function onBluetoothData(source_str:String):Void {
status_txt.text = source_str;
function onBluetoothClose():Void {}
connection_bt.onData = Delegate.create(this,
onBluetoothData);
connection_bt.onConnect = Delegate.create(this,
onBluetoothConnect);
connection_bt.onClose = Delegate.create(this,
onBluetoothClose);
sendFile()

is is possible to use a filestream to send files from
client to server? If so could someone show me some
example code or point me to a good internet
reference. i have done some searching and reading
but haven't found anything that showed it well.
thanks for the help in advance.The API descriptions for the 2 filestream classes gives the answer:
FileInputStream - A FileInputStream obtains input bytes from a file in a file system.
FileOutputStream - A file output stream is an output stream for writing data to a File or to a FileDescriptor.

Similar Messages

  • Why i can't make a normal video call over my cellular operator using by iphone 4s ????!!!! is it possible that if my mobile is iphone so i can not contact (Video Call - or Send Files over Bluetooth ) people do not have iphone ??????!!!!!!!!!

    why i can't make a normal video call over my cellular operator using by iphone 4s ????!!!!
    is it possible that if my mobile is iphone so i can not contact (Video Call - or Send Files over Bluetooth ) people do not have iphone ??????!!!!!!!!!
    i'm still looking for solution, but if i there is no solution so i will throw My Own iPhone 4S in the nearest Trash.
    (I had got a big problem and thanks for Nokia saved me. and if i don't care about apple products i will never send to you this, so kindly find solution or people in middle east will stop using iphone)

    No clue why you cannot make video calls over your cellular operator... have you tried contacting them?
    If you're referring to FaceTime, it is currently limited to Wi-Fi only.
    Sending files via Bluetooth is not a supported feature of the iPhone or iOS.  A simple search of the web or these forums would have made that abundantly clear.
    Threatening to throw away valuable items in these forums only serves to make you look less than intelligent.  No one here is an Apple employee, we are all users like yourself.  As such, we could care less what you do.  If you choose to be stupid, that's up to you.
    Educate yourself and stop whining.

  • Using wildcards (*) in sender file adapter - FTP type

    Hi guys!
    Dooes it work using wildcards in sender file adapter (FTP type(!) (filesystem obviously work))? I tried it and it failed. it works only for exact name..
    I read some articles about FTP and the result is, that ftp work always only with 1 file, so I'm wondering, if this is possible.
    Thanks for info!
    Olian

    Thanks for all replies..
    I know of course, that * can be used, I use it in many scenarios too. But on a FileSystem. It is not working if the sender type is FTP.
    *, ., *.dat, ...  nothing like that works..  Just exact file name.
    I am able to pick up file, if I specify it's exact name, so there should be no problem with permissions..
    Please, I'd appreciate one reply with comfirmation: yes, we are using asterisk (*) , we access source files via FTP and they are processed.
    Is there anybody with this experience, that it works?
    Thank you!
    Olian

  • Need a help in j2me-send file to a bluetooth address(mobile to mobile)

    Dear All;
    I am new in J2ME programing...
    I have an application, in which i want to send a copy of my application (application.jar) to other bluetooth enabled mobiles.
    I have code for searching and listing other bluetooth mobiles.
    i want to send file to this bluetooth address..i have the address..
    Please help me if anybody can..
    It is so urgent..

    Siyampa, don't multipost. I've deleted your other threads.

  • Why do i get an error 66 when i sent a mail use SMTP Email Send File.vi?

            When i use SMTP Email Send File.vi,it works very well for some special mail sever such as the sever of my company,For others,while debugging it ,i use a free email address from 163 (http://mail.163.com/) or Sina(http://mail.sina.com.cn/) i get an error 66.I use the default sever port number(incoming mail sever(POP3):110,Outgoing mail sever(SMTP):25).
     Server information for 163:
       incoming mail sever(POP3)op3.163.com
       Outgoing mail sever(SMTP):smtp.163.com
     Server information for Sina:
       incoming mail sever(POP3)op3.sina.com
       Outgoing mail sever(SMTP):smtp.sina.com
    Thank you!

    According to the LabVIEW documentation error code 66 is: "The network connection was closed by the peer", which is not very helpful. There could be a number of reasons why this happens. Could also be that the server was down. I had trouble connecting to one of the sites you listed. Does the server require authentication? I tried the links you provided, but they're in a foreign language and I can't read them, so I can't tell. If authentication is required, then the SMTP VIs provided with LabVIEW won't work since they don't handle authentication. If the server requires authentication you can try the updated OpenG SMTP VIs that I had posted in this thread.

  • Problem with Sending files over Sockets

    Hi. I have a problem when I try to send files over sockets. When I send text files it works well but when I try to send .jpg or other kind of files it doesn't work well because some characters are wrong, I hope you can help me.
    Here is my code:
    //Sender code
    import java.io.*;
    import java.net.*;
    class Servidor{
         Servidor(){
              try{
                   String arch="art.jpg";
                   ServerSocket serv=new ServerSocket(125);
                   Socket socket=serv.accept();
                   System.out.println("Conectado");
                   int c;
                   BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));
                   FileInputStream fis=new FileInputStream(arch);
                   File f=new File(arch);
                   bw.write(""+f.length());
                   bw.newLine();
                   bw.flush();
                   System.out.println("Escribiendo");
                   while((c=fis.read())!=-1){
                        bw.write(c);
                   bw.flush();
                   fis.close();
                   System.out.println("Terminado");
                   while(true){
              }catch(Exception e){
                   System.out.println(e);
         public static void main(String arg[]){
              new Servidor();
    //Client code
    import java.io.*;
    import java.net.*;
    class Cliente{
         Cliente(){
              try{
                   Socket socket=new Socket("localhost",125);
                   System.out.println("Conectado");
                   BufferedReader br=new BufferedReader(new InputStreamReader(socket.getInputStream()));
                   long tam=Long.parseLong(br.readLine());
                   long act=0;
                   FileOutputStream fos=new FileOutputStream("resp.jpg");
                   System.out.println("Recibiendo: "+tam);
                   while(act<tam){
                        fos.write(br.read());
                        act++;
                   System.out.println("Terminado: "+act+" / "+tam);
                   fos.close();
              }catch(Exception e){
                   System.out.println(e);
         public static void main(String arg[]){
              new Cliente();
    }

    I don't think you want BufferedReader and OutputStreamWriter, you want ByteArrayOutputStream and ByteArrayInputStream . The problem is that you are sending jpegs (binary data) as text.

  • HT203106 Can I use AirDrop to send files from iPhone 5 to my iPad Air 2?

    Can I use AirDrop to send files from iPhone 5 to my iPad Air 2?

    Yes.
    Use AirDrop to wirelessly share content - Apple Support

  • Sending File Over Serial PORT

    Hi,
    I'm able to read/write data over serial port using Java Comm APIs in Linux.
    Can anybody please tell me how to write/read a file over Serial port?
    Is it similar to sending a file over network?
    An early response is appreciated...

    Same stream I/O as used over the port works from a file. Dead simple.
    Also dead slow. If you want to do large amounts of data, use a RandomAccessFile and read a big chunk at a time into a byte array. Then send the byte array.

  • Sending Files over a Windows Network

    I am trying to send files from one computer to the other over a windows network. I have absolute path names of the two locations.
    Can you just use "File.renameTo(File);" to pull this off?
    Is there a fast way to move files over a windows network?
    Thanks so much for your help

    With File.renameTo()? Yes.
    between directories on different local drives? Yes.
    or different nodes in a network?I'm not sure what you mean by that, which is most probably my lack of knowledge about computer networking.
    Here's the test I performed:
    File a = new File("C:/Temp/test.txt");
    // 'E:' is (physicaly) a different hard drive than 'C:'
    File b = new File("E:/Temp/test.txt");   
    System.out.println(a.renameTo(b));
    // 'Athene' is a home-SAN-drive/server connected to my router
    File c = new File("//Athene/SHARE/Temp/test.txt");
    System.out.println(b.renameTo(c));Both print true and in both cases I have checked to see if the files really were moved, which was the case.

  • Unzip file using PayloadZipBean in Sender FILE adapter

    I am trying to unzip a flat file in Sender FILE adapter using PayloadZipBean.
    I am getting mapping error. The problem is File adapter is reading data without unzipping. I am getting weird characters/data, so mapping error.
    I searched all the blogs/ forum threads and help.sap.com, everywhere the focus is on zipping, not unzipping.
    the file I have is with .gz extension, but I tried with .zip extension also.
    Please help in resolving this issue.
    Edited by: Gopal Janagama on May 2, 2008 11:42 PM

    Gopal,
    GZIP and ZIP format are slightly different, as stated here :
    "GZIP compresses only one file and does not have a header. ZIP contains header information about what files are contained in the file."
    So I'm not sure the PayloadZipBean supports GZIP format ... Try to ungzip and then zip its content and see if the bean works for it
    Rgds
    Chris

  • Problem when using keyfield in sender file content conversion

    Hi all,
    I am using FCC at sender side.
    My recordset structure is as follow::
    <MT_TW_TLOG>
      <Transaction>
       ---<SalesItem> 1...unbounded
           <XF_SOURCESYS>
           <XF_STORECODE>
           <XF_TYPE>
           <XF_VOIDFLAG>
       ---</saleItem>
       ---<SalesReturn> 1...unbounded
           <XF_SOURCESYS>
           <XF_STORECODE>
           <XF_TYPE>
           <XF_VOIDFLAG>
       ---</saleReturn>
       ---<SalesTotal>
           <XF_SOURCESYS>
           <XF_STORECODE>
           <XF_TYPE>
           <XF_VOIDFLAG>
       ---</saleTotal>
       ---<SalesTender> 1...unbounded
           <XF_SOURCESYS>
           <XF_STORECODE>
           <XF_TYPE>
           <XF_VOIDFLAG>
       ---</saleTender>
    </Transaction>
    FCC specification that i have used is::
    Recordset name::       Transaction
    Recordset Structure::  salesItem,,salesReturn,,salesTotal,1,SalesTender,*
    Recordset Sequencee::  
    Variable
    Key field name::XF_TYPE
    key fiel type::String(Case-sensitive)
    then i have given following information::
    salesItem.fieldnames ::all field names
    salesItem.fieldSeparator::,
    salesItem.keyFieldvalue::2
    salesItem.processFiledNames::fromConfiguration
    salesReturn.fieldnames ::all field names
    salesReturn.fieldSeparator::,
    salesReturn.keyFieldvalue::2
    salesReturn.processFiledNames::fromConfiguration
    salesTotal.fieldnames ::all field names
    salesTotal.fieldSeparator::,
    salesTotal.keyFieldvalue::2
    salesTotal.processFiledNames::fromConfiguration
    salesTender.fieldnames ::all field names
    salesTender.fieldSeparator::,
    salesTender.keyFieldvalue::2
    salesTender.processFiledNames::fromConfiguration
    My source file is a text file.
    So when i am transfering following data,
    scenario works fine.
    PCTW,TWS001,2,1
    PCTW,TWS001,2,10
    PCTW,TWS001,3,2
    PCTW,TWS001,1,3
    PCTW,TWS001,4,4
    Third field is my XF_TYPE.
    But if i change the order of records as follows::
    PCTW,TWS001,3,1
    PCTW,TWS001,3,10
    PCTW,TWS001,2,2
    PCTW,TWS001,1,3
    PCTW,TWS001,4,4
    It fails at adaper monitor and throws following error::
    2006-11-01 10:42:00 UTC: Error: Conversion of complete file content of 'try.txt' to XML format failed around position 0: Exception: ERROR consistency check in recordset structure validation (line no. 3: missing structure(s) before type 'SalesItem'
    Please provide some help on it.
    Thanks & Regards,
    Nilima

    Hi Nilima,
    Just go through this Weblog.
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    and specially the hilighted ( circled text ) in this and its description below.
    Hope this will be helpful
    Reward if helpful.
    Regards
    Sachin

  • ALV truncation while download using  List--Save/send--File--Spread sheet

    Experts,
    In ALV output, I am trying to download using menu item
    "List --> Save/send  --> File --> Spread sheet" then in the popup appears
    here if i GIVE the FILE NAME THEN,material number is getting truncated.
    If I don't give any file name it is storing as ".xls" and not getting truncated.
    How to correct this or avoid this truncation.
    OR
    If we can't do correction about truncation ...my function consultant is asking to
    to disable "List --> Save/send  --> File".
    Thanks in advance.
    Sam

    Solved by my own....
    We need to pass
    i_fieldcat-no_zero = 'X'.
    so that the zeros at the end  won't get truncated.

  • How can i send file over messages in Mac OS X?

    Hi,
    Unable to send files from messages application in my Mac, i configured gmail account in messages so u can able to chat with my friends but i can't send any file to my friends. so is there any setting needs to be configure in preferences? please suggest me.
    Thanks in Advance,
    Suresh Balakrishnan.

    HI,
    In iChat 6 before you upgraded to Messages Beta were you able to Send Files ?
    There are also various ways to start this
    Try:-
    Dropping a file on a Buddy's name in the Buddy List
    Dragging a File to the text entry field in a chat.
    In a Video Chat drag a file over the Chat window and chose the half that says  Send File.
    As it is Google are you Buddies logged in via the Web Browser or a Jabber App or iChat on a Mac ?
    9:16 PM      Wednesday; March 28, 2012
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Lion 10.7.3)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Sending vectors over an Http connection

    Hello, I want to send vectors from my midlet over a http connection to a servlet. Is it possible by using a DataOutputStream in combination with an ByteArrayOutputstream? is it possible to send a vector over an http connection from j2me to jsee?

    I guess what you're saying is that you'd like to use a ByteArrayOutputStream wrapped by a ObjectOutputStream, marshal in the java.util.Vector, get the byte array and send it via HTTP somehow, and then do the reverse on the other side.
    That will work if you need to use HTTP. Otherwise, you could setup a non-HTTP connection or use a higher level system like RMI or RMI-IIOP.
    - Everett

  • Update to 10.6.8 now I can't send file over bluetooth

    Before update to 10.6.8 I sent files to my Samsung B3410 over bluetooth just fine, but now a message "Failed to establish connection to device" appear every time i try to. I did not change anything on mobile device configuration, I did try removing device and paring again, turning off/on bluetooth on both mobile and iMac, but nothing help... any ideas must be appreciated.

    My problem exactly but with a different printer:
    In two different Macs, I lost the capability to print to my Konica Minolta c353 printer. The Macs are: mid-2010 Macbook Pro 15" and a mid-2010 Mac mini Server. "Printer paused" is what happens. The logs say:
    Backend returned status -8 (crashed)
    Printer stopped due to backend errors 
    Interestingly, in the Macbook Pro I have a Windows 7 running on top of Parallels and the printer works just fine from any Windows program.
    Hope Apple is reading this, as well as the Feedback I also sent them.

Maybe you are looking for