How to insert text in the middle of an existing textfile using java
Hi,
How to insert text in the middle of an existing textfile using java i/o streams??
Mickie wrote:
I shudn't delete the file...Then you will have the old file and the new file - do you want that?
and I have to insert text not only at a single place ....got to do at many places in the text file!!then extrapolate on the procedure outlined in reply #1 .
Similar Messages
-
How to print/list all the groups/users present in Weblogic using Java code
Hi,
Weblogic version : 11.1.1.5
How to print/list all the groups/users present in Weblogic using Java code
I want to make a remote connection to Weblogic server and print all the users/groups present in it.
I have gone through the below mentioned site, but I cannot use the same approach since most of the API' are deprecated for example "weblogic.management.MBeanHome;"
http://weblogic-wonders.com/weblogic/2010/11/10/list-users-and-groups-in-weblogic-using-jmx/
Thanks in advance,
Edited by: 984107 on 05-Feb-2013 05:26
Edited by: 984107 on 05-Feb-2013 22:59see this http://www.techpaste.com/2012/06/managing-user-groups-wlst-scripts-weblogic/
Hope this helps. -
How to insert text in the text-id using BDC
Hi Friends,
I m using the BAPI to upload the data for a transaction .
In that transaction there are some text id's are created to insert text like 'Container number'.
I want to insert the text in that text id . But it not a field. Text ids are having object no and table and number .
Is there any function like 'READ_TEXT' which we use to retrieve the text form text ids to write text in text ids ?
So that I can use that function to insert the text in the text ids.
Thanxs.Hi Umesh,
READ_TEXT is used to Read the text , but SAVE_TEXT is used to save the text. but for reading or saving you need correct iD's and text objects.
Regards
vijay -
I'm making a huge form in LiveCycle Designer. I want to be able to add rows in the middle o the table but in a way that the content below will move down automatically in a way it doe's in Word for example.
Sometimes I am adding a very high new row in the middle of a page and I want the content in the below rows to be moved to another page and if it is necessary I want a new page to be automatically created on the bottom of a document or something.
Is this possible or do I have to move everything by hand if I add new row to a table?If you are adding the rows at the runtime by clicking a button, then you have to use the instance Manager to add rows.. It will add rows at the end and then you need to write code to move the row at the desired location by using the moveInstance method of the instanceManager.
If you are adding a row at the design time, then you can right clcik the row and choose to add rows below.
Thanks
Srini -
How to insert into mysql the creation time and modification time from java?
first how?
Second what is better from create the date from java or do it from mysql?
thanks in advace
PedroOne way is to use the GetDate function in mysql. This will set the date as you insert data. insert into table(date) values(getdate())
Anytime you modifiy the table just call the function again and update its fields.
Dont know which is beter to do. In java or on the database side. -
I'm trying to figure out how to insert rows in the middle
row 1
row 2
row 3
I need to insert 2 rows before row 2
I know I have to use the AddRow(1, Position) however after many tries, it doesn't seem to work or at least I don't know how to
insert the second row as if I do +1 it's not realy adequate, also, pVal.Row reports Row 2 and in the documentation it sais 0 based which is not right so I'm a bit confused on how to go about that.
Edited by: Marc Roussel on Aug 10, 2011 8:23 AM
Here's the whole thing, maybe you'll understand where I'm at :
I enter an ItemCode which is a kit. After the person enter the quantity, I pop a .NET Windows form which asks for questions and then after the questions I get back and add the lines but it seems that when I add the lines, I'm still on the line I was entering the kit and it overrides it instead of Adding the new row at the position I'm asking it to add the row.
Even if I do pVal.Row +1 or +2 or +3, it doesn't matter
Edited by: Marc Roussel on Aug 10, 2011 8:28 AMThe code below adds the 2 lines all right but then, a blank line after and the line that was already there below is destroyed. Don't ask me why and what is happening to that existing line which seems to have lost the ItemCode or I don't know what happened
CurrentLine = pVal.Row;
CurrentLine++;
oMatrix.AddRow(1, CurrentLine);
SAP.SetCellValue(oMatrix, SAPFramework.Enums.MARKETING_COLS.B1_ITEMCODE, CurrentLine, "01P38");
SAP.SetCellValue(oMatrix, "U_KitSeq", CurrentLine, NewKitSeq);
CurrentLine++;
oMatrix.AddRow(1, CurrentLine);
SAP.SetCellValue(oMatrix, SAPFramework.Enums.MARKETING_COLS.B1_ITEMCODE, CurrentLine, "03P12");
SAP.SetCellValue(oMatrix, "U_KitSeq", CurrentLine, NewKitSeq);
I did not know that doing a simple thing like this would be a hard business...
Edited by: Marc Roussel on Aug 10, 2011 9:15 AM -
How to insert data into the mysql table by giving as a text file
Hi,
Any one know's how to insert data into the mysql table by giving as a text file as the input in JSP.Please respond ASAP.
Thanks:)At least you can try StringTokenizer to parse your text files. Or download a text JDBC driver to parse your files, for instance, HXTT Text(www.hxtt.net) or StelsCSV(www.csv-jdbc.com).
-
I have bought a Macbook Pro Retina, and the iPhoto which comes with it, has a different iPhoto Book menu. I cannot see how to put text at the bottom of the pages of photographs, instead of the default place in the middle. Is there a way to do this?
There are different templates for iPhoto books and they differ from version of iPhoto to iPhoto, so explore the other options.
-
How to insert text in existing file.?????
how to insert text in existing file.?????
my file contains simple text with numbers of lines having more then 10 MB size and it might be increase up to 100MB.
i required to seek to spec. position and insert chunk of characters to file without overwriting existing one.
I tried out with RandomAccessFile class Also.
Pl. Suggest me way to insert String in existing file.
Thanks ,
Timirhow to insert text in existing file.?????You can't "insert" text into an existing file. You can
overwrite portions of an existing file or extend one by
writing past the current end of file.
If you want to insert text into a file you have to write
out a new file. -
How to insert icons in the selection-screen
how to insert icons in the selection-screen?
Mohan,
Report zex33.
type-pools: icon.
selection-screen begin of line.
selection-screen comment 1(20) text_001.
parameters: p_werks type marc-werks.
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 1(20) text_002.
parameters: p_whouse(10).
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 1(20) text_003.
parameters: p_auart like vbak-auart.
selection-screen end of line.
initialization.
write ICON_PLANT as icon to text_001.
concatenate text_001 text-001 into text_001 separated by space.
write ICON_WAREHOUSE as icon to text_002.
concatenate text_002 text-002 into text_002 separated by space.
write ICON_ORDER as icon to text_003.
concatenate text_003 text-003 into text_003 separated by space.
Pls. reward for all useful answers........ -
How Do highlight text in the body of an email message in Mac Mail?
Can anyone tell if IF and HOW I can highlight text in the body of an email message using Mac Mail (in Yosemite). I do NOT mean MARKUP an attachment. I want to highlight a word or phrase in the body of my email message. I know I can change the font color, but can't seem to add a highlight! Thanks!
Hi,
is is possible, - link is below. Works on Yosemite, btw.
http://www.mihalick.us/how-to-highlight-text-in-yellow-using-apple-mail/ -
How to highlight text in the iCloud web app
Hi,
My computer recently broke so I had to use my mom's windows computer to do my homework. I had to use the iCloud web app Pages to do my homework. My assignment requires to be able to highlight stuff so does anyone know how to highlight text in the iCloud web apps?You can do this easily by using a "modify class" parameter in your web template.
Following methods are of your interest to change char/KF headers.
CAPTION_CELL changes formats/values of characteristic headers
STRUCTURE_CELL changes formats/values of key figure headers
Hope it helps.
Hari Immadi
http://immadi.com
SEM BW Analyst -
How to Align Text in the TextArea
How to Align text in the TextArea. My purpose is that I want to post the records after retrieving from database. All the records in each fields should keep aligned like Oracle WorkSheet.
I want this way
Code Name Place City
a01 nilopher swiss street japan
a02 rozina lovely street aus
a03 benazir king's camp pitsburg
and the out put should not look like this :-
Code Name Place City
a01 nilopher swiss street japan
a02 rozina lovely street aus
a03 benazir king's camp pitsburg
here place and city records are getting disturbed accordingly the length of name.Well, first off (if it's not default, that is) you must set a monospaced font on the TextArea, unless you want to count pixelwidth of each and every string and then do an estimate on how many fill blanks you want...
If you have the each string as a line, you use a StringTokenizer on it, extract each token, put all the tokens for that line into an array of strings.
When every line is done, you compare the length of the nth String of each array and save the highest numbers.
Then you reassemble each line from the arrays and pad in spaces where the tokens are too short.
HTH,
Fredrik -
How to insert text in smartform boxes
Hi Friends,
This is regarding about smartform box.
I have created one template. pls find below for complete template for your ref.
Total template has 5 lines names like C1, C2, C3, C4, C5, C6 and C7.
To fulfill client req, again I have devided First line "C1" and Second line "C2" into 5 boxes.
Third line -- no boxes.
Fourth line -- 3 boxes
Fifth line -- 3 boxes
Sixth line -- no boxes
Seventh line -- no boxes
Now I want to assign text for each boxes in the C1 and C2 lines.
In C1 line
first box-- po date
second box - text
like that I have to pass the text in the corresponding boxes.
I don't find any option in the right click.
I am new to the smartforms.
Could you pls help me is there any way to insert text in the boxes.
This is very urgent.
Thanks in advance.Hi,
Create the text editors as many as you want , these should be assigned to each box in template,
When u double click on text on the right side uder the template window
1-Output option tab-->at the bottom , you can see output structure, there you need to specify the line number and column number.
Ex:
template have 2 rows and 2 columns each row
text1 --- row =1 column =1
text2---- row =1 column =2
text3--- row =2 column =1
text4---- row =2 column =2
Reward if useful,
Thanks,
Aditya -
How to insert data to the specified row column of the multi column list box
Hi All
How do i insert data into the specified column of the multi cplumn list box?
I have a table that containsall station nos and name.Then another table contains the data the various stations having at for 24 hrs.That is 12 am to 11 pm.
And i want to display each stations details as follows using a multi column list box/table
My stationinfo table
stnno stnname......................
s1 stn1
s2 stn2
s3 stn3
The other table
stnno sysdatetime data
s1 12am 1
s2 12am 4
s1 1 am 2
So the station s1,s2.... will have data for 24 hrs.
And i want to display it as follows using a multicolumn listbox
stnname 12am 1 am ......................................11pm
s1 ...................
s2 ........................
What i have in my mind is to get all station nos
and in a for loop get the station's data from 12 am to 11 pm
or
select every statios data for each hor.But in this case i have to query the database 24 times.So i dont think its a good way.
Or any other better query available?
Can anybody suggest me a good idea?
One more thing...how to insert data into the specified field row or column of a multi column list box?
Thanks in advancehi
i want to know,,can u say ur need clearly...and i attached two image u see that one
Indrajit
| [email protected] | [email protected] .
Attachments:
station.JPG 35 KB
station2.JPG 79 KB
Maybe you are looking for
-
How do I change the scan resolution on my HP Officejet 4620?
My printer scans images at 200 dpi but I want to change it to scan at 300 dpi to get a better quality image, but I can't figure out how to change the settings for the resolution. I have a Mac OS X 10.8.5 Help!
-
How to find transactions in a Foreign Currency
How can we find all the transactions posted in a Foreign Currency? Is there a specific report for that purpose in SAP?
-
I am little bit struggling to get the my sql function below, to execute the correct output: ALTER FUNCTION [dbo].[ReplaceTags](@XML VARCHAR(MAX)) RETURNS VARCHAR(MAX) AS BEGIN SELECT @XML = REPLACE(@XML,[Name],'<a href="<a href="pagename.aspx?tag='+[
-
What is the use of jsp when compare with Struts
what is the use of jsp when compare with Struts
-
My FCP X has lost all themes generators and titles
My Final Cut Pro X Just suddenly have lost all of the themes generators and titles. I have tried to reinstall it, and cleand with appcleaner and reinstall it, but still can't seem to get those things back. The only visual effects that are left are th