Java.Io.File conversion

Can I create a Java.Io.File from a Binary using some fuego object?

You should be able to use the standard Java way of creating a File using a byte array - FileOutputStream. Just use the Binary type in your PBL code wherever you would normally supply a Java byte array - it's basically treated the exact same way.

Similar Messages

  • Sender File Adapter with file conversion

    Hi guys,
    I’m using a Sender File adapter with file conversion. The message to be processed has a structure with fixed lengths and in your content are some values that needs to be ignored.
    An example:
    value1  <b>value2</b>  value3…
    I want to ignore <b>value 2</b> but I can’t find a parameter for that! Do I need to define dummy fields on my data type and ignore those fields during mapping? Or there is a specific parameter for that?
    Thanks in advance,
    Ricardo.

    hi,
    there always is another way:)
    you can import the whole line to one field
    and cut it inside the adapter module
    (then you can define start and stop of the substring that you need to use)
    but of course it's not standard even though it's quite easy to achieve in java
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Java.io.File extension proposal

    Hi, i have made an extension to java.io.File that right now lets you find out free disk space, used disk space and all mounted volumes.
    I currently have code for linux only and i'm looking for help porting it to win32.
    I put up a project page on http://mog.se/mogio.html
    I'm aware of projects like JConfig and i'm not interested in it because of their license and their totally different API. se.mog.io.File extends File to work just like a normal java.io.File with some additional methods, in the spirit of java.io.File. :)
    Any help in coding or feedback is appreciated, be it negative or positive. :)
    /mog

    listMounts() is intended to be like listRoots() but
    show mounted volumes below the root.I thought about this too, but the mounts themselves wouldn't really be `below' the root as one could mount anywhere in the Unix fs tree. Now wouldn't the mounts actually be the roots in Winblows?
    What would be nice would be some metric given any given java.io.File directory, such as I may know that the directory has a metric that lets me know the quality of the disk such as a good SCSI array for persistent storage vs. a single IDE for a scratch or temp dir.
    I'm not aware of AS/400 or any anti-OS pro-JVM devices
    but would java.io.File be applicable there anyway?File would be of course applicable for the IFS on AS/400, but it's been a LONG time (read deploying on 1.1 V4R?) since I've used the 400 and I don't have detailed knowledge on storage management there, so I may need to defer to someone on that architecture to know about mounts, etc.
    There is however a really small group of people who feel that all storage should be secondary or auxillary storage (I'm partially one of them) and when you need to access data, you peek at a memory location (to which of course you would have access) or pointer|reference|et al. The OS is then responsible for intelligently paging that data in/out of primary memory for access, like a super-mega-MM, or conversely just read from the secondary itself, either way the VM wouldn't care. We're a ways away from an OS/JVM combo like this though and I feel it will be a long time until we get rid of the traditional thought process of filesystems.

  • How to convert oracle form fmb file to java swing file using Jdeveloper

    how to convert oracle form fmb file to java swing file using Jdeveloper.Please explain with detailes steps if possible or please give a link where it is available
    thanks
    Message was edited by:
    user591884

    There is no automatic way to do this in JDeveloper. I know there are some Oracle Partners offering forms to java conversion, I don't know how much of their tools are automated and done with JDeveloper. With JDeveloper+ADF you basically rewriting the Forms application from scratch (and using ADF is helpful during this process).

  • Java5 printf and java.util.UnknownFormatConversionException: Conversion = '

    As a long time C/C++ programmer I was pleased to see printf added to Java5, however one of (IMO) the most useful features - using an asterisk in the format string to indicate a fields width modifier is to be taken from the varargs list doesn't appear to work:
    Given:
         #include <stdio.h>
         int
         main()
                 printf("[%*d]\n", 8, 2);
                 return 0;
         }I get:
         [       2]
    However, given:
         public class Main
             public static void main(String[] args)
                 System.out.printf("[%*d]\n", 8, 2);
         }I get:
         Exception in thread "main" java.util.UnknownFormatConversionException: Conversion = '*'
              at java.util.Formatter.checkText(Formatter.java:2500)
              at java.util.Formatter.parse(Formatter.java:2482)
              at java.util.Formatter.format(Formatter.java:2411)
              at java.io.PrintStream.format(PrintStream.java:899)
              at java.io.PrintStream.printf(PrintStream.java:800)
              at Main.main(Main.java:19)
         Process finished with exit code 1Not at all the same thing.
    It fails on Windows and Mac.
    The way I read the documentation I believe this should work.
    Am I misinterpreting the doc, doing something wrong, or is this a bug?
    Thanks!

    Thanks, I understand that. What I am referring to is this from the docs:
    http://sharkysoft.com/archive/printf/docs/javadocs/lava/clib/stdio/doc-files/specification.htm
    1.3.1. variable width
    It is possible to specify a variable field width, where one of the arguments in the argument vector is used to determine the field's width. This is indicated in the format string by using an asterisk character ('*') in place of the actual width value. The corresponding value in the argument list must be an int, and must precede the actual argument being formatted.
    Example: If the format specifier is "%*hd", then there are two arguments in the argument list corresponding to this format specifier. The first argument is an int, indicating the field width, and the second argument is converted as a signed short.

  • AutoVue server does not support file conversion

    We've developed the ISDK for viewing the files and it's working fine. As the next step, it's required to use AutoVue Web Services to convert the files to pdf and jpeg formats.
    I've deployed the AutoVueWS.war and VueServlet.war files in our application server and ping method works fine. But the 'Convert' method in web services gives below error.
    javax.xml.ws.soap.SOAPFaultException: convert failed:File conversion not supported. ConvertOption[|Format:PDF|ScaleType:TYPE_SIZE|ScaleFactor:0|Width:800.0|Height:600.0|PageType:RANGE|FromPage:1|ToPage:1|ColorDepth:-1|FileName:c:/output/readme.txt-1357634753084.1.PDF|StepsPerInch:0.0|CameraView:NONE]
         at com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:178)
         at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:111)
         at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
         at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
         at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
         at $Proxy32.convert(Unknown Source)
         at autovuewsclient2.AutoVueWSClient2.main(AutoVueWSClient2.java:50)
    The client code is as below.
    VueBeanWS_Service service = new VueBeanWS_Service();
    //create proxy
    VueBeanWS proxy = service.getVueBeanWSPort();
    //call autovue ping Web method
    System.out.print (proxy.ping("Hello from Java") );
    //Call the convert Web method.
    try{
    ConvertOption option = new ConvertOption();
    option.setFormat(Format.PDF);
    option.setPage(1);
    option.setScaleType(ScaleType.TYPE_SIZE);
    option.setHeight(600);
    option.setWidth(800);
    String URI = "http://wordpress.org/extend/plugins/about/readme.txt";
    byte[] file = proxy.convert(URI, option, null, false);
    FileOutputStream fos = new FileOutputStream("c:/temp/output1.pdf");
    fos.write(file);
    fos.close();
    catch(Exception e){
    e.printStackTrace();
    File in the above URI is downloaded to the AutoVue Server properly. But the conversion is failed.
    Please help me to solve this error.

    Hi,
    To convert files to PDF format, AutoVue uses a built-in proprietary PDF print driver called the AutoVue Document Converter. The above error may occur if this print driver is not properly installed. To install the AutoVue Document Converter print driver, execute the InstallPdfPrintDriver.exe program from your AutoVue installation directory. Before proceeding with the install make sure the "Print Spooler" service is started.
    Here are the necessary steps in order to enable the "Print Spooler":
    1. Go to Start > Settings > Control Panel > Administrative Tools.
    2. Select Services.
    3. Select the "Print Spooler" service and make sure to start it.
    4. Try to install the AutoVue Document Converter print driver.
    Thanks,
    Daniel

  • Java.io.File not found in JDK 1.4

    why the java.io.file is deprecated.
    Frans

    [fthamura],
    why the java.io.file is deprecated.Probably because in J2SE 1.4, the New I/O package java.nio package provides scalable I/O operations for files. Through the File channels, a programmer will be able to provide memory-mapped buffers, improved file locking mechanism and faster I/O transfers with the new API package.
    FransHTH.
    Allen Lai
    Developer Technical Support
    SUN Microsystems
    http://www.sun.com/developers/support/

  • Query not running in sql developer, neither connecting to database. Following error - java.util.UnknownFormatConversionException: Conversion = '0'. Please reply soon.

    when i try to connect to oracle 11g rdbms, following error occurs -->
    1. sql developer version - 4.0.3.16 (jdk - jdk1.7.0_51 externally installed) -- newly installed, giving following error when try to connect to oracle 11g rdbms.
    2. sql developer version - 3.1.07.42 (jre1.6.0 included) -- used to run earlier.
    java.util.UnknownFormatConversionException: Conversion = '0'
      at java.util.Formatter.checkText(Formatter.java:2547)
      at java.util.Formatter.parse(Formatter.java:2533)
      at java.util.Formatter.format(Formatter.java:2469)
      at java.util.Formatter.format(Formatter.java:2423)
      at java.lang.String.format(String.java:2797)
      at oracle.dbtools.raptor.backgroundTask.internal.SimpleRaptorTaskUI.getFormattedTime(SimpleRaptorTaskUI.java:288)
      at oracle.dbtools.raptor.backgroundTask.internal.RaptorTaskUI.setState(RaptorTaskUI.java:43)
      at oracle.dbtools.raptor.backgroundTask.internal.SimpleRaptorTaskUI.<init>(SimpleRaptorTaskUI.java:63)
      at oracle.dbtools.raptor.backgroundTask.internal.RaptorTaskUI.<init>(RaptorTaskUI.java:36)
      at oracle.dbtools.raptor.backgroundTask.ui.TaskProgressViewer$4.<init>(TaskProgressViewer.java:346)
      at oracle.dbtools.raptor.backgroundTask.ui.TaskProgressViewer.createTaskUI(TaskProgressViewer.java:346)
      at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager.initViewers(RaptorTaskManager.java:373)
      at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager.access$400(RaptorTaskManager.java:45)
      at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$4.run(RaptorTaskManager.java:299)
      at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager.invokeInDispatchThreadIfNeeded(RaptorTaskManager.java:313)
      at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager.addTask(RaptorTaskManager.java:302)
      at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager.addTask(RaptorTaskManager.java:200)
      at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager.addTask(RaptorTaskManager.java:161)
      at oracle.dbtools.worksheet.editor.OpenWorksheetWizard.invoke(OpenWorksheetWizard.java:425)
      at oracle.ide.wizard.WizardManager.invokeWizard(WizardManager.java:446)
      at oracle.ide.wizard.WizardManager.invokeWizard(WizardManager.java:390)
      at oracle.dbtools.worksheet.editor.WorksheetOpenController$1.run(WorksheetOpenController.java:84)
      at oracle.dbtools.worksheet.editor.WorksheetOpenController.openWorksheetWizard(WorksheetOpenController.java:90)
      at oracle.dbtools.worksheet.editor.WorksheetOpenController.handleEvent(WorksheetOpenController.java:49)
      at oracle.ide.controller.IdeAction$ControllerDelegatingController.handleEvent(IdeAction.java:1482)
      at oracle.ide.controller.IdeAction.performAction(IdeAction.java:663)
      at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:1153)
      at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:618)
      at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
      at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
      at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
      at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
      at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
      at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
      at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
      at java.awt.Component.processMouseEvent(Component.java:6505)
      at javax.swing.JComponent.processMouseEvent(JComponent.java:3320)
      at java.awt.Component.processEvent(Component.java:6270)
      at java.awt.Container.processEvent(Container.java:2229)
      at java.awt.Component.dispatchEventImpl(Component.java:4861)
      at java.awt.Container.dispatchEventImpl(Container.java:2287)
      at java.awt.Component.dispatchEvent(Component.java:4687)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
      at java.awt.Container.dispatchEventImpl(Container.java:2273)
      at java.awt.Window.dispatchEventImpl(Window.java:2719)
      at java.awt.Component.dispatchEvent(Component.java:4687)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
      at java.awt.EventQueue.access$200(EventQueue.java:103)
      at java.awt.EventQueue$3.run(EventQueue.java:694)
      at java.awt.EventQueue$3.run(EventQueue.java:692)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
      at java.awt.EventQueue$4.run(EventQueue.java:708)
      at java.awt.EventQueue$4.run(EventQueue.java:706)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
      at oracle.javatools.internal.ui.EventQueueWrapper._dispatchEvent(EventQueueWrapper.java:169)
      at oracle.javatools.internal.ui.EventQueueWrapper.dispatchEvent(EventQueueWrapper.java:151)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

    Around a month ago, a similar question appeared on Jeff's block... look for checkText in http://www.thatjeffsmith.com/ask-a-question/
    There was no resolution there, so (as the SQL Developer code in that area has not changed) I would tend to think it might have something to do with
    1. Your Locale affecting the Formatter class's parsing of that pattern; or
    2. A bug in the jdk version in use, probably also related to the Locale.
    I recommend upgrading to the latest jdk1.7.0_xx update.  If that does not solve the issue, then try changing the Locale.

  • Getting all the members (variables, methods AND method bodies) of a java source file

    For a project I want to programmatically get access to the members of java source file (member variables, methods etc) as well as to the source code of those members. My question is what is the best method for this? So far I have found the following methods:
    Use AST's provided by the Java Source API and Java Tree API, as discussed in the following posts:
    http://today.java.net/pub/a/today/2008/04/10/source-code-analysis-using-java-6-compiler-apis.html
    http://weblogs.java.net/blog/timboudreau/archive/2008/02/see_java_code_t.html
    http://netbeans.dzone.com/announcements/new-class-visualization-module
    This has the disadvantage that the classes actually have to be compilable. When I look at the Netbeans Navigator view however, it provides me with a nicely formatted UI list, regardless of the "compilable" state of the class.
    Thus I started looking at how to do this... The answer appears to be through the use of tools such as JavaCC: https://javacc.dev.java.net/
    ANTLR: http://www.antlr.org/
    which are lexers and parsers of source code. However, since the Navigator panel already does this, couldn't I use part of this code to get me the list of variables and methods in a source file? Does the Navigator API help in this regard?
    Another route seems to be through tools such as
    BeautyJ: http://beautyj.berlios.de/
    which run on top of JavaCC if I am correct, and which has the ability to provide a clean view on your java code (or an XML view). However, BeautyJ does not seem to be too actively developed, and is only j2se1.4 compatible.
    I hope someone can shed a light on the best way to go about what I want to achieve. Somebody already doing this?
    (I crossposted on the Netbeans forums too, hope this is OK...)

    I'm currently developing a LaTeX editor(MDI) and I do the same thing, but I don't know what exactly do you need.

  • How to read the java class file to convert it in java.

    hello all,
    i m developing the java application which generated the java code from the java 'class file' .
    Can anybody please help me, Is any java support for reading the class file? or how to know the class file format?
    I know the application javad, jad, javap which is doing the same thing.
    thanks for reply,
    - Jayd

    do you mean decompiling? there are tons of java decompilers available out there, what exactly are you trying to do here?

  • How to convert a .jsp to a .java/.class file for use in peoplesoft

    Hi java/jsp experts,
    I want to convert a .jsp to a .java/.class file. is there a tool available, please let me know if you have any pointers....
    or can i do it manually:
    these are a few lines that the .jsp contains, and i would like to translate this to be in .java/.class format:
    <%@ page import="sun.misc.BASE64Encoder, javax.crypto., javax.crypto.spec."%>
    <%@ page import="java.util.StringTokenizer" %>
    <%@ page import="java.util.Map" %>
    <%!
    sb.append("<input type=\"hidden\" name=\"orderPage_serialNumber\" value=\"");
    sb.append(serialNumber);
    sb.append("\">\n");
    return sb.toString();
    %>
    how can i translate the above import statements and html elements from jsp to java, please let me know.
    Once i have the .java file created from the .jsp, I will compile .java to create the .class file and invoke the .class in peoplecode by using java apis available in peopletools.
    Thanks in advance.

    Is there a way convert a binary .exe file( compiled by
    another compiler) into Java .class/.jar file ? Anyone
    know of a free program that can do this?It's not possible. There are many decompilers and disassemblers for Java but nothing will take you from ANY binary to Java source. It would be the end of computing as we know it and the beginning of a new era -:)

  • How to convert dll to a java class file?

    Hi folks:
    I have some DLLs in VB and C++ and I wanna to convert them to a java class file. Does anybody know if exist a sw or easy way to do it?
    thanks
    Autair

    Well, I believe you could write JNI to call the functions in the DLLs, although I wouldn't recommend it. (You'd have a non-portable, fragile result.)

  • How to convert java .class file to .dll file

    hi,
    I got a problem, I have to convert my java .class file to .dll file. Microsoft VC++ program will invoke the converted .dll file.
    Is there any other possibility.
    I was confused.
    Cam any body help me. If you are having solution for the can you send to my [email protected] account.
    thanks,

    No, it is not possible to do what you are suggesting. Yes, you could produce a DLL that wraps the JVM and loads your java class exposing a C and/or C++ callable interface, but that is a lot to go through unless your class is VERY complex. Otherwise, you might want to just create and maintain two implementations.

  • How can I share a *.java source file across multiple projects in NetBeans?

    I'm sure this simple and a pretty common operation but how can I share a *.java source file across multiple projects in NetBeans? Right now I keep cut, coping and pasting the same source file between multiple projects to re-use the same code. But I could I make this source file a library file or something like that so that I could access it from any project. I assume this would be a generic operation but I mentioned NetBeans for clarity. Thanks.

    fiebigc wrote:
    I know I mentioned NetBeans but I'm most interested in the generic method for creating a library of source files that I can call into whatever program I am developing. I've done such a thing in C using header files and such but I'm trying to get a direction on how this is accomplished in Java. I'm sorry if I could edit the title I would. If anyone wants to be specific about NetBeans I welcome that too.
    Edited by: fiebigc on Jun 20, 2008 5:57 PM
    >I know I mentioned NetBeans but I'm most interested in the generic method for creating a library of source files that I can call into whatever program I am developing. I've done such a thing in C using header files and such but I'm trying to get a direction on how this is accomplished in Java. I'm sorry if I could edit the title I would. If anyone wants to be specific about NetBeans I welcome that too.
    Edited by: fiebigc on Jun 20, 2008 5:57 PM
    Create a class library.
    Write your code, compile it to .class files, put those class files in a .jar file and include the jar file in the classpath whenever you want to compile a project against it.

  • Advice needed - .vob file conversion for playing on itouch

    help needed and advice on best application for dvd/movie file conversion.
    i want to convert .vob file so i can transfer to ipod.
    seems like there are several free & pay for app's out there - any guidance as to which is the best would be appreciated.
    thanks in advance

    chriswalsh wrote:
    .. i want to convert .vob file so i can transfer to ipod.
    haven't tried for vob, but a nice lil' tool:
    http://thelittleappfactory.com/evom/
    another well-known converter, esp for DVD>>Apple-toys-usage is
    http://handbrake.fr/ (don't worry, english spoken)
    note to Mods: the latest version is NO ripper (=DRM-override), but a converter..
    both free, no additional installs needed..

