Take a file as an input to a program

Hello guys,
i would like to take a file as an input to a program
e.g. i have a program AES.java which encrypts and decrypts an input file.
Well, i don't know which classes i shall use in order to take tha name of the file as input(java AES > name_of_file) in my program and how i can take/seperate every byte of the file like we do with getBytes.
Can anyone help me?
Thanks, in advance!

Thank you all for replying, you really helped me!
In my program i have to read the bytes of every line and i have to keep the bytes of every line in an array which consists of pointers to byte arrays
e.g.
array[0] -> points to an array of bytes
array[1]-> << <<
array[2]-> << <<
etc.
I create a class
public class Byte_Array{
byte tmp = new byte[128];
and then i do:
array[0] = new Byte_Array( );
array[1] = new Byte_Array( );
array[0].tmp = " a line of bytes "
Is that right?
Edited by: g_p_java on Dec 12, 2007 12:54 PM

Similar Messages

  • After I have combined some files together to make them into one pdf, can I add and take out files?

    After I have combined some files together to make them into one pdf, can I add and take out files?

    Hello djensen1x,
    Could you please let me know what version of Acrobat are you using.
    Also, tell me your workflow of combining those PDF files?
    Please share the screenshot of the error message that you get.
    Hope to get your response.
    Regards,
    Anubha

  • HT4796 How can I take the files that were migrated from my PC to my Mac and add all those files to my current user instead of having 2 users?

    How can I take the files that were migrated from my PC to my Mac and add all those files to my current user instead of having 2 users? Having to log out just to sign in on a different user to access the files is absurd.
    Do I make all the files sharable to all the NOW users on the mac then just delete the files? Or can i erase my account that I made when starting up my new mac and then just use the one with the transferred files?
    I just dont want to have to og in and out of 2 different accounts .. Help please.         
    -Nina

