How to read the header of an FLV 1.1 file?

I would like to read the header of an FLV file and determine
if it's an FLV 1.1 file, and if so, get it's length. (Without
downloading the entire file. ) How do I do this?

bump

Similar Messages

  • How to read the date and time information of a file by labview

    how to read the date and time information of a file by labview? for example, created time and modified time.
    Solved!
    Go to Solution.

    if you need to know the last modification date of file:-
    "Functions->File I/O->Advanced File Functions->File/Directory Info.vi"
    This vi returns the value of file's last modification date. This is returned as U32 number. To see it in MM/DD/YY format you must create the indicator, right-click on it and select "Format & Precision" item from drop-down menu. Then select "Time and Date" format there.
    Thanks as kudos only

  • Powershell: How to change the header name in a imported CSV file

    HI All,
    I have a csv file in which I want to change the headers names in powershell.
    oldnames are name,id
    newnames I want to give are: company and transit respectively.
    Following is what I wrote in script:
               $a = import-csv .\finalexam\employees.csv -header name,id'
                       foreach ($a in $as[1-$as.count-1])  // I used 1 here because I want it to ignore the  exiting headers.
                      { $_.name -eq company, $_.id -eq transit}
    I think this not entirely correct way to do this. Can someone show me how to fix this.
    Regards
    SQL 75

    If you're not an experienced PowerShell programmer, I recommend editing the file in a text editor and changing the name that way.
    -- Bill Stewart [Bill_Stewart]

  • How to read the 'full resolution composite' from a .psd file?

    I'm working with 16-bit .psd files and have the "maximize compatibility" switch turned on in CS2. When a file is saved, a message box appears indicating that PS is generating a "full resolution composite." I'd guess this is stored in the .psd file somehow, because some of the 3rd party image viewers are able to display the image when the compatibility switch is used, but are unable to display the image otherwise.
    My question is: how can I read this full resolution composite from the .psd file outside of Photoshop?
    If this is the wrong forum to post this question, I'd appreciate it of you'd tell me a better place.
    Thanks,
    Dave H.

    As you guess, it is stored in the PSD, but only with the Maximise Compatibility switch. Without that switch, a dummy image is stored which has the text "This layered Photoshop file was not saved with a composite image.", in English, German, Japanese and French.
    My program
    psdparse extracts each layer in an 8-bit file as a PNG, and the merged image for both 8- and 16-bit files. That link is to a Subversion repository containing source code.

  • How to read the content in one node of XML in Java? Pls help

    My dear brothers,
    I am a newbie of XML, I have a exercise which is creating a Tree View from XML file. But the trouble is I do not know how to read the content in one node of XML file. I decide to use the algorithm as following:
    1. Create a GUI form which gives the ability for user to choose a XML file (ok)
    2. Load XML and return the file (ok)
    3. Read the file from node to node to create the node in Tree View (?!)
    Please help me, and if you are enough kind, please give me an small example to easy understand. Thanks in advance.
    Hoang Yen Binh

    I hope this one helps you.
         <ABC Type="ProductBased" ProdName="One" Location="India">
              <CEO>Raj</CEO>
              <Finance>Vikram</Finance>
              <HR>Karthik</HR>
              <Technical>Satish</Technical>
         </ABC>
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NamedNodeMap;
    import org.w3c.dom.Attr;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Node;
    import org.w3c.dom.DOMException;
    import javax.xml.parsers.ParserConfigurationException;
    import org.xml.sax.SAXException;
    import java.io.File;
    import java.io.IOException;
    public class XmlReading {
         Document doc;
         Element element;
         public static void main(String[] args) throws Exception{
              XmlReading xr = new XmlReading();
              xr.getXmlParser(args);
         public void getXmlParser(String[] args) {
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                   if(args.length != 1) {
                        System.err.println("Argument Required");
              try {
                   DocumentBuilder builder = factory.newDocumentBuilder();
                   doc = builder.parse(new File(args[0]));
              }catch(ParserConfigurationException e1) {
              }catch(SAXException e2) {
              }catch(IOException e3) {
              getAttributes();
         public void getAttributes() {
              // Retrive the entire Document from the Dom Tree
              element = doc.getDocumentElement();
    //          System.out.println(element);
              NamedNodeMap attrs = element.getAttributes();
              // Get number of attributes in the element
         int numAttrs = attrs.getLength();
         // Process each attribute
              for (int i=0; i<numAttrs; i++) {
                   Node node = attrs.item(i);
                   // Get attribute name and value
                   String attrName = node.getNodeName();
                   String attrValue = node.getNodeValue();
                   System.out.println(attrName + ": " + attrValue);
              String s1 = element.getTagName();
              System.out.println(s1);
              // To get all the elements in a DOM Tree
              NodeList nl1 = element.getElementsByTagName("*");
              int i2 = nl1.getLength();
              System.out.println(i2);
              for(int i=0; i<i2; i++) {
                   System.out.println(nl1.item(i) + "\n");
    }

  • Help me...How to read the content if "Transfer-Encoding:chunked" is used?

    I am doing a project for internet control using Java,PHP and MySql.All sites should go through the proxy server only.If the HTTP header contains Content-Length,am getting the content length as below:
    public class HTTPResponseReader extends HTTPMessageReader
        String statusCode;
        public HTTPResponseReader(InputStream istream) throws IOException,                     NoSuchElementException
      BufferedInputStream distream = new BufferedInputStream(istream);
      retrieveHeader(distream);
      StringTokenizer st =  new StringTokenizer(new String(HTTPMessageReader.toArray(header)));
      versionProtocol = st.nextToken();
      statusCode = st.nextToken();
      String s;
      while (st.hasMoreTokens())
            s = st.nextToken();
            if (s.equals("Transfer-Encoding:"))
           transferEncoding = new String(st.nextToken());
         if (s.equals("Content-Length:"))
           contentLength = Integer.parseInt(st.nextToken());
         if (s.equals("Connection:"))
          connection = new String(st.nextToken());
          if (connection.equals("keep-alive")) mustCloseConnection = false;
       retrieveBody(distream);     
    }After getting the Content-Length,i used read method to read the content upto that content length.Then i concatenated the HTTP header and body and the requested site was opened.But some sites dont have Content-Length.Instead of that,Transfer-Encoding is used.I got the HTTP Response header as "Transfer-Encoding:chunked" for some sites.If this encoding is used how to get the length of the message body and how to read the content.
    Can anybody help me.
    Thanks in advance...
    Message was edited by:
    VeeraLakshmi

    Why don't you use HttpUrlConnection class to retrieve data from HTTP server? This class already supports chunked encoding...
    If you want to do anything by yourself then you need to read HTTP RFC and find all required information. Well in two words you may reject advanced encoding by specifying HTTP 1.0 in your request or download chunked answer manually. Read RFC anyway :)

  • How to wrap the heading text in alv.

    HI all,
          I need help, how to wrap the heading text in alv.
    can any help ... plz..
    Advanced Thanks
    Regards
    GUhapriyan

    Hello GuhaPriyan,
    I assume that you're referring to the ALV Grid's title. The maximum length for this title is 70 characters and this would generally fit in the one line.
    Are you intending to wrap it because you purposefully want the text to come in two lines? In that case, I'm not sure that it's possible.
    But otherwise, there's an option in the Layout called SMALLTITLE. You can set this attribute so that the title would be displayed in a amaller font and hopefully, all of your text shows up on the screen.
    Regards,
    Anand Mandalika.

  • How to find the header and item level status of a CRM contract ?

    Hi,
    Few questions
    A. How to find the header and item level status of a CRM contract ? My req is to select all the contract line items which are in CLOSED status.
    B. How to get the BPs associated with a contract ?
    Anyone have the list of CRM tables and the relation amongst them. Please mail me in [email protected]

    CRMD_ORDERADM_H     Contains the Header Information for a Business Transaction.
    Note:
    1.     It doesn’t store the Business Partner
           responsible for the transaction. To 
           get the Partner No, link it with
           CRM_ORDER_INDEX.
    2.     This table can be used for search
           based on the Object Id(Business
           Transaction No). 
    CRMD_CUSTOMER_H     Additional Site Details at the Header Level of a Business Transaction
    CRMD_LINK     Transaction GUID set for all the Business Transactions
    CRMD_ORDER_INDEX     Contains Header as well as Item details for a Business Transaction.
    Note:
    1.     It doesn’t store the Business 
          Transaction No (Object ID).
          To get the Business Transaction No  
          link the table with
          CRMD_ORDERADM_H
    2.   This table can be used for search
          based on the Partner No
    CRMD_ORDERADM_I     Stores the Item information for a Business Transaction. The scenarios where we have a Contract Header and within contract we have Line Items for the contract, this table can be useful.
    E.g. Service Contracts
    CRMD_CUSTOMER_I     Additional Site Details at the Item Level of a Service Contract
    Pl.reward points.......

  • How to skip the header rows of the file using UTL_FILE?

    Hi,
    I created a procedure to read the file from shared location using UTl_FILE package. But, I stucked why because I don't know how to skip the header rows as those rows are headings for one of the report.Since, please help me.
    Regards,
    Vissu.....

    vissu wrote:
    Hi,
    I created a procedure to read the file from shared location using UTl_FILE package. But, I stucked why because I don't know how to skip the header rows as those rows are headings for one of the report.Since, please help me.
    Regards,
    Vissu.....UTL_FILE just reads data from the file. It has no concept of what could be a "header" or "body" or "records" or "footer" or any other data based concept. If you want to skip lines of a file, you will just need to read them using UTL_FILE and ignore them.

  • How to boldface the header for ONE column

    hi,
    I want to know how to boldface the header for ONE column. The following will boldface the header for all the columns in the table
    table.getTableHeader().setFont(new java.awt.Font("Dialog", 1, 12));
    Thanks.
    Jrabi

    jtable.getColumnModel().getColumn( indexOfBoldColumn ).setHeaderRenderer( TableCellRenderer aRenderer )

  • How to get the header to downloading fine

    Hi,
    i am downloading xl file for which i need to get the header.i doesnt no the fieldnames.how to get the header for entire file.

    Hi,
    For this please create an internal table for field names and pass it to FM' WS_DOWNLOAD'.
    Sample code:
    * internal table for headers
    DATA : BEGIN OF it_fieldnames OCCURS 0,
           name(100),
           END OF it_fieldnames.
    g_fname = 'C:\Documents and Settings\kut3kor\Desktop\kar4.xls'.
    *populate the internal table
    it_fieldnames-name = 'Material Number'.
    APPEND it_fieldnames.
    it_fieldnames-name = 'Material type'.
    APPEND it_fieldnames.
    it_fieldnames-name = 'Material group'.
    APPEND it_fieldnames.
    CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
    *   BIN_FILESIZE                  = ' '
    *   CODEPAGE                      = ' '
       FILENAME                      = g_fname
       FILETYPE                      = 'DAT'
    *   MODE                          = ' '
    *   WK1_N_FORMAT                  = ' '
    *   WK1_N_SIZE                    = ' '
    *   WK1_T_FORMAT                  = ' '
    *   WK1_T_SIZE                    = ' '
    *   COL_SELECT                    = ' '
    *   COL_SELECTMASK                = ' '
    *   NO_AUTH_CHECK                 = ' '
    * IMPORTING
    *   FILELENGTH                    =
      TABLES
        data_tab                      = gt_mara[]
       FIELDNAMES                    = it_fieldnames[]
    * EXCEPTIONS
    *   FILE_OPEN_ERROR               = 1
    *   FILE_WRITE_ERROR              = 2
    *   INVALID_FILESIZE              = 3
    *   INVALID_TYPE                  = 4
    *   NO_BATCH                      = 5
    *   UNKNOWN_ERROR                 = 6
    *   INVALID_TABLE_WIDTH           = 7
    *   GUI_REFUSE_FILETRANSFER       = 8
    *   CUSTOMER_ERROR                = 9
    *   OTHERS                        = 10
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Regards,
    Karuna.

  • The Header in my home page is truncated. My home page Header is cut off. The header appears in Internet Explorer, but not in Mozilla Firefox 3.6.13. How to make the header display in Firefox?

    The Header in my home page is truncated. My home page Header is cut off. The header appears in Internet Explorer, but not in Mozilla Firefox 3.6.13. How do make the header display?

    (Images or animations do not show) worked well.

  • Vc++ how to read column header of cursor

    How to fetch the Column name or header of the stored procedure which is using a cursor as the output.
    P_out  out sys_refcursor
    need to read the column name of this output.
    I am using Vc++ code to reterive the data, in Vc++ how to read column header of cursor

    You haven't provided much detail to go on.  How are you reading data from the ref cursor? Do you already have a reader from it?
    Maybe this helps.
    Greg
    create or replace procedure proc1 (v1 out sys_refcursor) as
    begin
    open v1 for select * from emp;
    end;
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    public class RefCur
        public static void Main()
            using (OracleConnection con = new OracleConnection("user id=scott;password=tiger;data source=orcl"))
                con.Open();
                using (OracleCommand cmd = new OracleCommand("proc1", con))
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.Add(new OracleParameter("v1", OracleDbType.RefCursor, ParameterDirection.Output));
                    cmd.ExecuteNonQuery();
                    using (OracleDataReader reader = ((OracleRefCursor)cmd.Parameters[0].Value).GetDataReader())
                        for (int i=0;i<reader.FieldCount;i++)
                            Console.WriteLine(reader.GetName(i));

  • How to read the data in excel sheet

    Dear sir,
    How to read the data in excel sheet when i recieve a data serial communication... ie i have store a data in excel such that
    Cell A       Cell B
       A           Apple 
       B           Ball
       C           Cat
       D           Doll
    when i recieve A from serial communication i have to display Apple, and when i recieve B i have to display Ball and so on.. 

    Hi, 
    I would recommend you to have a look at the VI attached. It makes use of a VI named 'Read from Spreadsheet' to read the row and column data from the tab delimited excel file. The read data is then searched for the Alphabet specified and finally returns you the corresponding string. The test file used to validate the operation of the VI is also attached. 
    Trust this would help you solve the issue. 
    Regards, 
    Sagar G Yadav | Application Engineer | National Instruments
    Attachments:
    read_from_excel.vi ‏10 KB
    Book1.txt ‏1 KB

  • How to read the file from a folder.

    Hi All,
    How to read the file from a folder or directory from the non sap server / remote server.
    Regards
    Sathis

    open dataset filename for input in text mode
                         encoding default.
    filename is character type variable with the destination filename.
    Edited by: Jino Augustine on Apr 19, 2010 1:31 PM

Maybe you are looking for