Maybe you are looking for

  • Changing the value of a row from bean code.

    Hello, I apologies for my bad English, and my bad knowledge of jdeveloper... I had never work with Oracle, jdeveloper, adf... before this Month, but I have to migrate one "window" from forms to jdeveloper 11g r2 for my Internship... The problem I am

  • Adobe Photoshop CS5 12.0.3 X32 Import video frames to layers crashes even with small video.

    I'm running windows 7 with 2 GB of Ram and roughly 2GHz processor, and every time I try to insert a video into photoshop, windows error comes up and says that the program has stopped working and needs to close. Weather it be Large or small videos, th

  • Resize cells in a JTable.

    I'd like to give some columns, in a jTable, an autoresize mode. It means fitting well with the content (being able to read the longest cell without having to resize the cell manualy by resizing the header). Some tables of other applications (like the

  • IDVD crashes during dvd creation, disappears, prompts to relaunch

    I have tried different themes, I have tried making it simpler. I was down to a single 2 minute video and a slideshow. No complex menus. I have looked at the other posts, and there is no answer to correcting this problem that I could find. I have the

  • Songs stop after a minute of play

    I just downloaded an album on iTunes and some of the songs stop after a minute and move on to the next song. I'm having a real tough time finding an answer to this one. Does anyone know of a fix for this? Maybe a re-download? Cheers!