Get file path name for an given FileInputStream

It sounds wired, but I do want to see if it is possible. Say we have a FileInputStream fis, which has been instantiated and valid. I would like to get the File associated with this FileInputStream. Is this possible and how?
Thanks.

It sounds wired, but I do want to see if it is
possible. Say we have a FileInputStream fis, which
has been instantiated and valid. I would like to get
the File associated with this FileInputStream. Is
this possible and how?
Thanks.A FileInputStream may not be associated with a "disk file" at all. From javadocs, FileInputStream can be created from a [url http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileInputStream.html#FileInputStream(java.io.FileDescriptor)]FileDescriptor, which can represent [url http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileDescriptor.html#skip-navbar_top]an open file, an open socket, or another source or sink of bytes.

Similar Messages

  • C Programming: How can we get the filesystem name for a given file-path?

    C Programming: How can we get the filesystem name for a given file-path?
    Say I have a filepath=/mnt1/file1
    Using some OS API like stat, can I get the Filesystem /mnt ?
    Thanks in advance,
    -V

    Enter the command up to the point of entering the file path and add a space, then drag the file into the terminal window. It will fill out the path.
    If you need to go further into the contents of the Application package, you can continue with /Contents...
    Another way is to start typing and then hit Tab to auto-complete. It will stop where it can't determine the next letter.
    So, type /App tab and it will fill in /Applications. Type a / and start with the name of the app, then tab and it should complete. Continue till you have the correct path.
    Spaces will be replaced with \<space>, so, App Store would end up as /Applications/App\ Store.app

  • How do you get the column names for a given table from an SQL LocalDB programmatically in Visual Basic.

    Just new to this and unable to find answers

    My solution
        Public Function GetTableColumnNames() As Boolean
            Form1.ListBox1.Items.Clear()
            _MDFFileName = String.Format("{0}.mdf", _DatabaseName)
            _sqlConnectionString = String.Format("Data Source=(LocalDB)\v11.0;AttachDBFileName={1};Initial Catalog={0};Integrated Security=True;", _DatabaseName, Path.Combine(_DatabaseDirectory, _MDFFileName))
            Dim cn As New SqlConnection(_sqlConnectionString)
            'put the table name in brackets in case it has spaces in it
            Dim SQLString As String = "SELECT * FROM [" & _TableName & "]"
            Try
                cn.Open()
                Dim cmd As New SqlCommand(SQLString, cn)
                Dim rdr As SqlDataReader =
                cmd.ExecuteReader(CommandBehavior.KeyInfo)
                Dim tbl As DataTable = rdr.GetSchemaTable
                'This shows all of the information you can access about each column.
                For Each col As DataColumn In tbl.Columns
                    Form1.ListBox1.Items.Add(col.ColumnName)
                    Debug.Print("col name = " & col.ColumnName & ", type = " & col.DataType.ToString)
                Next
                'Get each column.
                For Each row As DataRow In tbl.Rows
                    Form1.ListBox1.Items.Add(row("ColumnName"))
                Next
                rdr.Close()
            Catch
                MessageBox.Show("Error opening the connection to the database.")
            Finally
                cn.Close()
            End Try
            Return _Success
        End Function

  • How to get the loaded client sequence file path/name?

    I added a step in Process model, and wanted to get currently loaded client sequence file name/path. I used the variable of "SequenceFile.Path" but then I realized what I would get is the process model file path, not loaded client sequence file path/name. How can I get loaded client sequence file path/name?
    Thanks!
    Jacky

    I dont understand what you are trying to achieve.  Can you provide more information.
    If you are trying to dynamically load and run a client sequence file at run time you need to make a couple of calls to the TS API from inside the process model, Engine.GetSequenceFileEx to get a reference to your sequence identified by its pathname, and then Execution.ClientFile to tell the process model which sequence you want to run.
    Steve
    There are 10 types of people in the world that understand binary, those that do and those that don't.

  • How to get the owner name for the file in ftp using abap ?

    Hi folks ,
    How to get the owner name for the file in ftp using abap ? please help me very ugernt . I tried with all standard FTP commands
    but doest work out me . Helping in this regard highly appreciated ...
    Thanks and regards,
    Swarupa Vanarchi

    Hi
    dont you  have used the os user while calling the FTP_CONNECT FM?
    Hope you are not talking about the user executing the FTP program.
    Else If you are talking about the FTP file creator then its not related to abap as you can handle it by maintaining the user in file name itself.
    May be i am going too far with if and elses here as your question possesses no  clarity.
    Plz elaborate your requirement  before anybody can help.
    Regards
    sateesh

  • How can I get the path name and rename it?

    I Hope someone who knows more about automator than I can help me out here. What I'm trying to do is get the path file name, while also changing part of it. Here is my example:
    I can get the path name with this "Get Path" script I found http://automatorworld.com/archives/get-path/all-comments/
    It does half the job so I just need to tweak it but know how. When I get the path this is what I'll get: /Volumes/Public/Creative Services/Campaigns/2010/NCDDiv-32CDV Upgrade/NCDDIV-32Versions.xls
    I need to remove the beginning part"/volumes" to "file://///nhmanmkt01"
    This is so I can send the path from our sever where we keep our files to my windows friends so they can open it.
    Thanks for any help you can provide!

    ok, make the following workflow.
    1. get selected finder items.
    2. run shell script
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #ADD8E6;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    for f in "$@"
    do
    echo "$f"|sed 's%/Volumes%file://///nhmanmkt01%'
    done</pre>
    set the script to accept input as arguments
    3. copy to clipboard
    save it as a finder plugin.

  • File Path Name

    Microsoft Word 2010: How do I view the the entire file path name. We run on a network and need to see the entire document name in the Quick Access Toolbar.
    Thanks for any help!

    Hi,
    If you want to see the entire file path of a Microsoft Word 2010 file which stored on a network. We at least have places where you can check this info:
    1.Click File on the ribbon to go to Info page, check the
    file path under file name in the upper left corner.
    2.Add the file path to the Headers and footers:
      1) Open the headers and footers for editing.
      2) Under the Header and Footer Tool tab, Click Quick Parts.
      3) Select Field in the drop-down list.
      4) Select FileName in the list of Field names.
      5) Check the checkbox of Add path to filename.
      6) Click OK. The entire file path name will show in the header of the document.
    We might not be able to add this to the Quick Access Toolbar easily as it's not a built-in command of Word 2010.
    Thanks,
    Ethan Hua CHN
    TechNet Community Support

  • Invalid File Path Names in Mac OS X

    Hello,
    I am trying to create a Javascript in Mac OS X 10.4.11, however I am having some trouble with what characters are valid in file path names in Mac OS X. Does anybody know where I can get a list of invalid characters that cannot be used in a file name?
    Thanks,
    james

    Any character other than a colon can be used in the name, but additional characters and names may be handled differently if you are interacting with the UNIX shell in the script.
    (30221)

  • Error code -43 - unable to get file path when burning DVD

    I just installed Tiger on my son's iMac 500. Borrowed a Lacie DVD r/w and tried to burn the contents of a user folder to a DVD-R. It burned part of it, but failed with the following error:
    The operation can not be completed because one or more
    required items an not be found. (Error coed -43).
    Could not open the dat fork of "<unable to get file path>" (-43).
    I was able to burn a CD on the drive, but that was for another user directory that fit on a CD-R. The folder I was trying to burn to the DVD was about 1.1 G.
    Thanks,
    Alfredo

    I just installed Tiger on my son's iMac 500. Borrowed a Lacie DVD r/w and tried to burn the contents of a user folder to a DVD-R. It burned part of it, but failed with the following error:
    The operation can not be completed because one or more
    required items an not be found. (Error coed -43).
    Could not open the dat fork of "<unable to get file path>" (-43).
    I was able to burn a CD on the drive, but that was for another user directory that fit on a CD-R. The folder I was trying to burn to the DVD was about 1.1 G.
    Thanks,
    Alfredo

  • Maximum file path name exceeded

    While using Creative Cloud Packager to create a package I receive the error 'maximum file path name exceeded' during the download.  The package save location I orginally chose was \\server\share\adobe\Creative Suite.  After the first failure, I mapped a 'Z drive' to that location and am still getting the error.  How do make a path shorter than 'Z:\'?
    I'm using Windows XP SP3 to create a 64 bit Windows package.  I just downloaded and installed the Creative Cloud Packager today.
    Thanks to  anyone who can help.

    I did some further troubleshooting and couldn't get it working on the XP PC.  I installed the Creative Cloud Packager on a Win 8 PC and it looks like it's working as it should.

  • ITunes cannot get CD track names for CDs that were not imported with iTunes

    I have a number of WAV files and MP3 files that already have album information. I would like to erase that information and have it replaced using the "Get CD Track Names" function, but keep receiving an error message of "iTunes cannot get CD track names for CDs that were not imported with iTunes." Is there some way to strip the previous information and replace it with information that iTunes receives with the "Get CD Track Names" function?

    Programs like itunes use characteristics of the CD such as track duration and sequence to identify CDs. Potentially this could be modified in a very small manner (maybe even a millisecond) in converting to a different format so maybe itunes doesn't even want to try getting the information for other formats.
    You can certainly replace whatever information you wish by "get info" on a single or multiple selection of files and entering the data by hand.

  • Packager fails with "Maximum file path name exceeded" on InCopy

    Attempting to build the full suite with CCP 1.5.0 Build 83, running on Window 8.1 update 64-bit.
    When building a 32-bit package it reaches InCopy it always stops and provides the so helpful "Maximum file path name exceeded error".  This appears to only happen when building the 32-bit package, building the 64-bit package caused no issues, and even in building the 32-bit package after the 64-bit package when everything is already downloaded the same error occurs.
    Tried it with:
    Cache path: C:\Users\iholmes\AppData\Local\Adobe\CCP\
    Destination path: F:\ISO\Adobe\Cloud\Working\CreativeCloud-06192014x86
    Also tried:
    Cache path: g:\Adobe\CCP
    Destination path: f:\cc\x86
    These are all local paths, not mapped network drives.

    Same here. From: C:\Users\<user>\AppData\Local\Temp\PDApp.log:
      <errorType>LongPathError</errorType>
      <filePath>C:\Users\<user>\AppData\Local\Temp\{839FDA1E-684B-4164-A8A0-AC83A4D37D3F}\AICY\ LS20\10.0\InCopy_10_LS20_Win32
    I can manually extract the zip file from:  C:\Users\<user>\AppData\Local\Adobe\CCP\AdobeCCPCache\AICY\LS20\InCopy_10_LS20_Win32.7z to the above path (which I think is what it's trying to do) with no error, so it seems to be something Adobe is going to have to fix.
    Someone else worked around it by creating a local user with a single character as the user name: Creative Cloud Packager Keeps Failing on InDesign: "Maximum File Path Name Exceeded"

  • File Path Names

    I want to put the File path name of our documents to the head of files as a reference. I know this can be done with Macros on Word/Excel, but is there a way to achieve this with applescript in pages/numbers?

    Insert Filename was one of the features that made it's appearance in iWork '09. The feature has an option to include the entire path. I imagine that with a script it might be possible to insert the filename path in a Pages '08 document.
    Jerry

  • How to get a organization name for a particular user using API's

    Hi alll,
    How to get a organization name for a particular user using API's

    You need to do something like this:
    SearchCriteria criteria = new SearchCriteria("User Login", "XELSYSADM", SearchCriteria.Operator.EQUAL);
                   UserManager usrService = oimClient.getService(UserManager.class);
                   Set<String> retAttrs = new HashSet<String>();
                   retAttrs.add(UserManagerConstants.AttributeName.USER_ORGANIZATION.getId());
                   List<oracle.iam.identity.usermgmt.vo.User> users = usrService.search(criteria, retAttrs, null);
                   System.out.println("ORG KEY :: " + users.get(0).getAttribute("act_key"));

  • How to get mobile model name for different types mobile devices

    Hi,
    I have checked few thread in this forum about getting mobile model name at server. So far, i noticed the mobile name is set manually in the midlet as user-agent .
    HttpConnection connection = null;           connection = (HttpConnection)Connector.open(url);          connection.setRequestMethod(HttpConnection.POST);          connection.setRequestProperty("User-Agent","Nokia7110 Profile/MIDP-1.0 Configuration/CLDC-1.0");
    i retrieve the header information from servlet like below :-
    String userAgent = request.getHeader("User-Agent");
    How to get mobile model name for different model devices , not by manually adding the model name in midlet?
    Thanks in advance :-)

    Hi,
    In J2ME there is no method to get the model number from the device. how ever you can use the APIs provided by the device manufacturer if available. But still the APIs will not work with devices from other manufacturer or sometimes it will not work with the devices of the same manufacturer if the API is not supported. so it is better to send the device model name through the header.

Maybe you are looking for

  • Authorization in BEx Query Designer: "read only" for definitions of variables

    Hello, I`m developing a concept of authorizations for key user who should be able to maintain certain objects in the query designer. For other objects they should have access "read only". The users have authorizations  to  design new queries.  They s

  • Mail adapter ignores decimal point

    Message going out from Mail adapter ignore decimal point. One of the attibutes in xml file has a value "1.0". When I check the message in SXI_MONITOR -> Call adapter -> Payloads -> MainDocument, attribute value is "1.0". But when file is received by

  • Video introduction in menu

    I'm using DVDSP4. I'm looking to have a 30-second video introduction to the menu without that pesky change-over time. Basically, I have the entire thing arranged in FCP including the menu background. I know the whole issue about loop points, but how

  • Alternative to the firewire cable for macbooks

    I was wondering if there was some sort of alternative to firewire for uploading film footage? My macbook does not have a port to plug in firewire. I know that USB can be used instead but that this can lower the quality. Is there another way that you

  • CPU apparent usage of 100% when no applications running.

    Quite frequently, and all day so far today, I have indications that the cpu is running at 100% even though no applications are running (it also shows that when they are and they don't seem particularly affected). I have tried putting to sleep for a p