Embedding an file within another

Basically i want to embed a few files, for example pngs image between some xml tags in a new file. How can I store the file between the tags? I've tried to store a string based on a byte array for the file, however this doesn't seem to work and I think data is being lost when I convert it to a string... What would be the best way to embed the file?

I might not completely be getting you but....
Use a file stream (get the file's bytes) and just write them to the
stream of your new saved file.
http://java.sun.com/j2se/1.3/docs/api/java/io/FileInputStream.html
DONT turn the file into a string and then write the string, lol.

Similar Messages

  • How to load swf files within another SWF and still maintain actionscript

    Hi I was wondering how to embed an swf file inside another
    swf file, If i simply import it to the stage or the library it will
    become a symbol but the actionscript interactivity is lost, another
    question is can I have an actionscript 2 file play within an
    actionscript 3 file?
    The actionscript 2 code for embedding is something like this:
    don't mind the _mc titles
    this.cargame_mc.onRelease = function (){
    loadMovie ("Crusty Rusty's.swf", empty_mc)
    empty_mc._xscale=60;
    empty_mc._yscale=55;
    empty_mc._x=210;
    empty_mc._y=140;
    Please Help its for my uni portfolio, i want to use as2, but
    if i do i would lose the 3d possibility of as3, is there any way to
    export an as3 file and then embed in as2, using a program or
    anything? Thanks!I
    I would just like to say thanks in advance because everyone
    on here is so helpful!

    you can load an as2 file into an as3 file (using the loader
    class) and the actionscript will work in both.

  • How to unzip a zip file within another zip file

    I've got code that successfully processes a file within a zip file.
    But now the zip file can also contain other zip files. How can I
    process a zip nested within a zip without actually extracting the
    files? It looks like I need a ZipFile object to be able to take
    advantage of the zip classes for reading zip entries. But the
    ZipFile methods want as an argument an actual file, as opposed
    to some object in memory. I can read the 'inner' zip file into a
    ZipInputStream object, but then how do I make that available for
    processing as a ZipFile? I've searched all over and cannot find
    anything anywhere that talks about working with nested zip files.
    Does anyone have any sample code that does this? Thanks!

    I have successfully done it.
    You cannot have the code - it is proprietary.
    However here are a few pointers:
    o Use ZipStreams rather than ZipFile.
    o ZipStream is just a filter on a stream, so you can have a zipstream open, read a ZipEntry, then ask for a substream for the stuff up to the next ZipEntry. Put a second ZipStream on that substream.
    o As I recall you have to watch out that your inner ZipStream does not do a close. (Everything will get closed.) Instead, there is another ZipStream method that will close without closing all the underlying streams.
    Hope this helps.

  • Cannot open embedded PDF files within a PDF

    Is there a way to open a PDF file (by double clicking) that is within a PDF file? The file was created in Word 2007 by inserted the pdf file as an object. I am using Acrobat Professional 9.

    Can you insert the PDF file in the Word document in another format to make it clickable in the newly converted PDF?

  • Compiling one java file within another java program

    Hi all,
    I want to compile one java file say one.java within a java program say second.java.. i simply have no idea as how to proceed ..pls help!!

    http://onesearch.sun.com/search/onesearch/index.jsp?qt=dynamically+compile&subCat=siteforumid%3Ajava31&site=dev&dftab=siteforumid%3Ajava31&chooseCat=javaall&col=developer-forums
    Just to give you an idea.

  • How to call swf file within another swf file using xml

    hii,
    I am facing some problem to call a swf file via xml when this xml file loaded it calls another swf file which includes a new xml file. now if i call this nested swf calling without xml it works but in case case of xml it is not showing the result. i m confused. how to nested xml file calling done in as2/as3. i need some logics. thanks in advance

    This is the AS3 forum and your posting involves AS2 code.  You should repost in the AS2 forum...
    http://forums.adobe.com/community/flash/flash_actionscript
    Aside from that, your problem might lie in the following lines...
    _root.createEmptyMovieClip("sub_container1", 1);
    loadMovie(sub_SWFPath[1].attributes.url, "sub_container1");
    You create the new movieclip, sub_container1,  in the _root, but you do not assign the loadMovie to load into that same movieclip (unless you have a _lockroot = true assigned in your sub-swf).  In any case, you should repost in the AS2 forum to pursue resolution.

  • Writing to file within another package

    Hi all, I had a search in the forums, but I couldn't find what I was looking for.
    I have what I consider to be good code organised into packages that make sense, but for some reason, I cannot programmatically save Files to where I want to.
    If I create them manually, they read fine, (with
    File xmlFile = new File(this.getClass().getClassLoader().
            getResource("data/records.xml").getFile());
    SAXBuilder builder = new SAXBuilder();
    Document xml = builder.build(xmlFile);).
    So now I want to create this file programatically.
    The code I have is
    // Make a new file
    File xmlFile = new File("data/" + p.getName() + "deck.xml");
    xmlFile.createNewFile();But that gives (probably unsuprisingly)
    java.io.IOException: The system cannot find the path specified
         at java.io.WinNTFileSystem.createFileExclusively(Native Method)
         at java.io.File.createNewFile(File.java:883)
         at gamepackage.PlayerDeck.updateDeck(PlayerDeck.java:99)When I create a file in the default package (probably frowned upon) with
    // Try create file in default package
    File xmlFile = new File(p.getName() + "deck.xml");
    xmlFile.createNewFile();It works as expected (except my file is in the default package).
    So, it must be a package problem. I have tried messing around with mkdir(), but that creates Files in directories called "data" rather than my existing package "data" (which confuses my little soul, because I thought packages were treated as directories (see JAR files etc)), and I have tried messing around with URIs and URLs, to little avail. Also, ClassLoaders such as
    File xmlFile = new File(this.getClass().getClassLoader().
                      getResource("data/" + p.getName() + "deck.xml").getFile());wont work, because I need to create the file before I can call .getFile(); but I need the File to call createNewFile() on.
    Please can you point me in the right direction? Many thanks in advance.

    Hemmels wrote:
    I've been playing CS and BF2142 and went for a jog, and we're into double figure views It's not a bad question, and you presented your problem well, it's just... well it isn't done this way. Packages are really intended to solve +this* problem. But the organization (and unique identifying) of source files problem.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Is it recommended to link an illustrator file within another illustrator file?

    Considering best practices for design reproduction... and that the linked file will contain a linked photoshop image.

    I believe once you link an image, wherever it goes goes the image, too.  Things get dicey when you move the image from where it was linked from, but if you have not moved the image and it shows it is still linked in the Links palette of the first Illustrator file ( which is placed into a new Illustrator document ), then the image remains linked.  So, to answer your question, no need to link again in the second file ( unless the link was somehow broken ).

  • Embedded PDF files in PPTX file: how do I extract them?

    Hi everyone,
    I have PowerPoint files (.pptx) that include embedded PDF files within them. They appear on Windows PowerPoint as clickable icons that open the PDF in Acrobat or some other PDF reader. In Keynote, however, the same icons do nothing, as I assume that Keynote does not support embedded PDFs. I really need access to those PDFs for work, and I don't have access to PowerPoint here. Is there any way that these files can be accessed by Keynote?
    -Thanks, John

    is this windows Powerpoint or Mac Powerpoint?
    If it is a windows powerpoint, then they are individual OLE Objects, not a single embedded PDF file.
    If its a Mac Powerpoint, my knowledge is a bit outdated as I dont use the Mac version these days to comment with certainty, but right click > show package contents and if there is an embedded PPt file it will be listed in the package comtents.
    Please report back how you get on.

  • Why does the Yosemite Finder become unresponsive when moving a file within my USB Flash stick?

    Why does the Yosemite Finder become unresponsive when moving a file within my USB Flash stick? I have to Relaunch the Finder to get it working again.
    Background / other symptoms:
    The Flash drive in question has been formatted HFS.
    I get no error messages, including on the Console, and no sound indicators.
    I can copy files, using the Finder, from a hard-drive to the usb flash drive with no problem.
    Finder copying on this stick works just fine on my other Mac.
    I can move files within another (FAT32-formatted) USB flash drive.
    The quirky USB HFS Flash drive works fine on my other Mac.
    Outside of the Finder, I can use mv just fine to move the files on the HFS flash drive.
    If the HFS-formatted Flash drive were faulty, I would at least expect some sort of error in the Console app, but perhaps not from the Finder.

    Why does the Yosemite Finder become unresponsive when moving a file within my USB Flash stick? I have to Relaunch the Finder to get it working again.
    Background / other symptoms:
    The Flash drive in question has been formatted HFS.
    I get no error messages, including on the Console, and no sound indicators.
    I can copy files, using the Finder, from a hard-drive to the usb flash drive with no problem.
    Finder copying on this stick works just fine on my other Mac.
    I can move files within another (FAT32-formatted) USB flash drive.
    The quirky USB HFS Flash drive works fine on my other Mac.
    Outside of the Finder, I can use mv just fine to move the files on the HFS flash drive.
    If the HFS-formatted Flash drive were faulty, I would at least expect some sort of error in the Console app, but perhaps not from the Finder.

  • Call a external SWF by press the button within another SWF file but the second SWF file play Externely

    Hello Guyz.
    i am working on Macromedia Flash 8 and i just want to call a external SWF when i press the button within another SWF file.......but the second SWF file play Externely............can any one knows the code.... AS2

    try this
    http://www.actionscript.org/forums/showthread.php3?s=&threadid=28123

  • Embeded OC4J server within JDeveloper does not pick latest JAR files.

    Hi,
    Currently OC4J seems to be using an older version of JAXB1.0. Hence I created a shared library in my standalone OC4J server and imported the shared library while deploying my applicatoin in the ClassLoader task.I am trying to replicate the same in
    my embeded OC4J server within JDeveloper.
    I followed as indicated in readme.txt file in the \j2ee\home\shared-lib\ folder.
    1) I created a folder called "jaxb" within /j2ee/home/shared-lib/. I then created a folder with the name "2.0" indicating the version number of the API.
    2) I then added the relevant jaxb JARS to the jaxb/2.0 folder.
    3) In the server.xml file available under /j2ee/home/config/ , I added the following entries.
    <shared-library name="jaxb" version="2.0">
              <code-source path="jaxb-api.jar"/>
              <code-source path="activation.jar"/>
              <code-source path="jaxb1-impl.jar"/>
              <code-source path="jaxb-impl.jar"/>
              <code-source path="jsr173_1.0_api.jar"/>
              <code-source path="jaxb-xjc.jar"/>
         </shared-library>
    I am still facing the issue where my embedded OC4J server is picking up the jaxb version 1.0.
    What are the steps that needs to be taken to ensure that the embeded OC4J
    takes in the jaxb2.0 version.

    Refer
    Re: SUN Jaxb2.0 incompatible with OC4J included in JDEV/OC4J ??

  • Indexing - one document embedded within another

    Greetings,
    I am testing KM indexing in terms of examining how Trex handles the indexing of a scenario where you have one document embedded within another document.
    In this case I have chosen to embed a PowerPoint (.ppt document) within a Word document (.doc document).
    I index the Word document, expecting to therefore also have the PowerPoint document within indexed. When I search for the text within the embedded .ppt document I do not get results and therefore assume that Trex cannot index documents which are embedded in other documents. Please advise if I am correct. 
    Regards,
    Keith

    >
    Keith Kibuuka wrote:
    > Greetings,
    >
    > I am testing KM indexing in terms of examining how Trex handles the indexing of a scenario where you have one document embedded within another document.
    >
    > In this case I have chosen to embed a PowerPoint (.ppt document) within a Word document (.doc document).
    >
    > I index the Word document, expecting to therefore also have the PowerPoint document within indexed. When I search for the text within the embedded .ppt document I do not get results and therefore assume that Trex cannot index documents which are embedded in other documents. Please advise if I am correct. 
    >
    > Regards,
    > Keith
    Hi Keith,
    yes that's exactly correct from my knowledge's point of view.
    I had a similar issue with an HTML-document that contained another HTML-document as iframe and this is also not possible (I asked SAP about this, so for this I am sure).
    TREX does anyway a transformation for all sort of documents to HTML documents (so also DOCs or PDFs are firstly converted to HTML before they are indexed). And in here TREX never follows any embedded content.

  • Help,I am trying to get function calls from a flash file within an embedded SMIL file to work with Netscape.

    Basically, the functions are on the html document in which the SMIL file is embedded and the flash file within the SMIL file calls the function from a button.
    The code on the html doc determines whether the browser is Netscape or IE and then executes the appropriate code. For ex. for Netscape the function is:
    document.radio.SetSource('video.smi')
    and for IE the function is:
    radio.SetSource('video.smi')
    All the function calls work fine in IE but in Netscape it does nothing.

    Basically, the functions are on the html document in which the SMIL file is embedded and the flash file within the SMIL file calls the function from a button.
    The code on the html doc determines whether the browser is Netscape or IE and then executes the appropriate code. For ex. for Netscape the function is:
    document.radio.SetSource('video.smi')
    and for IE the function is:
    radio.SetSource('video.smi')
    All the function calls work fine in IE but in Netscape it does nothing.

  • Replace a string within text file to another string

    hi everybody
    i wich to replace some word writed in text file to another word,,,,for example i want to replace all word when the word is "SOLARIS" to "solaris" .
    anyone have an idea to resolve this prob via command or script,plz respond me.
    thanks

    To elaborate on alan.pae's response:
    sed 's/SOLARIS/solaris/g' oldfilename > newfilename
    -systemstate

Maybe you are looking for

  • External Hard Drive assistance?

    Hard drives is a vicious arena. Everybody makes the best and they all are trash at the same time. I am an average user and looking to upgrade by external hard drive. I want Firewire 800  and want a small compact 2nd drive with USB2.0 bus - that I can

  • Illustrator CC2014 Error message "Alcid.dll is missing from your computer. etc."

    I have been experiencing a problem with Illustrator CC2014. This occurs after I get out of Illustrator and then attempt to open the software up the next morning. I get the following message; "The program can't start because Alcid.dll is missing from

  • New Installation Help Needed - Connection Timeout

    New to the home and Verizon service from a combination modem/router. In Airport Utility, chose to connect to a wireless network and add AE in order to extend my current network (the issue is distance to an important computer). The utility seems to ru

  • Change the description of a field in a SAP QUERY

    Can i change the description of a field in a SAP QUERY report in the output of the report.or only the standard descriptions can be displayed. Edited by: mysap query on May 12, 2009 7:23 AM

  • DBMS_XMLGEN attributes - HELP!!

    I am using DBMS_XMLGEN to create purchase order xml documents. Nested objects types are used to represent the complex structure required. I know that by using the '@' symbol as a prefix to an attribute name, that field will become an attribute of the