I need to insert an eof into a string

I am using RandomAccessFile and I need to insert an EOF into a String manually. Any tips on how to do this? Here is a snippet of the code.
origF.seek(0);
replacement = "The stuff I want in the file.";
replacement = replacement + ??????;  //(to indicate an EOF for the file)
origF.writeBytes(replacement);
origF.close();

I found my way. Take a look in this piece of code.
    vlWrite.seek( vlPresentEntryPoint );  // position the file
    vlWrite.writeBytes( vpNewString );    // writes the new string
    vlWrite.writeBytes( vlSavedData );    // writes remaing file content
    vlWrite.setLength( vlFileLength );    // redifines file length
    vlWrite.close();I'm planning to share my code(s) in the forum. But me first make a concerning question. I'm new in Java and came to this forum to find and give help when I can. But, it is a forum where people wants to help and share or what ?????
JJLobo

Similar Messages

  • Need to convert a long into a string, please

    hi there
    i need to convert a long into a string. can i just cast it like this:
    (String)longNumber = some function that returns a long;

    Why not just use Long.toString()? If you start with a long value, you can create a Long object and get it's value as a String.

  • Need to Insert 2 Fields into one Destination Field

    I have a scenario in this way:
    Source Table  
    Inventory
    Alocation| Blocation
    ABC         DEF
    Destination Table
    LocationID
    Mapping Table  
    LocationID, Location
    1               ABC
    2               DEF
    Now I have to write a query wherey both the location codes should be inserted into LocationID in Destination table
    Normally If one Location was available I would have inserted, but I need to insert both the Records into Destination by mapping them to Mapping table
    if one Location Was Available:
    Insert Into DestinationTable
    (LocationID)
    Select M.LocationID From MappingTable M Join Sourcetable S Where M.location = S.ALocation
    This would Output
    Destination Table
    LocationID
    1
    But I want to see this as 
    Destination Table
    LocationID
    1
    2
    Please Help on this.
    Thanks
    Thanks, Please Help People When they need..!!! Mark as answered if your problem is solved.

    Check out UNPIVOT:
    http://www.sqlusa.com/bestpractices/training/scripts/pivotunpivot/
    http://technet.microsoft.com/en-us/library/ms177410(v=sql.105).aspx
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • I need to insert my photo into an external website but it needs to be reduced in file size from 4.4 to 2mb can anyone help..

    Hi, I need to insert my photo onto a profile page of an external website.  Trouble is that the jpeg file is 4.4 and it needs to be reduced to 2 mb.  I have tried everything that I can think of but nothing has worked.  I'm not very computer confident, so if anyone can support me on this, I'd welcome the help.

    Open the photo in the Preview application and click Save As... in the File menu. Its size will be indicated near the bottom of the resulting dialog box. Move the quality slider until the size you need appears, name the new file and select the location where you want to save it, and click the Save button.

  • I need to insert a table into my form.  Anyone know how to do this?

    I'm trying to figure out how to insert a table into my current form.  I can't seem to locate any button or instruction on how to do that.  Any and all help is greatly appreciated. 

    I'm guessing you're using the free version. I would first try to import a table from another PDF file. If that doesn't work I would try using the "add item" feature for either the "text" or "email" fields because those are formatted as 2 columns. You will just have to manipulate them how you want them.
    Good luck!

  • Complete newbie needs help inserting flv file into DW

    This is a multi-part message in MIME format.
    ------=_NextPart_000_0015_01C98602.377A5370
    Content-Type: text/plain;
    charset="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable
    I'm having a challenge today. A client sent me two flv files.
    When I =
    installed CS4 I installed Flash for the first time so I'm
    thinking, no =
    problem. But I'd never opened it before (never needed it
    until now). The =
    app won't open. I just spent a ton of time uninstalling and
    reinstalling =
    and rebooting over and over and nothing...
    So MAYBE, for now, I don't need it to work. I've also never
    insterted =
    Flash into DW. But it looks easy enough. In my html page I
    choose =
    insert/media/flv. So far so good. I've ftp'd the flv file so
    I'm able to =
    complete the dialog box with the path and size etc. I've
    uploaded the =
    progressiveplayer.swf and the chosen skin swf. I've saved the
    html file =
    it's embedded in and uploaded it. Shouldn't I now be able to
    see this =
    flv file displayed on the page? What did I miss? Here's the
    link to my =
    little test...
    http://www.susanhowlett.com/assets/applets/susan-movie.html=20
    The flv file is mm_susan_thanks.flv=20
    Thanks for any insight/guidance.
    Sheila
    ------=_NextPart_000_0015_01C98602.377A5370
    Content-Type: text/html;
    charset="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
    Transitional//EN">
    <HTML><HEAD>
    <META http-equiv=3DContent-Type content=3D"text/html; =
    charset=3Diso-8859-1">
    <META content=3D"MSHTML 6.00.6001.18183"
    name=3DGENERATOR>
    <STYLE></STYLE>
    </HEAD>
    <BODY bgColor=3D#ffffff>
    <DIV>
    <DIV><FONT face=3DArial size=3D2>
    <DIV><FONT face=3DArial size=3D2>I'm having a
    challenge today. A client =
    sent me two=20
    flv files. When I installed CS4 I installed Flash for the
    first =
    time so I'm=20
    thinking, no problem. But I'd never opened it before (never
    needed it =
    until=20
    now). The app won't open. I just spent a
    ton of time =
    uninstalling and=20
    reinstalling and rebooting over and over and
    nothing...</FONT></DIV>
    <DIV><FONT face=3DArial
    size=3D2></FONT> </DIV>
    <DIV><FONT face=3DArial size=3D2>So MAYBE, for
    now, I don't need it to =
    work. I've=20
    also never insterted Flash into DW. But it looks easy enough.
    In my html =
    page I=20
    choose insert/media/flv. So far so good. I've ftp'd the flv
    file so I'm =
    able to=20
    complete the dialog box with the path and size etc. I've
    uploaded the=20
    progressiveplayer.swf and the chosen skin swf. I've saved the
    html file =
    it's=20
    embedded in and uploaded it. Shouldn't I now be able to see
    this flv =
    file=20
    displayed on the page? What did I miss? Here's the link to my
    little=20
    test...</FONT></DIV>
    <DIV><FONT face=3DArial
    size=3D2></FONT> </DIV>
    <DIV><FONT face=3DArial size=3D2><A=20
    href=3D"mhtml:{2BC949A9-CCEB-407F-8078-5F999C2CADAA}mid://00000013/!x-usc=
    susanhowlett.com/assets/applets/susan-movie.html</A>=20
    </FONT></DIV>
    <DIV><FONT face=3DArial
    size=3D2></FONT> </DIV>
    <DIV><FONT face=3DArial size=3D2>The flv file is
    mm_susan_thanks.flv =
    </FONT></DIV>
    <DIV> </DIV>
    <DIV><FONT face=3DArial size=3D2>Thanks for any =
    insight/guidance.</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2>Sheila=20
    </FONT> </DIV></FONT></DIV></DIV></BODY></HTML>
    ------=_NextPart_000_0015_01C98602.377A5370--

    From my little knwledge, it is not possible to insert FLV
    file in the HTML page directly.For this you have to made a player
    with flash which plays the FLV.And this swf can emdded in the HTML
    page.
    You can also download free flash videoplayers like JW Player.
    Thanks

  • Need help inserting flash movie into article...

    I inserted video into flash movie. I loaded the .swf & .fla files onto a server and went into the properties in the flash movie and pointed to the server to pull the .fla file & the movie controls .swf file.  I can preview the movie in flash with no problem.
    I am wanting to use the object code that was created as part of the .html file that was generated by flash and insert this into an article to display the video.  I path the .swf file in the object code to point to where it resides on the server but the video will not play using just the object code. Is there a way to do this using just a object or embed code without the need for scripts?
    (I am using CS4 version)

    If the swf file does not reside in the same folder as the html page that loads it, then if the video is dynamically loaded into the Flash file, chances are the targeting in the swf needs to be adjusted.  If the swf files just targets the video by its filename alone, try putting the video file in the same folder as the html file and see if it gets loaded.

  • Help needed regarding insertion of data into oracle

    Hi,
    I am student currently trying to do a project to up a semantic database using oracle. Have set up the semantic technologies for oracle 11gr2 and used the jena adapter to load an owl into oracle.
    But i am not sure how do i insert sample data that could reference the owl.
    Tried searching but unable to find any simple tutorial and have also looked through the developer's guide and also jenaadaptor guide.
    Is there any tutorials available that could help? thank you

    Hi,
    Please go to the OTN site for more information:
    http://www.oracle.com/technology/tech/semantic_technologies/index.html
    There you can find some training info (try the NCI Oracle By Example, it's a good tutorial):
    http://www.oracle.com/technology/tech/semantic_technologies/htdocs/semtech_training.html
    Regards,
    Vladimir

  • What File format do I need to insert a Video into a Powerpoint?

    HI...
    Trying to get a video inserted into a power point.  Am having a horrible time....Anyone know how to do this??

    http://www.microsoft.com/mac/support

  • How to insert specific characters into a string based on string length?

    I have a field called street number on a form where the user
    enters a street number. The user may enter up to 5 digits. It is
    stored in the database as a 5 character field. If the street number
    is 556, it is stored in the table as '00556'. If it is '1234', it
    is stored in the table as '01234'. As you can see, if its less than
    5 characters, the field name must have leading zero's.
    I'm trying to write a function that converts the number that
    was input by the user. How do I do this? I tried a similar approach
    to Python where its as simple as 5 * '0' would give you '00000' or
    5 * 'a' would give you 'aaaaa'.
    Here's what I tried:
    <cfif len(streetnum) LT 5>
    <cfset new_streetnum = (5 - len(streetnum) * '0') &
    streetnum>
    </cfif>
    But this doesn't work in ColdFusion. I'm sure there's an easy
    way to do this.

    or you can use CF's repeatstring() function:
    <cfset streetnum = repeatstring('0', 5 -
    len(trim(streetnum))) &
    trim(streetnum)>
    you don;t even need to wrap it in <cfif> - if the
    length of streetnum is
    5 then nothing will be added by repeatstring() function.
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/

  • Using Cursor and FOR LOOP to INSERT the data into table

    Hi all,
    I have SELECT statement that returns 3 rows:
    PROCESSNAME
    PROTDATE
    IMM
    2013-12-18
    Metrology
    2013-11-18
    CT
    2013-12-04
    SELECT  processName, MAX(NVL(protStartDate, protCreateDate)) AS protDate
        FROM TABLE(SEM_MATCH("{
                ?ipc rdf:type s:Protocol .
                ?ipc s:protocolNumber ?protNum .
                ?ipc s:protocolCreateDate ?protCreateDate .
                OPTIONAL {?ipc s:protocolSchedStartDate ?protStartDate }
                ?ipra rdf:type s:ProcessAggregate .
                ?ipra s:hasProtocol ?iprot .
                ?iprot s:protocolNumber ?protNum .
                ?ipra s:processAggregateProcess ?processName.
        }",sem_models("PROTS", "LINEARS"),NULL, SEM_ALIASES(SEM_ALIAS("","http://VISION/Data/SEMANTIC#"),SEM_ALIAS("s","http://VISION/DataSource/SEMANTIC#")),NULL))
            Group by processName
    Now I need to INSERT these values into the table along with the other values.
    these other values come from different table.
           INSERT INTO MODEL_CLASS_COUNTS (MODEL_NAME, CLASS_NAME, INS_COUNT, COUNT_DATETIME, PROCESS_NAME, PROT_DATE)
           VALUES
           ("$MODEL",     
                "${i}",
            (SELECT COUNT (DISTINCT S)  FROM TABLE(SEM_MATCH(
                            "{?s rdf:type :${i} . }",SEM_Models("$MODEL"),NULL, SEM_ALIASES(SEM_ALIAS("","http://VISION/DataSource/SEMANTIC#")),NULL))),
             SYSTIMESTAMP, %%here need to insert PROCESSNAME, PROTDATE%%
    t was giving me error:
    PL/SQL: ORA-22905: cannot access rows from a non-nested table item
    so i enclosed sparql query into single quotes.
    The code is as follows:
    declare
    type c_type is REF CURSOR;
    cur c_type;
    v_process varchar2(200);
    v_pdate varchar2(200);
    begin
    open cur for
           ' SELECT processName,  MAX(NVL(protStartDate, protCreateDate)) AS protDate   <-- it's complaining about this being too long identifier, i think...
            FROM TABLE
              (SEM_MATCH (
                            ?ipc rdf:type s:Protocol .
                            ?ipc s:protocolNumber ?protNum .
                            ?ipc s:protocolCreateDate ?protCreateDate .
                            OPTIONAL {?ipc s:protocolSchedStartDate ?protStartDate }
                            ?ipra rdf:type s:ProcessAggregate .
                            ?ipra s:hasProtocol ?iprot .
                            ?iprot s:protocolNumber ?protNum .
                            ?ipra s:processAggregateProcess ?processName.
                        }",SEM_Models("XCOMPASS", "XPROCESS"),NULL,    
              SEM_ALIASES(SEM_ALIAS("","http://VISION/Data/SEMANTIC#"),
              SEM_ALIAS("s", "http://VISION/DataSource/SEMANTIC#")),NULL))
               Group by processName';  
    loop
    fetch cur into v_process, v_pdate;
    exit when cur%NOTFOUND;
    --here I need to insert v_process , v_pdate into my table along with other values...
    dbms_output.put_line('values for process and prod_date are: ' || v_process || v_pdate );
    end loop;
    close cur;
    end;
    exit;
    Now, I get an error:
    ORA-00972: identifier is too long
    Does anyone know way around this?

    Hi,
      I tested something similar with insert into select  and it worked fine :
    insert into t_countries(ID,CITY ,POPULATION, DESCRIPTION, located, insdate )
    SELECT 1 id, city, o , city||' is a nice city' description,  max(nvl(locatedAt,'unknown')) as located,
      SYSTIMESTAMP
      FROM TABLE(SEM_MATCH(
        '{GRAPH :gCH {<http://www.semwebtech.org/mondial/10/countries/CH/> :hasCity ?cityID .
           ?cityID :name ?city .
           OPTIONAL{?cityID :locatedAt ?locatedAt .}
           ?cityID :population ?o .
        SEM_Models('VIRT_MODEL_MONDIAL'),
        SEM_Rulebases(null),
        SEM_ALIASES(SEM_ALIAS('','http://www.semwebtech.org/mondial/10/meta#'),
        SEM_ALIAS('prv','http://www.semwebtech.org/mondial/10/countries/CH/provinces/')
        null))
        group by city,o
        order by city;
    Or with execute immediate :
    declare
      v_country varchar2(200) :='http://www.semwebtech.org/mondial/10/countries/F/';
      v_text varchar2(2000);
    begin
    v_text := 'insert into t_countries(ID,CITY ,POPULATION, DESCRIPTION, located, insdate )
    SELECT 1 id, city, o , city||'' is a nice city'' description,  max(nvl(locatedAt,''unknown'')) as located,
      SYSTIMESTAMP
      FROM TABLE(SEM_MATCH(
        ''{<'||v_country||'> :hasCity ?cityID .
           ?cityID :name ?city .
           OPTIONAL{?cityID :locatedAt ?locatedAt .}
           ?cityID :population ?o .
        SEM_Models(''VIRT_MODEL_MONDIAL''),
        SEM_Rulebases(null),
        SEM_ALIASES(SEM_ALIAS('''',''http://www.semwebtech.org/mondial/10/meta#'') ),
        null))
        group by city,o
        order by city';
        dbms_output.put_line(v_text);
        delete from t_countries;
        execute immediate v_text ;
        commit;
    end;
    Marc

  • Insert error message into session

    hi all,
    I need to Insert error message into the log of SM35 session.
    1. I have created a BDC that creates a session in SM35.
    2. The session is scheduled daily and gets executed automatically.
    3. there is a scenario where the session should be stopped manually with a error message.
    the system doesnt generate any error automatically for that scenario
    can any one pls tell me whether its possible to put a manual error into SM35 session log ?
    Thanks in Advance,
    Santhosini

    Hi,
    There's a few ways you could do this;
    Construct your message first (i.e. combine the message text and variables into one string, then move this into the table)
    or
    Don't store the text, instead store the message ID, number and variable parts of the message.  This has the advantage if you're running a multi-language system the log can be used by users of different languages.
    Regards,
    Nick

  • Inserting Multiple Rows into Database Table using JDBC Adapter - Efficiency

    I need to insert multiple rows into a database table using the JDBC adapter (receiver).
    I understand the traditional way of repeating the statement multiple times, each having its <access> element. However, I am just wondering whether this might be performance-inefficient, as it might insert records one by one.
    Is there a way to ensure that the records are inserted into the table as a block, rather than record-by-record?

    Hi Bhavesh/Kanwaljit,
    If we have multiple ACCESS tags then what happens is that the connection to the database is made only once. But the data is inserted row by row.
    Why i am saying this?
    If we add the following in JDBC Adapter..logSQLStatement = true. Then incase of multiple inserts we can see that there are multiple
    <i>Insert into tablename(EMP_NAME,EMP_ID) VALUES('J','1000')
    Insert into tablename(EMP_NAME,EMP_ID) VALUES('J','2000')</i>
    Doesnt this mean that rows are inserted one by one?
    Correct me if i am wrong.
    This does not mean that the transaction is not guaranted. Either all the rows will be inserted or rolled back.
    Regards,
    Sumit

  • How do I insert a screenshot into iMovie

    I'm currently working on a youtube video.
    I've taken the screenshots I need for my video, and I need to insert them somehow into iMovie.
    iMovie is the program I am going to use to make my video, since it has lots of different resources to use, effects, titles, it's amazing!
    It's for a virtual world I play (I'm 9.) ourWorld. I'm making Safe & Sound by Taylor Swift.
    Can anyone help me?
    I  need to insert the screenshots I took on my Mac into iMovie to make this video everyone is waiting for!
    Thank you!

    There are 3 ways to do it.
    1) Drag the screen shots into iPhoto and then restart iMovie. You can drag them in from the Photo Browser.
    2) If you have Aperture, drag the shots into Aperture and then restart iMovie. You can drag them in from the Photo Browser.
    3) Put the screenshots in a Finder folder. You can drag from the Finder into your iMovie Project. If you do it this way, make sure it is in a folder that you will not move for as long as you want to edit this movie.
    Once they are in iMovie, use the Rotate, Crop, Ken Burns Tool to set them to FIT. This will let you see the entire screen shot in your movie.

  • How to insert e-mail into a customer master data

    Hi all,
    i need to insert e-mail into customer's master data, which bapi can i use? and, if that possible, how?
    i explain the situation: we need to let some users change a customer data, what we want is create a transaction, let say ZXD02, that only let a user add or change emai for customer and update the Notes (see attachment). What user do, have to be replicated in Master Data in General Data-->Address-->E-Mail
    Any suggestions?
    Thnks a lot

    Hi Cristina Martínez Eguiarte
    We can implement field level authorization in SAP standard IMG settings. There is no need of any exit BAPI or screen/transaction variant for this. Please go through my doucument in which I have shared the process and settings. I did this for some other field and I hope you can do it for Email ID field as well.
    Field level authorization for customer and vendor master in SAP.
    Please test and update.
    Thank$

Maybe you are looking for

  • IPod as a disk drive

    Sorry if this has been covered before, I've not had a lot of time to search the forums, and wanted a quick response! I've set my iPod to be treated as a disk drive and I can explore it with no problems via Windows Explorer. Rather than using iTunes t

  • Problem with accesing table field in subroutine

    Hello All, I am calling a subroutine multiple times and everytine passing 2 different tables (with different structures) int he subroutine. PERFORM fill_itabs TABLES t_adnat_bus_in                                            gt_adnat_bus_in_dummy     

  • Issue Installing RoboHelp 9 on Win 7 32 bit

    Hello, I'm trying to install RoboHelp 9 on my office laptop running on Windows 7 32 bit (4gb RAM) and with Office 2007 at present. I am encountering the following error over and over again: Exit Code: 7 -------------------------------------- Summary

  • Re: Will broadband speed increase if i update to B...

    Dont waste your money. The best thing you can do is leave BT and find a provider who is not just after taking your money and not providing you with the service you are paying for. This is what BT do and not much more.

  • Progress bar for RTMP protocol

    Hi Guys, Anyone know about progress bar in rtmp i m making player using rtmp protocol because it allow to seek in any position even if the video data is not cache but i did not solve this issue how to display progress bar data is loaded i can do this