How i can work with files?
1) how i can connect to a text file ?
2) where i should put my file ?
3) how i can use my file's data ?
mobile doesn't support file system you have to study
recordset plz check complete reference book for
detailsWrong! Every phone has a filesystem. The only problem is if the phone has the JSR 75 API to access that filesystem. If it doesn't, then RMS would be an alternative for storage.
Mihai
Similar Messages
-
How EOIO processing works with FILE to RFC dapter? Pls help!
Hi Experts,
I have a FILE to RFC scenario.
FILE ---> XI ---> RFC(R/3 System)
In the sender FILE communication channel I have setup QOS as EOIO. After reading the file, XI sends the file data to RFC function module in another R/3 system. The RFC function module is Async that is, there is no Export parameter. It only has import or input parameters. Also in RFC receiver communication channel there is no option where I can provide QOS as EOIO.
Will the RFC function module process the input request message using EOIO that is, using a Queue?
Do I have to do something in RFC function module so that it receives and processes the input request in EOIO?
Thanks
Gopal
Edited by: gopalkrishna baliga on Jul 22, 2011 10:28 AM
Edited by: gopalkrishna baliga on Jul 22, 2011 10:49 AMHi Gopal,
You do not need maintain EOIO in receiver, only in sender.
RFC adapter does not support EOIO at all.
You have to change that scenario to ABAP proxy.
see stefans reply
ABAP Proxy Receiver Asynchronous EOIO
You may also check this doc
http://help.sap.com/saphelp_afs64/helpdata/ja/b1/c5ef41a0b99d39e10000000a155106/frameset.htm -
Development of program that can work with files from microsoft word
i was wondering if anybody had an idea of how detect and handle for example a text box in a word document if somebody could help please
Try this link
http://jakarta.apache.org/poi/index.html -
How to work with file system in linux within a JSF app?
I use this line in my backing bean to log some events:
FileHandler fhxml = new FileHandler("../webapps/MyWebApp/Log/MyWebAppLog.xml", append);
fhxml.setFormatter(new XMLFormatter());That works fine in windows but when I deploy it in my Tomcat 6 in linux It doesn't work. How can I work with file system in linux?You should never use relative paths to access the filesystem. The path would be relative to the current working directory which is not per se the same in all environments. To convert a relative web path to an absolute file system path, you need ServletContext#getRealPath(). Use this absolute file system path in the java.io stuff. In a JSF application on top of Servlet API you can get the underlying ServletContext by ExternalContext#getContext().
Alternatively, if the file is located in one of the default paths of the classpath or if its path is added to the classpath, you can also just use ExternalContext#getResource() or even #getResourceAsStream() using just the file name. -
I use "Adobe Sound Booster CS5"
I have a stereo soundtrack, which I only want to remove noise in only one channel (right).
How do I share / unlink the right and left channel, so I can work with them individually ?When Soundbooth was first developed, it had a few extra things than what were not available in Audition. However, Audition remained the more high end sound editing tool. Soundbooth was locked to a multiple channel editing approach. In Audition, single editing is easy - you simply click the L or R at the right end of the sound channel to lock it and then you can edit the other channel only.
Soundbooth has been discontinued and Audition now has taken its place from CS6 to the Creative Cloud.
The above is some background info. To your current situation, you can use a workaround like:
* Export your audio file to separate channels by File > Export > Channels to mono files.
You will get 2 files with _L and _R suffix.
You can then edit them separately. You can go from Mono to Stereo by the following step.
Or
* Choose - Edit > Insert > Channels into New Multitrack file.
That will separate the Left and Right Channels and add them to a new multitrack file.
You can then click the Edit link at the top right of the channel to edit it.
You can then save that file as a new audio file.
Dean -
I want to buy iPad Air online, how do I know the one that can work with Nigeria gsm network.
Take a look at HeadRoom (headphone.com). It's a fabulous resource for all types of headphones, with great guides and useful reviews.
http://www.headphone.com/ -
How to work with files in folders on Application/Presentation Server
Hi,
I am working on interface program in which files are populated in folders in application/presentation server in the format 'ABCsy-datumsy-uzeit.txt'(e.g.ABC20051022161450.txt,ABC20051022161455.txt ) in directory c:\temp.
I want to sort all these files and read in sorted manner.
can anybody help me out in this.
waiting for reply.
thanks & regards,
NitinHi,
This logic will work for files on presentation server,
DATA: l_count TYPE i,
l_filename TYPE string,
t_files TYPE string OCCURS 0 WITH HEADER LINE,
BEGIN OF t_files_sorted OCCURS 0,
file_prefix(3),
file_date LIKE sy-datum,
file_time LIKE sy-uzeit,
file_extension(4),
END OF t_files_sorted,
t_text TYPE TABLE OF w3html.
CALL METHOD cl_gui_frontend_services=>directory_list_files
EXPORTING
directory = 'C:\Temp'
FILTER = '*.txt'
files_only = 'X'
DIRECTORIES_ONLY =
CHANGING
file_table = t_files[]
count = l_count
EXCEPTIONS
cntl_error = 1
directory_list_files_failed = 2
wrong_parameter = 3
error_no_gui = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT t_files.
t_files_sorted = t_files.
APPEND t_files_sorted.
ENDLOOP.
SORT t_files_sorted BY file_date file_time.
LOOP AT t_files_sorted.
CONCATENATE 'C:\Temp\' t_files_sorted INTO l_filename.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = l_filename
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = SPACE
HEADER_LENGTH = 0
IMPORTING
FILELENGTH =
HEADER =
changing
data_tab = t_text[]
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
others = 17.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*****Your processing here..
ENDLOOP.
Also, use the FM that MAX has if you have to work with files on application server by replacing code in the above logic at appropriate places, like replace
cl_gui_frontend_services=>directory_list_files
with the corresponding fm
and replace cl_gui_frontend_services=>gui_upload
with OPEN DATASET...
CLOSE DATASET...
logic.
Hope this helps..
Sri
Message was edited by: Srikanth Pinnamaneni -
How i can deal with oracle file by using php api
how I can deal with oracle file by using php api ?
What has this to do with Reflections and Reference Objects?
-
How I can combine pdf file with other pdf file
How I can combine pdf file with other pdf file ?
Or from Adobe Reader via https://createpdf.acrobat.com/
-
My wife and I have separate Ids but all our music is in one library. How will this work with iCloud? i'm trying to download past purchases from her id, but itunes is saying that I can't because the computer is associated with my apple id. Can I associate the computer with both ids for the purpose of identifying all of our music with both or just one of our ids? Is there a good way to do this? I'm sure we're not the only people with this problem...
Using 2 iphone 3gs, ipad, mac mini, appletv, itunes for windows, macbook, and imac.iTunes- How to share music between different user accounts on a single computer
You cannot merge two separate libraries across user accounts. Photos does not have the function of merging different Photos.library files. If you have Aperture then you can merge the two before migrating over to Photos. -
Can anybody help me to build an interface that can work with this code
please help me to build an interface that can work with this code
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.FileReader;
public class Translate
public static void main(String [] args) throws IOException
if (args.length != 2)
System.err.println("usage: Translate wordmapfile textfile");
System.exit(1);
try
HashMap words = ReadHashMapFromFile(args[0]);
System.out.println(ProcessFile(words, args[1]));
catch (Exception e)
e.printStackTrace();
// static helper methods
* Reads a file into a HashMap. The file should contain lines of the format
* "key\tvalue\n"
* @returns a hashmap of the given file
@SuppressWarnings("unchecked")
private static HashMap ReadHashMapFromFile(String filename) throws FileNotFoundException, IOException
BufferedReader in = null;
HashMap map = null;
try
in = new BufferedReader(new FileReader(filename));
String line;
map = new HashMap();
while ((line = in.readLine()) != null)
String[] fields = line.split("
t", 2);
if (fields.length != 2) continue; //just ignore "invalid" lines
map.put(fields[0], fields[1]);
finally
if(in!=null) in.close(); //may throw IOException
return(map); //returning a reference to local variable is safe in java (unlike C/C++)
* Process the given file
* @returns String contains the whole file.
private static String ProcessFile(Map words, String filename) throws FileNotFoundException, IOException
BufferedReader in = null;
StringBuffer out = null;
try
in = new BufferedReader(new FileReader(filename));
out = new StringBuffer();
String line = null;
while( (line=in.readLine()) != null )
out.append(SearchAndReplaceWordsInText(words, line)+"\n");
finally
if(in!=null) in.close(); //may throw IOException
return out.toString();
* Replaces all occurrences in text of each key in words with it's value.
* @returns String
private static String SearchAndReplaceWordsInText(Map words, String text)
Iterator it = words.keySet().iterator();
while( it.hasNext() )
String key = (String)it.next();
text = text.replaceAll("\\b"key"
b", (String)words.get(key));
return text;
* @returns: s with the first letter capitalized
String capitalize(String s)
return s.substring(0,0).toUpperCase() + s.substring(1);
}... here's the head of my pirate_words_map.txt
hello ahoy
hi yo-ho-ho
pardon me avast
excuse me arrr
yes aye
my me
friend me bucko
sir matey
madam proud beauty
miss comely wench
where whar
is be
are be
am be
the th'
you ye
your yer
tell be tellin'please help me i don t know how to go about this.my teacher ask me to build an interface that work with the code .
Here is the interface i just build
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.FileReader;
import java.awt.*;
import javax.swing.*;
public class boy extends JFrame
JTextArea englishtxt;
JLabel head,privatetxtwords;
JButton translateengtoprivatewords;
Container c1;
public boy()
super("HAKIMADE");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBackground(Color.white);
setLocationRelativeTo(null);
c1 = getContentPane();
head = new JLabel(" English to private talk Translator");
englishtxt = new JTextArea("Type your text here", 10,50);
translateengtoprivatewords = new JButton("Translate");
privatetxtwords = new JLabel();
JPanel headlabel = new JPanel();
headlabel.setLayout(new FlowLayout(FlowLayout.CENTER));
headlabel.add(head);
JPanel englishtxtpanel = new JPanel();
englishtxtpanel.setLayout(new FlowLayout(FlowLayout.CENTER,10,40));
englishtxtpanel.add(englishtxt);
JPanel panel1 = new JPanel();
panel1.setLayout(new BorderLayout());
panel1.add(headlabel,BorderLayout.NORTH);
panel1.add(englishtxtpanel,BorderLayout.CENTER);
JPanel translateengtoprivatewordspanel = new JPanel();
translateengtoprivatewordspanel.setLayout(new FlowLayout(FlowLayout.CENTER,10,40));
translateengtoprivatewordspanel.add(translateengtoprivatewords);
JPanel panel2 = new JPanel();
panel2.setLayout(new BorderLayout());
panel2.add(translateengtoprivatewordspanel,BorderLayout.NORTH);
panel2.add(privatetxtwords,BorderLayout.CENTER);
JPanel mainpanel = new JPanel();
mainpanel.setLayout(new BorderLayout());
mainpanel.add(panel1,BorderLayout.NORTH);
mainpanel.add(panel2,BorderLayout.CENTER);
c1.add(panel1, BorderLayout.NORTH);
c1.add(panel2);
public static void main(final String args[])
boy mp = new boy();
mp.setVisible(true);
}..............here is the code,please make this interface work with the code
public class Translate
public static void main(String [] args) throws IOException
if (args.length != 2)
System.err.println("usage: Translate wordmapfile textfile");
System.exit(1);
try
HashMap words = ReadHashMapFromFile(args[0]);
System.out.println(ProcessFile(words, args[1]));
catch (Exception e)
e.printStackTrace();
// static helper methods
* Reads a file into a HashMap. The file should contain lines of the format
* "key\tvalue\n"
* @returns a hashmap of the given file
@SuppressWarnings("unchecked")
private static HashMap ReadHashMapFromFile(String filename) throws FileNotFoundException, IOException
BufferedReader in = null;
HashMap map = null;
try
in = new BufferedReader(new FileReader(filename));
String line;
map = new HashMap();
while ((line = in.readLine()) != null)
String[] fields = line.split("
t", 2);
if (fields.length != 2) continue; //just ignore "invalid" lines
map.put(fields[0], fields[1]);
finally
if(in!=null) in.close(); //may throw IOException
return(map); //returning a reference to local variable is safe in java (unlike C/C++)
* Process the given file
* @returns String contains the whole file.
private static String ProcessFile(Map words, String filename) throws FileNotFoundException, IOException
BufferedReader in = null;
StringBuffer out = null;
try
in = new BufferedReader(new FileReader(filename));
out = new StringBuffer();
String line = null;
while( (line=in.readLine()) != null )
out.append(SearchAndReplaceWordsInText(words, line)+"\n");
finally
if(in!=null) in.close(); //may throw IOException
return out.toString();
* Replaces all occurrences in text of each key in words with it's value.
* @returns String
private static String SearchAndReplaceWordsInText(Map words, String text)
Iterator it = words.keySet().iterator();
while( it.hasNext() )
String key = (String)it.next();
text = text.replaceAll("\\b"key"
b", (String)words.get(key));
return text;
* @returns: s with the first letter capitalized
String capitalize(String s)
return s.substring(0,0).toUpperCase() + s.substring(1);
}... here's the head of my pirate_words_map.txt
hello ahoy
hi yo-ho-ho
pardon me avast
excuse me arrr
yes aye
my me
friend me bucko
sir matey
madam proud beauty
miss comely wench
where whar
is be
are be
am be
the th'
you ye
your yer
tell be tellin' -
I have audiobook of abt.500 files, all titles are the name of the book. iPhone music player does not understand sorting by file names, but by title, hterfore it plays files chaotic. So, how I can sort audiobook files in music player by file name, not by title name?
I have the same problem.
I've went through the pains of merging all chapters into one big file for each and every audiobook, so that at least the chapters don't get played in random order. Month and month of work….. In iTunes 12.01. I can now order my audiobooks by title or by author.
But once they're uploaded to my blo*dy expensive iPhone 6Plus 128 (which I bought especially to have all my music and my audiobooks on one device) my audiobooks are NOT sorted by author, but by Title.
So, let's say I have 15 books by Ken Follet, they don't appear as Ken Follet > Title of the book but they are sorted alphabetically with all the other titles of other authors.
iPods where originally designed for music and audiobooks, but each and every version of iOS makes handling your music and especially your audiobooks harder and harder….
I am very disappointed and after so many years of using apple, I am considering to move on to android devices. -
How to start working with iReport?
Hi All,
I'm just decide to use iReport for create report on Web but I don't know
How to start working with iReport , What program I should to install , How
to config any system files and set property .
Please advice me for work with IReport.
Thank youHi,
best hint to give is to start interviewing the product owner
http://ireport.sourceforge.net/cap3.html
Note that this is an open source project. Once you know which libraries you need, create a project in JDeveloper and double click on the project node. There is a Library node that allows you to import libraries to be used in your code.
Under Tools --> Manage Libraries you can configure JSP tag libraries if required
Frank -
Hello!
Can anyone help me. How can I API in Java Technology for files to find ?don't uite understand your question.
here's the location of java API for File class, for working with File and Directory..
http://java.sun.com/j2se/1.3/docs/api/java/io/File.html
for reading and writing..you may want to look at th eio package for classes such as
Reader, FileReader, BufferedReader, Writer, FileWriter, BufferedWriter
here's java API
http://java.sun.com/j2se/1.4.2/docs/api/ -
Managing spaces when working with files
Hi, how can I work with files on windows on paths thats have blank spaces like "Documents and Settings", I used getResource().getFile() and writting the path but it always fails!
The FileOutputStream always thorws the exception FIleNotFoundException.
I tried the path with blank spaces and tried with %20 but always is the same.Are you saying that OutputStream os = new FileOutputStream("C:/Documents
and
Settings/AAD/workspace/MobileServer/bin/Configuracion/
conexiones.omt");throws an exception? If so, what exception?Exactly it throws an Exception.
java.io.FileNotFoundException: C:\Documents and Settings\AAD\workspace\MobileServer\bin\server\Configuracion\conexiones.omt (El sistema no puede hallar la ruta especificada)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
at server.tcp.GestionTCP.guardar(GestionTCP.java:118)
at server.tcp.GestionTCP.mouseReleased(GestionTCP.java:89)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:273)
at java.awt.Component.processMouseEvent(Component.java:6038)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
at java.awt.Component.processEvent(Component.java:5803)
at java.awt.Container.processEvent(Container.java:2058)
at java.awt.Component.dispatchEventImpl(Component.java:4410)
at java.awt.Container.dispatchEventImpl(Container.java:2116)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
at java.awt.Container.dispatchEventImpl(Container.java:2102)
at java.awt.Window.dispatchEventImpl(Window.java:2429)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Maybe you are looking for
-
What is the latest iOS for iPhone 3GS and will there be another update
What is the latest iOS for iPhone 3GS and will there be another update or is it iOS 6.1.3 and no more
-
Custome Error Handling in OWD Data Adaptor Plugin
Hi, Does the Oracle web determination allow to customize error or exception message, while loadins/saving the interview session data. while loading some session data for a caseid if certain functional error throws, then can I telll the OWD to display
-
Buying a book in Iphoto 8 - error with IMG file
HI, I've just created a book using Iphoto8, and when I click on buy album I'm told there is an "error with IMG 6653 and to delete the photo or to replace it with another". I have deleted the photo from the book, I have even thrown it in the trash bin
-
TS3276 Mail 6.0 won't connect to one of my accounts, only since upgrade to OSX 7
My Mail account fails to connect and it prompts me for my password which fails to resolve the problem. This has only occurred since my upgrade to OS X 10.7. I have verified all of the accccount settings (by comparing them to my iPad Mail account se
-
Displaying report error back to calling form
Hi We are running 10g reports and forms on Red Hat. The forms are run using a run_report_object command to generate pdf output and then displayed using web.show_document. The parameters are entered into a form and sometimes are validated and sometime