Splitting multichannel files (5 or more channels)  to mono

So why doens't logic allow me to import and split out multichannel AIFFs? I can create them with max/msp or "sound studio" a freeware app, but then I can't edit them since logic only works with stereo or mono. I am also having a hard time finding a utility that does this for me offline. Any suggestions? I do notice that Nuendo can handle and split multichannel files.

one program that does do this is
Sample Manager
http://www.audiofile-engineering.com/sample_manager.php
This is a handy app. Having multiple channels interleaved is so handy, and it's been a part of the aiff format for years. But why doesn't any app take advantage of this? or at least support this aspect of the format? Anyways, the trial period s 15 days for this program. enough to convert my files. if i like it i may buy it, it think it is around $70. If anyone knows of a freeware app that does the same thing, please tell

Similar Messages

  • Hello, I use photoshop cc 10 days and I did a lot of files with layers and channels. For two days in two different locations that only happens in some documents when you reopen the job done no more .. Example 6 channels on the facts I see only one .. Than

    Hello, I use photoshop cc 10 days and I did a lot of files with layers and channels.
    For two days in two different locations that only happens in some documents when you reopen the job done no more .. Example 6 channels on the facts I see only one ..
    Thank you for your attention.
    Annalisa 

    Don't understand what you writing here.  Screen shoots would be most helpful.
    Supply pertinent information for quicker answers
    The more information you supply about your situation, the better equipped other community members will be to answer. Consider including the following in your question:
    Adobe product and version number
    Operating system and version number
    The full text of any error message(s)
    What you were doing when the problem occurred
    Screenshots of the problem
    Computer hardware, such as CPU; GPU; amount of RAM; etc.

  • Splitting .wav Files from LPs in WaveStu

    Hi,
    Does anyone know how to split a large .wav file using Creative WaveStudio? I haven't been able to find out how in the help files or online knowledgebase.
    I have a SB Li've! 24-bit and have successfully recorded LPs to .wav files in 96kHz/24-bit resolution (I plan to take advantage of the higher resolution afforded by the DVD specification over normal audio CDs and make music-only DVDs). I've been capturing whole sides of LPs and now need to split the resulting file into tracks.
    I can think of two work arounds:
    ) record one track at a time.
    2) make individual tracks from several copies of the large file.
    But it would be easier to just be able to split the large file into individual tracks. Any help would be much appreciated.
    Thanks.

    if you only deals with STEREO 24/92 files then wave studio should be able to split them easily.
    if you're dealing with multi-channel 24/96 files then I think Goldwave isn't able to process them correctly (it's not indicated it supports multichannel files in the product description).
    If you plan to play your records on a PC only, then why you do not compress them with Windows Media codec (lossless for 5./24bit/96kHz, or Professionnal for 7./24bit/96kHz max). You'll be able to fill more your compilations without any hearable audio loss (with the lossless one yes).
    Windows media encoder can do this very well, as well as indexing its media formats.

  • How do I bounce two mono split stereo files to one mp3?

    Might sound like a stupid question, but I have several problems:
    I bounced a waveburner-mix of my favorite songs as a split stereo file and inserted the two files in two logic mono audio tracks.
    First problem: Do I have to pan the left audio-track left and the right to the right or do I keep them centered?
    Second problem: The two tracks are louder than the original track. (no matter, if they are panned or centered. Shouldn´t the original have the same volume at my output-channel?
    Third problem: Is it possible to bounce more than 2 GB with Logic 8? The mix is very long and when I want to bounce it, logic tells me that it is too big. Can I bounce larger files with logic 9 under OS 10.6?

    Felix Bartelt wrote:
    Last question remaining: Can I bounce larger files under Logic 9 and OS 10.7. or does L9 also have the 2 GB restriction?
    No and no. The file size restriction is not Logics' restriction, it is a restriction of the file type itself. To be able to bounce longer and/or bigger files, use .caf.
    From the manual:
    +AIFF: The AIFF file format cannot handle audio file recordings larger than 2 GB:+
    ++For 16-bit, 44.1 kHz stereo files, this equals a recording time of about 3 hours and 15 minutes.+
    +For 24-bit, 96 kHz, 5.1 surround files, this equals a recording time of about 20 minutes.+
    +WAVE (BWF): The WAVE file format cannot handle audio file recordings larger than 4 GB:+
    +For 16-bit, 44.1 kHz stereo files, this equals a recording time of about 6 hours and 30 minutes.+
    +For 24-bit, 96 kHz, 5.1 surround files, this equals a recording time of about 40 minutes.+
    +CAF: If the size of your recording exceeds the above limits, choose the CAF (Apple Core Audio Format) file format, which can handle the following recording times:+
    +About 13 hours and 30 minutes at 44.1 kHz+
    +About 6 hours at 96 kHz+
    +About 3 hours at 192 kHz+
    +The bit depth and channel format—mono, stereo, or surround— *do not affect* the maximum recording size of CAF files.+

  • Urgent question: How to split multichannel audiofiles?

    Hello everyone,
    I'm working on an audio installation using 27 speakers. I program my own software in Max/MSP and record audio in multichannel files with 27 interleaved tracks. But when I import such a file in Logic Studio it automatically puts it in a surround channel (using 5 channels). What I need is all 27 tracks devided over seperate monochannels.
    It's really really really urgent, I hope someone can help me!
    poul

    I'm really confused and interested about this post...
    I had no idea there was a way of interleaving 27 audio channels!
    Obviously it must be possible, but the only way it would be useful would be if your audio interface had at least as many outputs... In which case, why not use the channels on separate tracks and assign them to the correct outputs accordingly...
    Anyone out there please correct me if I'm wrong, but my guess is what you did is create an interleaved file of 27 individual tracks and its either a stereo or surround audio file, so your separate channels will only ever play in stereo or surround, which you can split in Logic, but only to 2 or 5 channels respectively....
    If I am still not correct, isn't it still a better idea to go back to the original audio piece (whatever you made it on) and have them play as separate tracks on the separate (27!) outputs respectively?

  • How to split pdf files also how to downsize a pdf file?

    how to split pdf files also how to downsize a pdf file?

    Hi Ali,
    If the PDF file you're starting with is larger than 100MB, ExportPDF won't be able to convert it.
    To convert a file of that size and to create separate files, you'll need Adobe Acrobat.  You'd need Acrobat to divide the file into smaller chunks for ExportPDF anyhow, so Acrobat is probably the best solution for you.  You can learn more about Acrobat here: http://www.adobe.com/products/acrobat.html
    Kindest regards, Stacy

  • Mapping Split 1:n to different communication channel

    Hi All,
    I have this scenario: File XML->XI7.0->Flat File(different encoding)
    The source file contains multiline of users data. I use mapping 1:n to split the users data into different message splitting on language.
    For example:
    INPUT:
    <users>
         <name>Pippo</name>
         <language>Japainese</language>
    </users>
    <users>
         <name>Paperino</name>
         <language>Chinese</language>
    </users>
    <users>
         <name>Topolino</name>
         <language>English</language>
    </users>
    <users>
         <name>Minnie</name>
         <language>Japainese</language>
    </users>
    <users>
         <name>Pluto</name>
         <language>Chinese</language>
    </users>
    OUTPUT:
    <msg1>
         <users>
              <name>Pippo</name>
              <language>Japainese</language>
         </users>
         <users>
              <name>Minnie</name>
              <language>Japainese</language>
         </users>
    </msg1>
    <msg2>
         <users>
              <name>Paperino</name>
              <language>Chinese</language>
         </users>
         <users>
              <name>Pluto</name>
              <language>Chinese</language>
         </users>
    </msg2>
    <msg3>
         <users>
              <name>Topolino</name>
              <language>English</language>
         </users>
    </msg3>
    This step is OK.
    Now, I would like to write the different message (msg1, msg2, msg3) to different flat file using different Communication channel
    because I want to use different file encoding parameter based on language.
    Can anyone tell me how this can be achieved?
    thanks a lot
    Daniele

    Hi,
    I've solved in this way:
    DESIGN:
    1 Data Type, N message types (one for each language), N inbound interfaces (one for each language).
    Then:
    1 single Message Mapping: 1 to N
    1 single Interface Mapping: 1 source interface, N target interfaces
    CONFIGURATION:
    1 Receiver Determination
    1 Enhanced Interface Determination, with interface mapping reference.
    N Receiver agreement with different Communication Channel.
    Thank you very much
    Bye
    Daniele

  • Help with splitting a file

    I'm Starting in Java programing and need some help.
    Based in the information of txt file, I need to split a file.txt into "n" .txt files, depending of the blocks thats the file containt. It's delimited by """".
    And put the name between "UZ0RN0" the second field
    Example:
    "01APR02","UZ0RN0","******************************************
    EMHA PNR.UZ0RN0 CR01APR 0419Z MEX BY GS BT
    MEX GS BT 01APR 0421Z 385310 MX
    "01APR02","TSCS44","******************************************
    etc.
    My question is how do I split a file into parts eg split test.txt into UZ0RN0.txt, TSCS44.txt, etc.
    Pls help. Where do I start? I just need help with the the manage of the java.nio.channels.FileChannel to generate several files
    Thanks a lot.

    Ok Thats is the final code:
    This program divide a file.txt in "n" files.txt's according of the block's that the file.txt contain and catch the name of the second tokent to name the new file.txt
    import java.io.*;
    import java.nio.*;
    import java.nio.ByteBuffer;
    import java.nio.channels.FileChannel;
    public class FileCopy {
         public static void main(String[] args) {
              if(args.length==0) {
                   System.out.println("No existe archivo a copiar. Application usage is: \n" +
                                            "java -classpath. Filecopy \" filepath\"" );
                   System.exit(1);
              File fromFile = new File(args[0]);
              if(!fromFile.exists()) {
                   System.out.println("Archivo a copiar. " + fromFile.getAbsolutePath()
                                       + ", no existe.");
                   System.exit(1);
              FileInputStream inFile = null;
              try{
                   inFile = new FileInputStream(fromFile);
              } catch(FileNotFoundException e) {
                   e.printStackTrace(System.err);
                   //assert false;
              FileChannel inChannel = inFile.getChannel();
              try{
              int SizeFile = (int)inChannel.size();
              ByteBuffer buf = ByteBuffer.allocate(SizeFile);
              int length = 0;
              int lengthArch = 0;
              int NoArch = 0;
              int NoComilla = 0;
              String str = new String("");
              try{
                   while ((length = inChannel.read(buf)) != -1 ) {
                        buf.rewind();
                        for (int i=0; i<length; i++) {
                        lengthArch++;
                        byte b = buf.get();
                        //Delimita caracter. Cada bloque tiene 6 "'s
                        if ( b == 34 ) {
                             NoArch++;
                             NoComilla++;
                        //Definir nombre del archivo
                        if (NoComilla==3) {
                             if ( b!=34) {
                             str += (char)b;
                        //Imprime archivo
                        if (NoComilla==6) {
                             fromFile = fromFile.getAbsoluteFile();                         //Asegura una ruta absoluta
                             File parentDir = new File(fromFile.getParent());          //Obtiene el directorio
                             File bFile = new File(parentDir,str + ".txt");               //Genera nuevo archivo
                             str = ("");
                             File toFile1 = createFile(bFile);
                             FileOutputStream outFile1 = null;
                             try{
                                  outFile1 = new FileOutputStream(toFile1);
                             } catch(FileNotFoundException e) {
                                  e.printStackTrace(System.err);
                                  //assert false;
                             FileChannel outChannel1 = outFile1.getChannel();
                             // Write the files
                             try {
                             inChannel.transferTo(((i + 1) - lengthArch),lengthArch,outChannel1);
                             outFile1.close(); // Close the output stream & the channel
                             System.out.println("Archivo " + (NoArch/6) +": " + ((i +1) - lengthArch) + " long " + lengthArch);
                             } catch(IOException e) {
                                  e.printStackTrace(System.err);
                                  System.exit(1);
                             lengthArch = 0;
                             NoComilla = 0;
                        //System.out.print((char)b);
                   buf.clear();
              System.out.println("Tamano del archivo de Origen " + SizeFile);
              System.out.println("EOF " + (NoArch/6) + " Archivos copiados.");
              catch(IOException e) {
                   e.printStackTrace(System.err);
                   System.exit(1);
              inFile.close();
              } catch(IOException e) {
                   e.printStackTrace(System.err);
                   System.exit(1);
              System.exit(0);
         // Metodo para crear un achivo y en caso de que exista hacer *+_backup.*
         public static File createFile(File aFile) {
              aFile = aFile.getAbsoluteFile();                         //Asegura una ruta absoluta
              File parentDir = new File(aFile.getParent());          //Obtiene el directorio
              String name = aFile.getName();                              //Obtiene el nombre del archivo
              int period = name.indexOf('.');                              //Busca el separador de la extension
              if(period == -1)                                             //Si no es
                   period = name.length();                                   //Lo coloca al final del String
              String nameAdd = "_backup";                                   //Agrega "Backup" al nombre
              //Crea el objeto archivo que es unico
              File backup = new File(name.substring(0,period)
                                       + name.substring(period));
              while (backup.exists()) {                                   //Si el nombre ya existe....
                   name = backup.getName();                              //Obtiene el nombre actual del archivo
                   period += nameAdd.length();                              //Agrega el separador
                   backup = new File(parentDir, name.substring(0,period) //agrega backup de nuevo
                                       + nameAdd + name.substring(period));
              return backup;
    This is the example of the file with 2 blocks
    "01APR02","UZ0RN0","******************************************
    EMHA PNR.UZ0RN0 CR01APR 0419Z MEX BY GS BT
    385310 MX
    ***1.ALCANTARA/JORGEALBERTO
    FONE-MEX/N000
    RCVD-PAX
    TKT -T/OK
    1 MX 7M 01APR MEXMTY HK 1 650A 815A
    AB * FLT 7 7A
    RCVD-PAX
    MEX GS BT 01APR 0419Z 385310 MX
    AB | FLT 7 7A
    RCVD-PAX
    MEX GS BT 01APR 0421Z 385310 MX
    "01APR02","TSCS44","******************************************
    .... PNR.TSCS44 CR25MAR 1834Z HDQ BY RM 1S
    ***1.1BRAVO/OCTAVIO
    FONE-MTY1-81503300*A/A528
    RLOC-HDQ1SJOXMWV/D4C2/86511574/MTY/1S/T/MX
    /MXN
    G FX-OSI YY 86511574 / VILLATOURS CENTRO P
    CC D4C2
    OSI MX TKNA 13235822315830
    SSRSEATMXHS1MTYMEX0070K28MAR.16B
    SSRSEATMXHS1MEXMTY0007K01APR.09B
    1 MX 70K 28MAR MTYMEX HK 1 645A 815A
    2 MX 7K 01APR MEXMTY HK 1 650A 815A
    X3 SSRSEATMXNN1MTYMEX0070K28MAR.16B
    RCVD-
    HDQ RM 1S 25MAR 2205Z
    X3 SSRSEATMXNN1MEXMTY0007K01APR.09B
    RCVD-
    HDQ RM 1S 25MAR 2231Z
    X3 SSRSEATMXKK1MTYMEX0070K28MAR.16BN
    X3 SSRSEATMXKK1MEXMTY0007K01APR.09BN
    RCHDQ1SJOXMWV/D4C2/86511574/MTY/1S/T/MX
    /MXN
    HDQ RM 1S 26MAR 0055Z
    Chao/Bye

  • Splitting Stereo Files

    How do you split stereo files in Logic? Anyone? Whenever I import a stereo file, it comes as one interleaved track. I change the track to accept stereo files (at the bottom of the fader in the lower left hand corner) and even when I double-click on the file, I see two channels, yet I can't alter them. Is there a way to fix this? Please help. Thanks.
    Josh
    G4   Mac OS X (10.3.9)  

    How do you split stereo files in Logic?
    I see two channels, yet I can't alter them. Is there a way to fix this?
    Is your question: "How do I split a stereo interleaved file into two mono files with Logic?" or is your question "How do I use split stereo (dual-mono) files in Logic?"
    For the first, there are options in the audio window to convert and split files.
    If it's the second, then you can turn "Universal Track mode" OFF in your audio preferences - now all channels are mono and stereo files are controlled by two mono faders.
    However, working in this mode is kinda ugly and has some disadvantages, but if you prefer it, fair enough.
    Finally, if you just want to be able to process left and right channels of a stereo file independently, you can always route to a couple of busses and pan left or right to get the two halves, or duplicate your stereo track and select "Left channel only" and "Right channel only" by click holding on the O-OO stereo channel selector.
    Does that help?

  • How effective splitting one file in to multiple in PI

    Hi Forum,
    Is it possible to split one file in to 20 or more using PI.
    If yes,how effective it is.

    Yes. And there are various ways for doing this.
    1. In the adapter engine while picking the flat file using option "Recordset per Message"
    2. Using multi-mapping message split.
    3. Using BPM loops.
    The effectiveness would depend upon the size of message and no of records it contain. e.g. if the size is small, say only 20 records, then splitting the message in 20 parts would not be a good option. But if the size is too large with say thousands of messages, then splitting would turn out to be effective.
    Regards,
    Prateek

  • Combine/Split Video files

    What is the best way to combine or split video files?  I have found a third party program that will do this (ScenalzyerLive), but I would think that Adobe Premiere or Photoship could to this as well.  My understanding is that Premiere does not actually change the root file, which is what I want to do.  I am less concerned about using Premiere to create great videos to burn to a dvd than to quickly combine my short videos into one video file (i.e. 13th birthday).  Conversely, I would like to split my long videos that are 2 hours long from my old, old 1992 camcorder (Sony Video 8 TRV21 Handycam with .avi files) into much shorter segments.
    With technology today, I think a lot of people simply want to combine and split videos instead of create great transitions from one scene to another.  Espceially now that you can use remote into your computer from your iphone to play videos (i.e through AirVideo).  Ease of finding relevant and organized clips is getting more important.

    The reason I change the original file is that I can watch my videos from my
    iPhone or iPad remotely (i.e. through the AirVideo app) in an organized
    manner.  I currently have nearly a terabyte of video that obviously cannot
    be stored on my iPhone or iPad.  Therefore,if I am away from my house and want
    to show someone my child's soccer game, I don't like having to remote into my
    home computer to play 30 clips (files), versus one clip (file) that was
    combined.  I think with "the cloud" direction we are going, and more and more
    people watching videos remotely.
    My editing of the original files is not extensive.  I simple cut out parts of
    scenes I don't want, and combine others.  ScenalyzerLive 4.0 does this very
    well.
    Since there is not an Adobe PRE app that allows me to watch videos remotely,
    this is the best alternative.

  • How to split PDF file by pages

    Is there any programming way to split PDF into pages, say one PDF file per page or specify page range to split PDF file?
    Thanks for your help.

    Yes it does. It disassembles pdf1 by extracting pages 1-3 and disassembles pdf2 by extracting pages 4-5. Then re-assembles the two subsets into a new PDF.
    You could extract page1 from pdf1 only and create a pdf, then page2 of pdf1 into a different PDF using something similar to:
    <?xml version="1.0" encoding="UTF-8"?>
    <DDX xmlns="http://ns.adobe.com/DDX/1.0/">
    <PDF result="Final.pdf">
         <PDF source="PDF1.pdf" pages="1"/>
    </PDF>
    <PDF result="Final2.pdf">
          <PDF source="PDF1.pdf" pages="2"/>
    </PDF>
    </DDX>
    You can also use the  PDFFromBookmarks tag to generate a new document for each level 1 bookmark created in a PDF.
    <PDFsFromBookmarks prefix="stmt">
         <PDF source="doc1.pdf"/>
    </PDFsFromBookmarks>
    You can get more info at http://livedocs.adobe.com/livecycle/8.2/ddxRef/000640.html
    Jasmin

  • How to upload a file which has more than 999 line item  through BDC ?

    Hello Techards
    Hi to all
    Can any body tell me how to upload a file which has more than 999 line item  through BDC for traction F-02 ?
    Thanks in advance.
    Shovan

    Hello Shovan,
    You split it up to post two accounting documents with the help of a "suspense" a/c.
    Say, you have to post the following line items below:
    line 1 - dr. - GL a/c X - $1000
    line 2 - cr. - GL a/c Y - $1
    line 3 - cr. - GL a/c Y - $1
    line 1001 - cr. - GL a/c Y - $1
    You cannot post the above as a single doc in SAP (because of technical reasons), so you need to break it up into 2 documents as below:
    Doc1
    line 1 - dr - GL a/c X - $1000
    line 2 - cr - GL a/c Y - $1
    line 3 - cr - GL a/c Y - $1
    line 998 - cr - GL a/c Y - $1
    line 999 - cr - SUSPENSE a/c - $3
    Doc2
    line 1 - dr - SUSPENSE a/c - $3
    line 2 - cr - GL a/c Y - $3
    Note that there is no incorrect impact on accounting as first we credit suspense a/c by $3 and next we debit the same suspense a/c by $3 as a result the effect is nil. Similarly, we credit $997 to GL a/c Y (which is less by $3) in the first doc which is compensated by the second doc by crediting the shortfall of $3.
    Hope this helps,
    Cheers,
    Sougata.

  • Multithreaded File Copy takes more time 1.5 times than single thread.

    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.nio.channels.FileChannel;
    public class TestMulti implements Runnable {
         public static Thread Th1;
         public static Thread Th2;
         String str = null;
         static int seqNumber = 1000000000;
         public static void main(String args[]) {
              Th1 = new Thread(new TestMulti("1_1"));
              Th2 = new Thread(new TestMulti("1_2"));
              Th1.start();
              Th2.start();
              try {
                   Th1.join();
                   Th2.join();
              } catch (Exception e) {
                   e.printStackTrace();
         public TestMulti(String str) {
              this.str = str;
         public void run() {
              File f = new File("C:/Songs2/" + str);
              File files[] = f.listFiles();
              String fileName = "";
              String seqName = "";
              String seq = "";
              int sequenceNo = 0;
              try {
                   for (int j = 0; j < files.length; j++) {
                        File musicFiles[] = files[j].listFiles();
                        for (int k = 0; k < musicFiles.length; k++) {
                             seq = "18072006";
                             seqName = seq + seqNumber;
                             sequenceNo = 10000 + seqNumber % 100;
                             seqNumber = seqNumber + 1;
                             fileName = musicFiles[k].getName();
                             String fileExt = fileName.substring(fileName.length() - 3,fileName.length());
                             String targetFile = "C:/Songs1/" + sequenceNo;
                             File fi = new File(targetFile);
                             if (!fi.exists()) { fi.mkdir(); }
                             targetFile = "C:/Songs1/" + sequenceNo + "/" + seqName+ "." + fileExt;
                             FileInputStream fin = new FileInputStream(musicFiles[k]);
                             FileChannel fcin = fin.getChannel();
                             FileOutputStream fout = new FileOutputStream(targetFile);
                             FileChannel fcout = fout.getChannel();
                             fcin.transferTo(0, fcin.size(), fcout);
                             fout.flush();
                             fcout.close();
                             fcin.close();
                             fout.close();
                             fin.close();
              } catch (Exception e) {
                   e.printStackTrace();
    Multithreaded File Copy takes more time 1.5 times than single thread.
    Is there any issue with this code. Please help me.

    If all of your threads are doing CPU-intensive work, or all are doing I/O to the same interface (for example, writing to the same physical disk), then multithreading would not be expected to help you.
    Multithreading does not magically make your CPU able to do more work per unit time than it could otherwise.
    Multithreading does not magically make your network interface or disk controller able to pump more bytes through than it could otherwise.
    Where multithreading helps (some or all of this has already been mentioned):
    * When you have multiple, independent CPU-bound tasks AND multiple CPUs available on which to execute them.
    * When you have tasks that involve a mix of CPU-bound and I/O-bound work. The CPU-bound stuff can crank while the I/O-bound stuff waits for bytes to be written or read, thus making use of what would otherwise be CPU "dead time."
    What you're doing does not fit either of those scenarios. Copying a file is pure I/O. If the source and destination file are on the same phsyical disk or controller, adding threads only adds overhead with no real possibility to do more work per unit time.
    If your source and destination are on different disks or controllers, then it's possible that you could get some benefit from multithreading. While one thread is waiting for bytes to be written to the target disk, the other thread can be reading from the source disk.

  • Duplicate file  transder problem  vai channel

    Hi,
    I am trying to transfer file via channel. I have constructed a multi thread architecture and all host can be act as both server and client. But I have come across a problem.*It works good at first time, But when I send a file more than once, I obtain only an empty file at destination side. What can be the reason*.
    I had faced some similar mistake before while serializing and transfering an object via socket. At first time object were sent but at second time just pointer were sent because of some performance issues. can be Any relevance between these two problem.
    Also, I have been struggling to construct a p2p file transfer system. So I ensure that All host can act as both server and client. But I am not sure if it is enough or not to make a system peer2peer. What else i suppose to do to make my file transfer program more likely be a p2p. If you give link of some relevant document I would be very happy..

    Server Side
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.PrintWriter;
    import java.net.InetAddress;
    import java.net.InetSocketAddress;
    import java.net.Socket;
    import java.net.UnknownHostException;
    import java.nio.channels.FileChannel;
    import java.nio.channels.ServerSocketChannel;
    import java.nio.channels.SocketChannel;
    public class FileTransferMakeMeServer {
         public Socket clientSocket = null;
         public ServerSocketChannel serverSocketChannel = null;
         private InetSocketAddress isa = null;
         private InetAddress myInetAddress = null;
         private int port;
         public FileTransferMakeMeServer(String host,int port) {
              this.port = port;
              try {
                   myInetAddress = InetAddress.getByName(host);
              } catch (UnknownHostException e) {               
                   e.printStackTrace();
              isa = new InetSocketAddress(myInetAddress, this.port);     
         public void acceptClient() {
              try {
                   serverSocketChannel = ServerSocketChannel.open();
                   serverSocketChannel.configureBlocking(true);               
                   serverSocketChannel.socket().bind(isa);               
                   serverSocketChannel.socket().setSoTimeout(25000);     
                   clientSocket = serverSocketChannel.socket().accept();     
              } catch (IOException e) {
                   System.out.println(" Make Me Server : Exception at acceptClient "+e.getStackTrace());               
         public void sendFileNameAndSize(File sendingFile) {
              PrintWriter bufWriter = null;
              SocketChannel  channel = null;
              if ( sendingFile.exists() ) {
                   channel = this.clientSocket.getChannel();
                   try {
                        bufWriter = new PrintWriter(channel.socket().getOutputStream(),true);
                        bufWriter.println(sendingFile.getName());
                        bufWriter.println(sendingFile.length());
                   } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
              } else {
                   System.out.println("This File does not exists ");
         public void sendThisFile (File file) {
                SocketChannel channel=this.clientSocket.getChannel();  
                 FileChannel srcFileChan = null;
                   try {
                        srcFileChan = new FileInputStream(file).getChannel();
                         long bytesTransfered;
                           bytesTransfered=srcFileChan.transferTo(0,file.length(),channel);
                           System.out.println(bytesTransfered+" bytes actually transfered.");
                   } catch (FileNotFoundException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   } catch ( IOException e ) {
                        e.printStackTrace();
                 try {
                        srcFileChan.close();
                   } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
         private InetAddress whatIsMyInetAddress() {
              try {
                   return InetAddress.getLocalHost();
              } catch (UnknownHostException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
                   return null;               
         public void setPort(int port) {
              this.port = port;
    }Client Side :
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.net.InetAddress;
    import java.net.InetSocketAddress;
    import java.net.UnknownHostException;
    import java.nio.channels.FileChannel;
    import java.nio.channels.SocketChannel;
    public class FileTransferMakeMeClient {
         public InetAddress destAddr = null;
         public InetSocketAddress inetSocketAddress = null;
         private int destPort;
         SocketChannel socketChannel = null;
         String host = null;
          public String incomingFileName = null;
         public int incomingFileSize = 0;
         public FileTransferMakeMeClient(String host, int port) {
              this.host = host;
              this.destPort = port;
              try {
                   destAddr = InetAddress.getByName(host);               
                   inetSocketAddress = new InetSocketAddress(destAddr, this.destPort);
                   System.out.println(inetSocketAddress.toString());
              } catch (UnknownHostException ue) {
                   System.out.println("Make Me Client : Exception at constructor "+ue.getStackTrace());
         public void connectToserver() {
              try {
                   this.socketChannel = SocketChannel.open();
                   if ( this.socketChannel.connect(inetSocketAddress) ) {
                         System.out.println("Connection established with Server.");
                   } else {
                        System.out.println("Connection can not establish with destination computer.");
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         public String getFileNameAndSize(){
               SocketChannel sockChan=this.socketChannel;
               InputStreamReader isr = null;
               BufferedReader str = null;
                   try {
                        isr = new InputStreamReader(sockChan.socket().getInputStream());
                        str = new BufferedReader(isr);
                        incomingFileName=str.readLine();
                        incomingFileSize=Integer.parseInt(str.readLine());
                   } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                 System.out.println(incomingFileSize);
                System.out.println(incomingFileName);
                /* I have added this method to avoid from duplication but there is no use of it */
                removeFileIfExist(incomingFileName);
                return incomingFileName; 
         private void removeFileIfExist(String fileName){
              File file = new File(fileName);
              file.delete();
         public String getFileName() {
              return this.incomingFileName;
         public int getFileSize() {
              return this.incomingFileSize;
        public void getThisFile (String fileName,int fileSize) {
          File incomingFile=new File(fileName);
          int incomingFileSize=fileSize;     
              try {               
                  FileChannel destFileChan=new FileOutputStream(incomingFile).getChannel();
                  SocketChannel sockChan=this.socketChannel;
                  if(socketChannel==null){
                      System.out.println("clientSocket was not created for a SocketChannel");
                  destFileChan.transferFrom(sockChan,0,incomingFileSize);
                   destFileChan.close();
            System.out.println ("Bytes actually transfered file size : "+incomingFile.length()+" bytes");      
               } catch (IOException ex) {
                   ex.printStackTrace();
    }I have added both Server and client side.. When i transfer a file it works, but when try to send same file twice i onle manage to see an empty file at destination side. There is no use of removing the file from destination side before resend it. Same problem still ocuurs.
    it would be very kind of you if you help..

Maybe you are looking for

  • Video card cannot handle 3 monitors

    Hello, I have been trying to set up 2 external monitors on either side of my mac. I have all of the equipment for all 3 displays (The 2 external monitors are both 24'' widescreen monitors) but I believe that it's my video card that is causing a very

  • Multiple line printing in SAPscript

    Hello Friends, I have problem in printing multiple lines on sap script. I have created a window. and i have creted a text eliment 'MULTIPLE it. Under this Text eliment i have code as below. /E    MULTIPLE AS  & internalTABLE-FIELD& I have fetched dat

  • DataGrid, selecting, highlighting, navigating to a row

    In Flash MX 2004 I would like to have a row selected after the DataGrid has been populated. Much like a list box <select> in html, I would like to make one row "selected". It must be navigated to and highlighted to visually indicate the selection. Ho

  • Subscription to DPS

    I have a subscription to DPS with Creative Cloud and I have to design an app for a client of mine that will operate on its own as a developer / publisher to the Apple Store and the Google Store. Can I use my subscription to DPS to publish the IPA or

  • Help about RtmpMessage

    Nearly I have found some RTMP message at type 0x54 ,0x56,0x49,0x48(no doc) for developing applications between servers.Can you give me some docs or sources about it. Training Better if have.