    Sorry. /Users is a folder path. It would be similar to C:\Users (if that exists on Windows).
    So, in the Finder, select Computer from the Go menu.
    You'll see Macintosh HD, double-click that to open it.
    In there you'll see several folders. One is Users. That is where all the user Home folders exist. Select the other account's home folder and go to step 3.
    If you have any more confusion, please stop and ask. We'll get there.
    If you feel more comfortable, you can just log into that other account and move the files into /Users/Shared.
    Then, log into the account you wish to use and copy the files from the Shared folder and paste them into your Home folder, wherever they belong, Documents, Music, Pictures, etc.  That just takes a little more work. Transferring them into Shared, and then copying into your home sets the permissions on the files so that you won't have a problem accessing them later. The steps I provided just prevent you from having to do the double move, since you are not going to use the old account once you are done.
    Quick unix shorthand. If someone gives you a file path that begins with a /, that means the root of the hard drive, ie Macintosh HD (if you haven't renamed it). The path separator in unix is /, not \.
    A path that starts with ~/ means your Home folder, the one inside /Users named with your account name.

  • An Error has occurred: File Repository server input is down

    Hello Team,
    I am getting the following error message "An Error has occurred: File Repository server input is down" when try to upload exel or any other document in repository using . NET Infoview. Even with the Admin account.
    and 
    If i try the same steps from Java Infoview i am able to upload the excel.
    I guess some issue with IIS .
    Env Dtls:
    BO XI 3.1 SP3
    IIS 7
    Windows server 2008.
    Waiting for your valuable suggestions.
    Regards,
    Sonu Pandita

    Hi Team,
    I resolved this issue by giving one user a permission on temp folder.
    Regards,
    Sonu Pandita

  • How to pass XML file as a input to DataService from client application

    Hi,
    I have a function in DataService which will take a complex parameter as input. So from client application how can I pass the Complex parameter?
    If anyone knows please help me.
    thanks,
    Suresh varma

    Something like this. The types will be generated when you Generate SDO Mediator client.
    somenamespace.MyComplexParamDocument myComplexParamDoc=
    MyComplexParamDocument.factory().newInstance();
    MyComplexParam myComplexParam=myComplexParamDoc.addNewMyComplexParam();
    myComplexParam.setFirstName("John");
    CUSTOMERPROFILEDocument[] myCust =
    customerDS.getCustomerByComplexParam(myComplexParamDoc);

  • Take Source file path in sender adapter from an environment variable .

    Hi,
    Is it possible to take source file path(half file path) dynamically in sender file adapter.
    Please suggest any alternative to this.

    Hi,
    One option, use Dynamic Configuration and set the values in the Mapping.
    By the ways, the File Directory and the Filename are taken runtime in the file adapters after transportation.
    Only if you are using FTP will you need to key in the FTP addess user id password etc.
    Refer -- same way try for File adapter
    Dynamic Configuration of Some Communication Channel Parameters using Message Mapping
    Ps Note : I have personally never tried it to use the Dynamic Configuration for file path. But you can try.
    Thanks
    Swarup

  • Adobe Media Encoder won't take mov. files!?

    My Adobe Media Encoder will not take mov. files! That should not be a problem, right? When I click the Add-button the mov. files is not listed up unless I choose to show all files. And when selecting the file, the program says the file could not be imported -_-
    Probably a stupid newbie mistake, but can anyone tell me what it is?
    I have downloaded the latest flash CS4 trial package, which include the encoder, and am trying to encode files provided with adobe's book "Adobe flash CS4 professional - Classroom in a book"

    I found the answer. I needed to install Quicktime lol

  • File/Hadoop CSV input : Discovery of file fails

    Hello ,
    I'm trying to make the project as described in -
    "Hands-on Tutorial: Building a Simple SAP Sybase ESP Project" for SAP Sybase ESP version 5.1 SP04.
    I create a project where I add an input adapter of type - File/Hadoop CSV input.
    Then in edit properties I enter the directory and the file name . In advanced tab I also set Has Header = TRUE.
    Then  I click on Schema Discovery and this raises error - "Failed to parse discovery file : parse of file failed ".
    I've imported the sample "towermon "project from SCN and this shows the same error !
    I've done this before on SP02 and it used to work . Of course the File/Hadoop CSV input adapter did not exist in that release.
    Can't quiet figure out what I'm doing wrong . Is this a bug in the software ?Any ideas how to fix this ?
    Best regards,
    Saty

    Hello,
    Two things to check:
    1)  I don't know which file you are using from the "towermon" project.  One of the CSV files (input-streams.csv) prepends the stream name and opcode:
    isSensorStream,i,2011-06-30T17:00:00.000,32.835,-114.188,Tower,Yuma T70,1,104,0
    The other CSV files do not.  So you will have to toggle the "csvExpectStreamNameOpcode" parameter to true/false (the default is true).
    2) There is a bug in the adapter discovery mechanism where it will return the error Failed to parse discovery file : parse of file failed ":
       749503 - Schema discovery does not work for toolkit adapters when unnecessary properties are listed on the adapter.
    So for example, in text authoring mode, if you have this:
    ATTACH INPUT ADAPTER File_Hadoop_CSV_Input1 TYPE toolkit_file_csv_input PROPERTIES
    csvExpectStreamNameOpcode = TRUE ,
    dir = 'c:/temp' ,
    file = 'input-streams.csv' ,
    dynamicMode = '' ,
    removeAfterProcess = FALSE ,
    csvDelimiter = '' ,
    csvDateFormat = '' ,
    csvTimestampFormat = '' ,
    csvHasHeader = FALSE ,
    pollingPeriod = 0 ,
    scanDepth = 0 ;
    You have to delete the unnecessary properties:
    ATTACH INPUT ADAPTER File_Hadoop_CSV_Input1 TYPE toolkit_file_csv_input PROPERTIES
    csvExpectStreamNameOpcode = TRUE ,
    dir = 'c:/temp' ,
    file = 'input-streams.csv' ;
    Then switch back to visual authoring mode and try discovery again.
    Hope this helps.
    Thanks,
      Neal

  • Is it possible to pass a TXT file as an input of a SQL script?

    Dear all,
    I have a question about SQL scripts running in SQL*Plus. I have a table including a list of SAP UserIDs. I would like to check for several people whether their
    ID already exists. Here is how I proceed in my script file.
    SELECT sap_userid
    FROM SAPREF_USERS
    WHERE (sap_userid
    IN
         'user1',
         'user2',
         'user3',
         'user4',
         'user5',
           .          /*  So here I write one by one each userid. Consequently if a user already exists, the script will print his/her UserID */
    GROUP BY sap_userid
    ORDER BY sap_useridWell, this works, but I'm sure there should be a more intelligent method to do the job. If I put all UserIDs in a let's say a TXT file (one userid per line) is there
    any way to pass this text file as an input for the script so I may get rid of the very long IN clause in my SQL query?
    Thanks in advance,
    Kind Regards,
    Dariyoosh

    Yet Another Post Without Version.
    Typing 4 digits and 3 dots, or running select * from v$version and paste the result here
    Qualifies as work, and the very reason you post here is you want to avoid to work, or to earn as much as possible by doing as little as possible.
    In 9i and higher, the file is best treated as an external table, so the whole list of userids is replaced by
    in (select * from external_table)
    But this requires reading documentation, which again qualifies as ... work.
    Ahh, most 'DBA's here are quite hopeless.
    Sybrand Bakker
    Senior Oracle DBA

  • How to read a file as an input stream after it's posted in an HTML form ?

    Hello,
    I want to read client file after it's posted in an HTML form. But, I don't want to upload it to filesystem or database. I want to read posted file as an input stream. How can I do that ?
    thanks in advance...

    A couple of things. If you have a FILE field in your form, the enctype of the form must be multipart/form-data. Check this link
    http://www.htmlhelp.com/reference/html40/forms/form.html
    Also, when a file is uploaded you cannot use the regular methods to get at the name/value pairs or the file itself. You'll have to use a utility like MultiPartRequest or write your own based on the RFC for Multipart requests.
    http://www.servlets.com/cos/javadoc/com/oreilly/servlet/MultipartRequest.html
    You will need some temporary file system to store this and then delete it when you are done with it.
    hth

  • Calling Stored Procedure(takes varray of objects as input) from jdeveloper

    How can i call Stored Procedure which takes varray of objects as input from jdeveloper
    My object is :
    TYPE Entry IS Object (
    Name VARCHAR2(1024),
    Value VARCHAR2(1024)
    & the varray is :
    TYPE EntryArr IS varray(10) OF Entry ;
    & the procedure is :
    PROCEDURE myProc( myEntryArr IN EntryArr )
    AS
    s varchar2(1024);
    BEGIN
    for i in 1.. myEntryArr .COUNT loop
    if myEntryArr(i).Name = 'Name1' then
    s := myEntryArr(i).Value
    end loop;
    end;

    hi 429071
    Maybe you can find some useful information in:
    "Oracle Database Java Developer's Guide"
    http://download-west.oracle.com/docs/cd/B14117_01/java.101/b12021.pdf
    see "6 Publishing Java Classes With Call Specs" > "Writing Object Type Call Specs"
    success
    Jan Vervecken

  • How to take .tbl file?

    hi team,
    Could you pls tell me about how to take .tbl files from SQL server. Since i need to bulk insert a value into another table for this datafile need to be in .tbl format.
    FYR.
    BULK INSERT AdventureWorks.Sales.SalesOrderDetail
    FROM 'f:\orders\lineitem.tbl'
    WITH
    FIELDTERMINATOR =' |',
    ROWTERMINATOR =' |\n'
    Regards, Muthukumar Balu

    Hi Muthukumar Balu,
    According to your description, we need to verify if you want to load data to SQL Azure database, if yes, the Bulk Insert T-SQL statement is not supported on SQL Azure. However, other data migration tools are available, such as the SQL Server BCP Utility,
    SQL Server Integration Services (SSIS), Import and Export Data and SQL Server Management Studio (SSMS). You could even use the Bulk Copy API to author your own customized data upload application. For more information, see:
    http://blogs.msdn.com/b/sqlcat/archive/2010/07/30/loading-data-to-sql-azure-the-fast-way.aspx
     If you just want to load data to SQL Server database, I will help you move the thread to the related forum, It is appropriate and more experts will assist you. As other post, you can use the TPC DbGen utility to generate test Data (.tbl
    file), then execute the
    bulk insert T-SQL statement in SQL Server database.
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Structure of the input file for RMDATIND (standard material update program)

    Hi all !
    I need to find the structure of the input file used by the RMDATIND standard program. Is there only one structure for this file ? what should it contains ?
    Thanks a lot
    Regards,
    --Yohann

    Hi Yohann,
    Check this link...
    [RMDATIND Document|http://www.iconet-ltd.co.uk/mm.doc]
    Hope this would solve your issue.
    Regards
    Narin Nandivada

  • How do I download mozzikla 3.5 ?? Mozzilla 3.6 takes up to much space and has a program running in background storing crashed files.

    how do I download mozzikla 3.5 ?? Mozzilla 3.6 takes up to much space and has a program running in background storing crashed files.
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; OfficeLiveConnector.1.4; OfficeLivePatch.1.3; .NET CLR 3.0.30729; .NET CLR 3.5.30729; msn OptimizedIE8;ENUS)

    That crash appears to be casued by the Facebook plug-in.
    Create a new account (systempreferences -> accounts or Users & Groups on 10.7 and 10.8), make a new Library in that account, import some shots  and see if the problem is repeated there. If it is, then a re-install of the app might be indicated. If it's not, then it's likely the app is okay and the problem is something in the main account.

  • FM takes year and month as input and give firstdate and lastdate as output

    Hi,
    Can any one tell me any <b>function modules which takes year and month as inputs and gives first date and last date of that month as outp</b>uts.
    Regards,
    Gurprit Bhatia
    Message was edited by:
            GURPRIT BHATIA

    Hi Gurprit,
    You can use this.
    data : ws_date type sy-datum.,
             ws_edtae type sy-datum.
    constants : c_01 value '01'.
    CONCATENATE ws_date c_01 INTO ws_stdate.
    CALL FUNCTION 'HR_JP_ADD_MONTH_TO_DATE'
          EXPORTING
            iv_monthcount = ws_01 (1)
            iv_date       = ws_stdate ( eg :01.01.2007)
          IMPORTING
            ev_date       = ws_edate. (eg : 31.01.2007)
    Reward if useful.
    Regards,
    Chitra

Maybe you are looking for