Binary I/O: Changing a String inside a Binary File

Hi people, good morning!
I have written a method here which takes two files as parameters. The method opens the first file (which may or may not be binary) using FileInputStream, loading it into a byte array. This byte array is converted to String by a CharsetDecoder (ISO-8859-1 encoding) and then i use indexOf() on this String to find the initial position of the token i need to find.
Then, i transform the replaced token with getBytes() and insert it in the same position as the index found above, writing everything to the second file parameter as bytes to a FileOutputStream.
The problem is that the destination file, when opened with the associated program (Eg: Oracle Forms Builder for *.fmb files) says the file is corrupt. Seeing that the original file opens and compiles normally, i believe the substitution process is corrupting the file.
Do you know what my code below is missing? Strangely enough, when the replaced token is not larger than the original token, the file is not corrupted...
Any help is greatly appreciated.
Regards!
Thiago Souza
          FileInputStream in = null;
          FileOutputStream out = null;
          try {
               File f = new File(nameFrom);
               in = new FileInputStream(f);
               byte b[] = new byte[(int) f.length()];
               in.read(b);
               Charset cs = Charset.forName("ISO-8859-1");
               CharsetDecoder cd = cs.newDecoder();
               CharsetEncoder ce = cs.newEncoder();
               byte[] headerChange = "$Header: MDBFNDENABLEEVENTS.fmb 115.1 2006/08/10 10:00:00 appldev ship $".getBytes();
            byte[] headerBytes  = "$Header: %f% %v% %d% %u% ship $".getBytes();
               String header       = cd.decode(ByteBuffer.wrap(headerBytes)).toString();
               int headerExcess      = headerChange.length - headerBytes.length;
               header: for (int counter = 0; counter < 30; counter++) {
                    String fileContents = cd.decode(ByteBuffer.wrap(b)).toString();
                    int index = fileContents.indexOf(header);
                    if (index < 0) break header;
                     int headerEnd = index + headerBytes.length;
                     int endChunk = b.length - headerEnd;
                     byte[] initArray  = new byte[index];
                     System.arraycopy(b, 0, initArray, 0, index);
                     byte[] finalArray = new byte[endChunk];
                     System.arraycopy(b, headerEnd, finalArray, 0, endChunk);
                     b = new byte[b.length + headerExcess];
                     System.arraycopy(initArray, 0 , b, 0, index);
                     System.arraycopy(headerChange, 0 , b, index, headerChange.length);
                     System.arraycopy(finalArray, 0, b, headerEnd + headerExcess, endChunk);
               } //Final FOR
               out = new FileOutputStream(new File(nameTo));
               out.write(b);
               out.flush();
           } finally {
                if (out != null) out.close();
                if (in != null) in.close();
           }

If the file is binary, converting it into a String is not a reversible operation and you will definitely get data corruption. You need to work directly in bytes.

Similar Messages

  • Change query string in ireport xml file?

    greetings all
    iam newbie to xml
    first i want to add the xml file to a packge named first,how to do that?
    second i want to change the query string to be
    "select * from report where month= "+textfield.getText()
    here's the code:
    <?xml version="1.0" encoding="UTF-8"  ?>
    <!-- Created with iReport - A designer for JasperReports -->
    <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
    <jasperReport
               name="Untitled_report_2"
               columnCount="1"
               printOrder="Vertical"
               orientation="Portrait"
               pageWidth="595"
               pageHeight="842"
               columnWidth="535"
               columnSpacing="0"
               leftMargin="30"
               rightMargin="30"
               topMargin="20"
               bottomMargin="20"
               whenNoDataType="NoPages"
               isTitleNewPage="false"
               isSummaryNewPage="false">
         <property name="ireport.scriptlethandling" value="0" />
         <property name="ireport.encoding" value="UTF-8" />
         <import value="java.util.*" />
         <import value="net.sf.jasperreports.engine.*" />
         <import value="net.sf.jasperreports.engine.data.*" />
         <queryString><![CDATA[SELECT * FROM report]]></queryString>
         <field name="category" class="java.lang.String"/>
         <field name="values" class="java.lang.Integer"/>
         <field name="series" class="java.lang.String"/>
              <background>
                   <band height="0"  isSplitAllowed="true" >
                   </band>
              </background>
              <title>
                   <band height="0"  isSplitAllowed="true" >
                   </band>
              </title>
              <pageHeader>
                   <band height="0"  isSplitAllowed="true" >
                   </band>
              </pageHeader>
              <columnHeader>
                   <band height="0"  isSplitAllowed="true" >
                   </band>
              </columnHeader>
              <detail>
                   <band height="201"  isSplitAllowed="true" >
                        <stackedBar3DChart>
                             <chart  hyperlinkTarget="Self" >
                             <reportElement
                                  x="32"
                                  y="21"
                                  width="394"
                                  height="144"
                                  key="element-1"/>
                             <box></box>
                                  <chartLegend textColor="#000000" backgroundColor="#FFFFFF" >
                             </chartLegend>
                             </chart>
                             <categoryDataset>
                                  <dataset >
                                  </dataset>
                                  <categorySeries>
                                       <seriesExpression><![CDATA[$F{series}]]></seriesExpression>
                                       <categoryExpression><![CDATA[$F{category}]]></categoryExpression>
                                       <valueExpression><![CDATA[$F{values}]]></valueExpression>
                        <itemHyperlink >
                        </itemHyperlink>
                                  </categorySeries>
                             </categoryDataset>
                             <bar3DPlot >
                                  <plot />
                                  <categoryAxisFormat>
                                       <axisFormat >
                                       </axisFormat>
                                  </categoryAxisFormat>
                                  <valueAxisFormat>
                                       <axisFormat >
                                       </axisFormat>
                                  </valueAxisFormat>
                             </bar3DPlot>
                        </stackedBar3DChart>
                   </band>
              </detail>
              <columnFooter>
                   <band height="3"  isSplitAllowed="true" >
                   </band>
              </columnFooter>
              <pageFooter>
                   <band height="0"  isSplitAllowed="true" >
                   </band>
              </pageFooter>
              <summary>
                   <band height="0"  isSplitAllowed="true" >
                   </band>
              </summary>
    </jasperReport>

    the xml file
    <?xml version="1.0" encoding="UTF-8"  ?>
    <!-- Created with iReport - A designer for JasperReports -->
    <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
    <jasperReport
               name="test"
               columnCount="1"
               printOrder="Vertical"
               orientation="Portrait"
               pageWidth="595"
               pageHeight="842"
               columnWidth="535"
               columnSpacing="0"
               leftMargin="30"
               rightMargin="30"
               topMargin="20"
               bottomMargin="20"
               whenNoDataType="NoPages"
               isTitleNewPage="false"
               isSummaryNewPage="false">
         <property name="ireport.scriptlethandling" value="0" />
         <property name="ireport.encoding" value="UTF-8" />
         <import value="java.util.*" />
         <import value="net.sf.jasperreports.engine.*" />
         <import value="net.sf.jasperreports.engine.data.*" />
         <queryString><![CDATA[SELECT * FROM report WHERE category BETWEEN 'week1' AND 'week4']]></queryString>
         <field name="category" class="java.lang.String"/>
         <field name="values" class="java.lang.Integer"/>
         <field name="series" class="java.lang.String"/>
              <background>
                   <band height="0"  isSplitAllowed="true" >
                   </band>
              </background>
              <title>
                   <band height="50"  isSplitAllowed="true" >
                        <staticText>
                             <reportElement
                                  x="158"
                                  y="7"
                                  width="183"
                                  height="37"
                                  key="staticText-1"/>
                             <box></box>
                             <textElement>
                                  <font size="14"/>
                             </textElement>
                        <text><![CDATA[               Report]]></text>
                        </staticText>
                   </band>
              </title>
              <pageHeader>
                   <band height="50"  isSplitAllowed="true" >
                   </band>
              </pageHeader>
              <columnHeader>
                   <band height="30"  isSplitAllowed="true" >
                   </band>
              </columnHeader>
              <detail>
                   <band height="4"  isSplitAllowed="true" >
                   </band>
              </detail>
              <columnFooter>
                   <band height="2"  isSplitAllowed="true" >
                   </band>
              </columnFooter>
              <pageFooter>
                   <band height="0"  isSplitAllowed="true" >
                   </band>
              </pageFooter>
              <summary>
                   <band height="194"  isSplitAllowed="true" >
                        <stackedBar3DChart>
                             <chart  hyperlinkTarget="Self" >
                             <reportElement
                                  x="49"
                                  y="-6"
                                  width="369"
                                  height="200"
                                  key="element-1"/>
                             <box></box>
                                  <chartLegend textColor="#000000" backgroundColor="#FFFFFF" >
                             </chartLegend>
                             </chart>
                             <categoryDataset>
                                  <dataset >
                                  </dataset>
                                  <categorySeries>
                                       <seriesExpression><![CDATA[$F{series}]]></seriesExpression>
                                       <categoryExpression><![CDATA[$F{category}]]></categoryExpression>
                                       <valueExpression><![CDATA[$F{values}]]></valueExpression>
                        <itemHyperlink >
                        </itemHyperlink>
                                  </categorySeries>
                             </categoryDataset>
                             <bar3DPlot >
                                  <plot />
                                  <categoryAxisFormat>
                                       <axisFormat >
                                       </axisFormat>
                                  </categoryAxisFormat>
                                  <valueAxisFormat>
                                       <axisFormat >
                                       </axisFormat>
                                  </valueAxisFormat>
                             </bar3DPlot>
                        </stackedBar3DChart>
                   </band>
              </summary>
    </jasperReport>the java code:
    import java.sql.*;
    import net.sf.jasperreports.view.JasperViewer;
    import net.sf.jasperreports.engine.xml.JRXmlLoader;
    import net.sf.jasperreports.engine.JasperCompileManager;
    import net.sf.jasperreports.engine.JasperFillManager;
    import net.sf.jasperreports.engine.JasperPrint;
    import net.sf.jasperreports.engine.design.JasperDesign;
    import net.sf.jasperreports.engine.JasperReport;
    import java.io.OutputStream;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    class ReportDriver {
    public static void createAndShowGUI(){
    Object[]obj={"1","2"};
    JComboBox combo=new JComboBox(obj);
    JFrame frame=new JFrame("Test");
    JButton button=new JButton("Show Report");
    frame.setLayout(new FlowLayout());
    frame.setLocationRelativeTo(null);
    frame.add(combo);
    frame.add(button);
    frame.setSize(150,100);
    frame.setVisible(true);
    button.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent e){
    show_report();     
    public static void show_report(){
    try{
             Class.forName("com.mysql.jdbc.Driver");
             Connection c = DriverManager.getConnection("jdbc:mysql://localhost/library", "root", "");
          }catch(Exception ex) {ex.printStackTrace();}
          try{
             JasperDesign jasperDesign = JRXmlLoader.load("F:\\Program Files\\Xinox Software\\JCreatorV4\\MyProjects\\chart2\\src\\report.xml");
             JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
             Connection c = DriverManager.getConnection("jdbc:mysql://localhost/library", "root", "");
             JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, null, c);
             JasperViewer.viewReport(jasperPrint);
          }catch(Exception ex) {
             String connectMsg = "Could not create the report " + ex.getMessage() + " " + ex.getLocalizedMessage();
             System.out.println(connectMsg);
       public static void main(String[] args) {
        createAndShowGUI();
    }the problem is i want when the user selects 2 from the combobox and presses the button
    the where clause in the xml file is changed to BETWEEN 'week5' AND 'week8',how to do that?

  • Encoding URL String inside a .JAD file

    hi,
    Can you guys please kindly teach me on how to encode a URL String(eg. MIDlet-Server-URL: http://123.123.123.1) into the MIDlet .JAD file so that my MIDlet can use the getAppProperty() to get the URL String value.
    I heard about this once but I do not know how to add the value into my .JAD file and implement the getAppProperty() into my MIDlet source code.
    Thanks alot.
    Warmest regards,
    Qingyan

    Application-specific attributes don't begin with "MIDlet-", so use something like "Server-URL" rather than "MIDlet-Server-URL". In your JAD file, you would include
    Server-URL: http://123.123.123.1
    In your code, you would then call getAppProperty("Server-URL") to get the URL. getAppProperty() is a method of the MIDlet class, so you could call getAppProperty() from your MIDlet's constructor.

  • Is it possible to find and Replace a string inside a textfile using JSP?

    FileInputStream fs = new FileInputStream("/opt/Abhishek/software/tomcat/webapps/AMS/listpass");
    DataInputStream in1 = new DataInputStream(fs);
    while (in1.available() !=0)
    String str1=in1.readLine();
    StringTokenizer st1 = new StringTokenizer(str1);
    String node=st1.nextToken();
    if (node.equals(sports))
    String pass=st1.nextToken();
    out.println ("<b>"+sports[i]+" <b>");
    out.println("**Your Required Password**");
    out.println(pass);
    out.println("<br></br>");
    %>
    Hi ,
    I have a text file (named listpass in the above code) inside tomcat-webapps folder containing a node name and its password.You could see the path of the text file at the starting line of the code.The Scene behind the program is once the particular node is clicked the password is retreived for the user against the particular node.What i would need is to change the password in the text file once it is retreived. So i would need to find the password that is retreived recently and change that one with a randomnly generated new password in the text file.
    So can i do this?Is it possible to search for the string in the text file and replace that with a new one using JSP.For your note i am running all my HTML amd JSP inside the same folder where i have the text file in which the string has to be replaced .
    Could anyone give your comments on this please?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Nasty in so many ways.
    First off you shouldn't be doing stuff like this in a JSP. JSPs should just build HTML, use a Servlet and then pass data to a JSP for formatting.
    Web applications are multi-threaded, so you have to consider what happens if several of these transactions come in at the same time, each trying to change the same data file.
    It's not practical to amend text files in place, generally you have to create a new version of the file for each change because if the size of a password changes the subsequent bytes of the file would all need moving.
    Use a database. Databases are designed to deal with these issues and there are perfectly good free ones around like Derby, MySQL and H2.

  • Read binary file in as string to perform RegEx

    I have a python script that I use to gather data from a particular data file. I want to convert the script into a java application so I can add a gui and make it more distributable. I am particularly struggling on how to read the binary file into java and convert it to a string for the regex searching.
    import re
    dat = 'c:/projects/test.dat'
    all_the_data = open(dat,'rb').read()
    pattern = 'title="(.*?)".*?value="(.*?)"'
    rx = re.compile(pattern, re.IGNORECASE|re.MULTILINE|re.DOTALL)
    result = rx.findall(all_the_data)
    for title, value in result:
        print "%-25s: %s" % (title, value)

    Hi infraray.
    Check my post out: Cyclomatic Complexity Using Regex .
    This will help.
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;
    import java.io.*;
    1) static BufferedReader keyboard = new BufferedReader(new InputStreamReader(System.in));
    2) protected String txtFileName;
    3) System.out.println("Enter file name to be read: " );
    4) txtFileName = new String(keyboard.readLine());
    5) reader = new BufferedReader(new FileReader(txtFileName));
    // Your Pattern |
    V
    6) Pattern pattern = Pattern.compile("if|for|while|case|switch",Pattern.MULTILINE);
    7) Matcher m = pattern.matcher(txtFileName);
    8) boolean b = m.matches(); // return true if match found !
    9) String line = null;
    10) while((line = reader.readLine()) !=null)
    m.reset(line);
    if(m.find())
    // Change line below to suit your need
    System.out.println("Your message " + " found " + " start of line: " + m.start() + " ends at line: " +m.end());
    reader.close(); // close buffered reader!
    Hope this gives you some direction.

  • How to find a string inside Excel table

    Hi,
    I am trying to find a string inside Excel table, and it does not work. Please see attached figure. I use the find Invoke Node and do not get anthing.
    Please help
    Attachments:
    find_excel.JPG ‏21 KB

    See attached files.
    Thanks,
    David
    Attachments:
    Excel_table.xls ‏15 KB
    Read_XL.vi ‏42 KB

  • Issue in reading a binary file, with 'Flatten to String' data.

    I'm facing issue while reading a binary file (created using LabVIEW).
    I've mentioned everything (issue and method to reproduce it) within the attached VI.
    Same vi is attached in 2012 and 8.0 versions.
    Regards
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.
    Solved!
    Go to Solution.
    Attachments:
    Issue in VI.vi ‏26 KB
    Issue in VI (Version 8.0).vi ‏43 KB

    moderator1983 wrote:
    crossrulz wrote:
    The reading of a string from a binary file stops at a NULL character (0x00).  When the first character is 0x00, you are just reading the one character.  I would suggest writing to a byte array since you are doing the inverting.  And then you can read as a byte array.
    crossrulz:
    U rocks..!!
    you have hit bull's eye...!!
    After playing around a little more, I think I might have misinformed you a little.  If you explicitly tell it a string, it looks for the string length at the very beginning and reads that length of bytes as a string.  It appears that if you implicitly tell it to read a string (not wire the data type) it reads all of the bytes directly, including the length of string you wrote.
    Regardless, my advice is the same.  You should just write and read using byte array.  It is less conversions if you are performing your "encryption".
    EDIT:  Here's a snippet of the VI I was playing with to figure this out.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    String Binary File.png ‏12 KB

  • How to execute an SQL query present in a string inside an ABAP program?

    hello,
    How to execute an SQL query present in a string inside an ABAP program

    Raut,
    You can execute Native SQl statements.
    Ex: To use a Native SQL statement, you must precede it with the EXEC SQL statement, and follow it with the ENDEXEC statement as follows:
    EXEC SQL [PERFORMING <form>].
      <Native SQL statement>
    ENDEXEC.
    There is no period after Native SQL statements. Furthermore, using inverted commas (") or an asterisk (*) at the beginning of a line in a native SQL statement does not introduce a comment as it would in normal ABAP syntax. You need to know whether table and field names are case-sensitive in your chosen database.
    In Native SQL statements, the data is transported between the database table and the ABAP program using host variables. These are declared in the ABAP program, and preceded in the Native SQL statement by a colon (:). You can use elementary structures as host variables. Exceptionally, structures in an INTO clause are treated as though all of their fields were listed individually.
    If the selection in a Native SQL SELECT statement is a table, you can pass it to ABAP line by line using the PERFORMING addition. The program calls a subroutine <form> for each line read. You can process the data further within the subroutine.
    As in Open SQL, after the ENDEXEC statement, SY-DBCNT contains the number of lines processed. In nearly all cases, SY-SUBRC contains the value 0 after the ENDEXEC statement. Cursor operations form an exception: After FETCH, SY-SUBRC is 4 if no more records could be read. This also applies when you read a result set using EXEC SQL PERFORMING.
    EXEC SQL PERFORMING loop_output.
      SELECT connid, cityfrom, cityto
      INTO   :wa
      FROM   spfli
      WHERE  carrid = :c1
    ENDEXEC.
    Pls. Mark If useful

  • Reading a binary file to string variable does not populate correctly

    Hi, I am new to Adobe Air/Flex and I'm trying to read a
    binary file which also contains text in "cleartext". The problem
    I'm having is that when I call FileStream.readUTFBytes method, only
    the first 6 characters are showing up in my string variable
    "contents" when I debug it in FlexBuilder or use a trace command
    and debug it. I have also tried with other types of files but I
    have a similar problem unless it's a non-binary file.
    Am I doing something incorrectly or should I be reading a
    binary file differently than the way I'm reading it currently?
    The source code is shown below.
    TIA,
    Magnus
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Script>
    <![CDATA[
    import flash.filesystem.File;
    private function readFiles():void{
    var feedFile:File = File.userDirectory.resolvePath( "Local
    Settings/Application Data/Microsoft/Feeds/AppScout~.feed-ms" );
    var stream:FileStream = new FileStream();
    stream.open( feedFile, FileMode.READ );
    var contents:String =
    stream.readUTFBytes(stream.bytesAvailable);
    trace(contents);
    stream.close();
    ]]>
    </mx:Script>
    <mx:Button x="121" y="66" label="Button"
    click="readFiles()" />
    </mx:WindowedApplication>

    It's difficult to tell what it is, it looks like a binary
    pipe symbol but I can copy it from TextPad for example. Some of the
    characters following it cannot be copied from TextPad which I
    assume is because it's null. I can read the whole file in C#/.Net
    and assign it to a string variable without any problems but perhaps
    Air is somewhat limited to binary content.

  • Looking for a way to find out the x,y coordinates of a string inside a PDF

    Hi!
    I'm looking for a way to find out the x,y coordinates of a string inside a PDF (with free java api's only)
    I got a pdf, and a string to find inside it, what i need to do is to get this string x,y position inside that pdf....
    If any one knows of such, plz let me know...
    Thanx ahead
    Daniel.

    vedmack wrote:
    Hi!
    I'm looking for a way to find out the x,y coordinates of a string inside a PDF (with free java api's only)
    I got a pdf, and a string to find inside it, what i need to do is to get this string x,y position inside that pdf....
    If any one knows of such, plz let me know...
    Thanx ahead
    Daniel.AFAIK, a string of text does not have an (x,y) location inside a PDF file. The location is exists on your screen, and will differ whenever you adjust the resolution of it. Text can have a location when it's stored as an image though, but than it's really the location of a certain number of pixels (not necessarily a string!).

  • Is it possible to add a string inside a textbox with a value of another textbox for Acrobat Forms?

    Is it possible to add a string inside a textbox with a value of another textbox?
    ex.
    Textbox1 = Happy
    Textbox2 = Sad
    Textbox3 = "I am Happy therefore I am not Sad"
    "I am (value of textbox1) therefore I am not ( value of textbox2)"

    Use this code as the custom calculation code of Textbox3:
    event.value = "I am " + getField("textbox1").value + " therefore I am not " + getField("textbox2").value;
    Notice that the field names are case-sensitive.

  • Mac recognises installer (binary file) as picture - can it be changed?

    My friend sent me an installer for an app via email (surprised it came through at all at 21mb). When i download it i get a dialog in firefox saying it is a binary file do i want to save it. Then I go to open it in the finder and i get the warning that it is an application downloaded from the interenet + am i sure I want to download it. When I try to open it (clicking on it) photoshop attempts to run it but fails, with a dialog saying it doesn't recognize the file type. When I do a apple I on the file its says it is plain text. Is there a way i can change it so it will run as supposed to - if i have to get the file again it will be very inonvenient. many thanks in advance.

    If your friend is compressing the file before sending it to you... you can either have him not compress it, or you need to be sure that you have/use the correct decompression utility.
    Try contacting your friend and ask him what the correct extension for the file is. When you know for sure... Then ensure that the correct one is on the file you downloaded. If it is not change it. The mac will remind you that if you don't put the correct extension on the file it will not work properly... say OK. Now try to open it.

  • Number format changed to string in excel

    I want to store a table in excel file and in the table
    there is a number field that when I store it in the
    excel file ,I want it change to String format,
    because when it store it in the number format,
    it is a wrong number.
    thanks in advance

    "883923"
    Pretend you are explaining this to someone who has no idea what you are talking about (because we don't).
    Statements like "but therewas a problem" are next to meaningless because you didn't explain what the problem is.
    You don't give any useful information such as:
    * Version of JDeveloper/ADF
    * What technologies are you using (I guess ADF Faces, but I don't know)?
    * How did you try exporting to Excel?
    * What was the exact problem you had?
    I've already spent more time thinking about how to ask you questions to get to the real problem than you have formulating your question.
    John

  • Search for strings inside html tags ?

    Is there any way to get Spotlight to find search strings inside html documents? One example is I want to find any file that includes a certain alt=" " string inside an img src tag.
    Spotlight does not seem to include anything inside html tags in it's search, as far as I can tell.
    Am I missing something? Is there something I need to do?
    Thanks for any ideas,
    KarenD
    G5   Mac OS X (10.4.4)  
    G5   Mac OS X (10.3.5)  

    Very strange--it does find text inside the html files, but indeed does not seem to have text that is in the file but only appears within a tag. The solution is EasyFind by Christian Grunenberg:
    http://www.grunenberg.com
    You can do a content search on files in a particular folder, which I recommend since it does a brute force search and can take awhile if it has to search everything.
    Francine
    Schwieder

  • Change a string to upcase

    Hi,
    How to change a string to all upcase.
    Thanks

    what about reading the api doc for String class?
    http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

Maybe you are looking for

  • Adding Navigation Buttons for Users of PDF Documents

    The default for Acrobat Reader (and even the Pro version) seems to leave the Forward and Back navigation buttons OFF the Acrobat Reader tool bar. You have to deliberately go into the Tools - Customize Tools menu and turn on these two buttons in order

  • How to get rid of the reference lines on the front panel

    I forgot how I created a couple of horizontal and vertical reference lines on the front panel. It looks like the origin lines on the front panel. When I move my program to another monitor with different resolution, all the layout is messed up because

  • ITunes library syncing

    Hi, I have my iPhone and iPad syncingwith my library on my MacBook Air. A couple of days ago, a friend asked if he could charge his iPad from my Air, so I agreed and plugged it in. This of course loaded iTunes automatically and it started to sync, I

  • Hard drive recovery(trying to save my life)

    i have had  my  pavilion notebook for 18 months now. due to the fact of my job i travel a lot and always meant to back up my hard drive but never did. Now my hard drive is not working at all and needs to be replaced. I have a lot of precious photos a

  • Drag and Drop Problem in Card Game

    Hi, everyone, I'm trying to adapt the memory game in chapter 3 of the book "ActionScript 3.0 Game Programming University" for my own uses. I want to get all of the cards to flip and drag. I am able to flip the first card and drag it, but when I flip