.prproj file extension missing in file association preferences Bridge

I recently updated Bridge and lost my ability to open Premiere Pro projects from Bridge.  The prproj file would open in Media Encoder instead. I could however open the prproj file in Windows Explorer. The following is the fix to add prproj to file association option to Bridge.
The Steps
Navigate to C:\Program Files\Adobe\Adobe Bridge CC (64 Bit)\Resources\Adobe Bridge Opener Preferences.xml
Right Click on the file named Adobe Bride Open Preferences.xml , select "edit" from the fly out menu. The file will open in "Notepad"
Expand the Notepad window, scroll to the bottom. Before the statement </openers> copy and paste the following statement.
app_name="Premiere Pro">  
    <item description="$$$/Bridge/OpenersXML/Description/PremiereProject=Premiere Pro" extensions="prproj" app_name="OS">
     4. Now save the file to the desktop as Adobe Bridge Opener Preferences.xml and close.
     5. Navigate to C:\Program Files\Adobe\Adobe Bridge CC (64 Bit)\Resources
     6. Drag the file you saved to the the Bridge Resources folder.
     7. When prompted click "Move and Replace"
     8. Open Bridge and go to Edit> Preferences> File Type Associations
     9. Scroll to the bottom and you will see Premiere ( if you do not you may need to restore to default)
     10. Now you can add the correct File Association to the .prproj file.
I am not sure if this is an isolated problem, but I thought that this information could help someone out there.

thanks again... when you look at the directory tree in bridge i see...
all of the folder and files where of jpeg and i could open and edit 
here but they would not be edited in iphoto... once i updated to 
ilife09 they became this...
also if I go in thru the harddrive to get a picturefrom the pictures 
folder that you see at the top it sends me here... i now have to 
access the photo library by the way of the finder to the pictures 
folder... any thoughts as to how to clean this up and would deleting 
bridge help remove?
russLAZAR
[email protected]
714-505-5441
russLAZAR
[email protected]
714-505-5441

Similar Messages

  • What is this prompt? The required index.xml file is missing. "file" couldn't be opened.

    What is this prompt? The required index.xml file is missing. "file" couldn’t be opened.

    Helps if you tell us what version of Pages and something about the file.
    Probably you have 2 versions of Pages on your Mac.
    Pages 5 is in your Applications folder.
    Pages '09/'08 is in your Applications/iWork folder.
    You are alternately opening the wrong versions.
    Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
    Pages 5.01 can not open Pages 5.1 files and you will get the warning that you need a newer version.
    Pages 5 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
    Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
    Once opened and saved in Pages 5.1 files can not be opened in Pages 5.
    Anything that is saved to iCloud is also converted to Pages 5 files.
    All Pages files no matter what version and incompatibility have the same extension .pages.
    Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
    Apple has removed over 95 features from Pages 5 and added many bugs:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Archive/trash Pages 5, after exporting all Pages 5 files to Pages '09 or Word .docx, and rate/review it in the App Store, then get back to work.
    Peter

  • "Cannot open File Extension. Unknown file extension. Error code: 40003-5"

    Good Afternoon Everyone,
    I am getting an error message when the user is trying to access the link on their activity.
    "Cannot open File Extension. Unknown file extension. Error code: 40003-5"
    Can someone help?

    Please go to administration ->system initilization->general settings> path tab and define all the paths.
    i.e you must specify the path of each & every folder from where you are going to open the file.
    Hope your problem would be solved
    Regards,
    ShriX.

  • How to chop off file extensions from a file...

    How does one chop off the file extension of a file?
    In advance thanx!!

    I suggest you use "lastIndexOf" to get the last "." in case the file name has dots in it.
    Martin

  • CS5 requires file extensions to open files?

    I receieved some image files (jpegs) from a client. For whatever reason, they did not have any file extensions on the file name (no .jpg or .jpeg) They opened perfectly fine in Preview, but Photoshop just said:
    Could not complete your request because Photoshop does not recognize this type of file
    The funny thing is that, in the "Open..." dialog, Pshop displayed the preview image for the file.
    Once I added a .jpg to the filename, Photoshop opened it without a problem. I don't remember Pshop being so dependent on file extensions in the past. It's been a long time since I had to deal with extensionless files, though. Is this normal behavior?

    If the file type and extension don't match, there could be problems.  Photoshop goes with the file type first (as specified by MacOS guidelines).
    If the file has no type, and no extension - then Photoshop has nothing to go on.  Preview does a "best guess".
    (yes, Photoshop needs better guessing code, but it's not as easy as it sounds)

  • Pdf file extension missing on export

    That's it really - the pdf file extension is always missing when I export from Pages 09 to PDF. This causes Windows users problems especially when attached to emails. Any way to force Pages to add the extension?

    I repeat:
    I uses MacOS X since 10.3.
    I use iWork since the delivery of iWork '08 then iWork '09.
    I never got a document created by a 'modern' application without the extension name appended.
    So I continue to think that if an extension is missing it's because the user made something wrong.
    Maybe installing a third party component fooling the OS.
    They are a lot of such "enhancers" which introduce oddities in the system behavior but I can't guess what is installed on your machine.
    Just an example.
    I tested on three macIntel machines running 10.5.6 or 10.5.7.
    The menu items Format > Font Bold and Italic are always disabled when TextEdit is using "Plain Text" format.
    On the machine of a correspondant, the items are enabled in such setting.
    I'm quite sure that there is a beast changing the application's behavior but I can't guess which it is.
    Back to the Finder setting.
    It's not designed to Hide all extensions names.
    It it designed to Show all of them or don't show all (which means that some may continue to be displayed).
    As far as I know, the behavior is this one:
    if a document is save when the Finder is set to "Always display the extensions", unchecking the box will not hide the extension.
    if a document is saved when the Finder is NOT set to "Always display the extensions", checking the box will display the extension, unchecking it will hide the extension.
    If you use the Finder with the box checked, the extensions of the files created on your machine will always be displayed.
    Yvan KOENIG (from FRANCE lundi 1 juin 2009 13:03:18)

  • File extension missing for new blog entry pages

    I have a blog and have created new entries, but I can't publish "because the file does not have a file extension." (I clicked on the publish button and also tried in the menu "Publish to Mac.com." Neither works.
    I thought whatever was necessary to connect a new entry to my blog was created automatically. I'm not even sure what a file extension is. What is it?
    In the Site Inspector I can do nothing. All possible commands are grayed out. Maybe I'm not supposed to make a hyperlink for a file.
    Thanks for any help you can give. Edify

    Will I have to clear the cache every time I want to upload new material?
    you don't have to clear the cache to upload the material, you sometimes have to clear the browser's cache to see your new page,  for the old page in the cache may prevent your browser from displaying the new page properly.
    BTW, the same is true for any visitor to your site - if you change your page frequently and find that you have to empty the cache, then any visitor to your site also will experience the same problem and should know that he/she should empty the cache if the page looks funny.

  • Is there a quicker way to hide file extensions on multiple files.

    So, there's the real filename (visible in Terminal) and then the displayed name in Finder and some other applications such as Front Row. Well, I'm using Front Row and I would like my AVI files to display just the name of the movie - not the full filename.
    OS X allows me to change each file individually to hide the extension (either by renaming it in Finder or by checking 'hide extension' in the file's info box) and also allow the whole curtain to be pulled back via a setting in Finder's preferences. But there doesn't seem to be a way to hide the extensions of a particular bunch of files en masse.
    What I would like to know is: Is there a quicker way to do this for all my AVI files? There doesn't seem to be an Automator task that will change file properties (other than permissions). Is there a way I could do it at the command line perhaps? I'm fairly handy with Unix shell scripts and Perl - I'm just relatively new to OS X, that's all.

    The basic mechanism is to select all the files you wish to change then hold down the OPTION key and select Show Inspector from the Finder's File menu. Check the box to hide extension. This will set the preference for all selected files.
    If your files are scattered all over the place, then use the Finder's Find function to find all files with the extension attribute you want, then save the result as a Smart Folder. Then select all files in the Smart Folder you created and do the above.

  • "av" file extension added to files when FC Pro locks up during capture

    I just started having capture problems while using Final Cut Pro. I am capturing video using an AJA Kona LSe capture card. My scratch disk is my second internal hard drive (not the one with the operating system/applications). I have been capturing with this computer for a few months and now I'm getting this error about every other time I try to capture video. I read Stephen Lacey's post with the same problem, but I'm not getting any error messages like he was. Final Cut Pro appears to lock up. The ESC button doesn't stop the capture and I have to do a Force Quit to get out of Final Cut Pro.
    I would truly appreciate any help with this. Thanks!

    What is happening - when you first start capturing, the Mac OS is instructed by FCP to allocate disk space for the capture. If you have not set capture limits in the preferences, it allocates almost all the hard disk, and gives it a temporary file extension of .av. When the capture successfully completes, with the video recorded to some of that space, the system renames the space used by the video to the capture file name, typically filename.mov. It then frees up the unused space in the .av file.
    If you fail to complete the capture successfully, by force quitting FCP, the end cleanup never takes place, and the .av file remains filling up the disk. If you try the capture again, it will fail due to no free disk space. To recover, delete the .av file from the finder, and restart FCP. Better yet, reboot and restart FCP.

  • Unwanted file extension inserted into file format list!

    I accidentally saved a .wav file with the .ses extension.  Now I've got the .ses extension included with .wav and .bwf extensions under the Save As Type box in my Save and Save As dialog windows.  Any advice on removing it?

    I just recreated your issue.  I saved a .wav file with the .ses extension at the end.  It did indeed put the .ses extension in with the .wav and .bwf extensions next to Windows PCM Wave File.
    I got rid of this by opening the affected file, doing a Save As, deleting the .ses extension from the file name when naming the file, then saving.  I closed the file, closed Audition, reopened Audition and the .ses extension was gone from the Windows PCM Wave File list.

  • Rename file extension during a file upload ??

    I need to rename the extension of a file at some point during the file upload. I am not sure where to do this at.
    The file needs to be renamed before it is written to the directory.
    Basically, the file will come in with a .txt or .doc type. Based on a users profile, I will change the type to a non-relavent number such as 1111.
    Here is my upload servlet. Can you tell me where to change the type so it will write the file with the new extension?
    Thanks.
    public class FileExport {
    //restrict upload files to 1 Meg
    private static final int DEFAULT_MAX_POST_SIZE = 1024 * 1024;
    private static final String NO_FILE = "unknown";
    private HttpServletRequest req;
    private File dir;
    private int maxSize;
    private Hashtable parameters = new Hashtable(); // name - Vector of values
    private Hashtable files = new Hashtable(); // name - UploadedFile
    public FileExport(HttpServletRequest request,
    String saveDirectory) throws IOException {
    this(request, saveDirectory, DEFAULT_MAX_POST_SIZE);
    // request the servlet request
    // saveDirectory = directory in which to save any uploaded files
    // maxPostSize = maximum size of the POST content
    public FileExport(HttpServletRequest request,
    String saveDirectory,
    int maxPostSize) throws IOException {
    // check values
    if (request == null)
    throw new IllegalArgumentException("request cannot be null");
    if (saveDirectory == null)
    throw new IllegalArgumentException("saveDirectory cannot be null");
    if (maxPostSize <= 0) {
    throw new IllegalArgumentException("maxPostSize must be positive");
    // Save the request, dir, and max size
    req = request;
    dir = new File(saveDirectory);
    maxSize = maxPostSize;
    // Check saveDirectory is truly a directory
    if (!dir.isDirectory())
    throw new IllegalArgumentException("Not a directory: " + saveDirectory);
    // Check saveDirectory is writable
    if (!dir.canWrite())
    throw new IllegalArgumentException("Not writable: " + saveDirectory);
    // Now parse the request saving data to "parameters" and "files";
    // write the file contents to the saveDirectory
    readRequest();
    public FileExport(ServletRequest request,
    String saveDirectory) throws IOException {
    this((HttpServletRequest)request, saveDirectory);
    public FileExport(ServletRequest request,
    String saveDirectory,
    int maxPostSize) throws IOException {
    this((HttpServletRequest)request, saveDirectory, maxPostSize);
    // Returns the names of all the parameters as an Enumeration of
    // Strings. It returns an empty Enumeration if there are no parameters.
    public Enumeration getParameterNames() {
    return parameters.keys();
    // Returns the names of all the uploaded files as an Enumeration of
    // Strings. It returns an empty Enumeration if there are no uploaded
    // files. Each file name is the name specified by the form, not by
    // the user.
    public Enumeration getFileNames() {
    return files.keys();
    // Returns the value of the named parameter as a String, or null if
    // the parameter was not sent or was sent without a value.
    public String getParameter(String name) {
    try {
    Vector values = (Vector)parameters.get(name);
    if (values == null || values.size() == 0) {
    return null;
    String value = (String)values.elementAt(values.size() - 1);
    return value;
    catch (Exception e) {
    return null;
    // Returns the values of the named parameter as a String array, or null if
    // the parameter was not sent.
    public String[] getParameterValues(String name) {
    try {
    Vector values = (Vector)parameters.get(name);
    if (values == null || values.size() == 0) {
    return null;
    String[] valuesArray = new String[values.size()];
    values.copyInto(valuesArray);
    return valuesArray;
    catch (Exception e) {
    return null;
    // Returns the filesystem name of the specified file, or null if the
    // file was not included in the upload. A filesystem name is the name
    // specified by the user. It is also the name under which the file is
    // actually saved.
    public String getFilesystemName(String name) {
    try {
    UploadedFile file = (UploadedFile)files.get(name);
    return file.getFilesystemName(); // may be null
    catch (Exception e) {
    return null;
    // Returns the content type of the specified file (as supplied by the
    //client browser), or null if the file was not included in the upload.
    public String getContentType(String name) {
    try {
    UploadedFile file = (UploadedFile)files.get(name);
    return file.getContentType(); // may be null
    catch (Exception e) {
    return null;
    // Returns a File object for the specified file saved on the server's
    // filesystem, or null if the file was not included in the upload.
    public File getFile(String name) {
    try {
    UploadedFile file = (UploadedFile)files.get(name);
    return file.getFile(); // may be null
    catch (Exception e) {
    return null;
    // method that actually parses the request.
    protected void readRequest() throws IOException {
    // Check the content length to prevent denial of service attacks
    int length = req.getContentLength();
    if (length > maxSize) {
    throw new IOException("Posted content length of " + length +
    " exceeds limit of " + maxSize);
    // Check the content type to make sure it's "multipart/form-data"
    // Access header two ways to work around WebSphere oddities
    String type = null;
    String type1 = req.getHeader("Content-Type");
    String type2 = req.getContentType();
    // If one value is null, choose the other value
    if (type1 == null && type2 != null) {
    type = type2;
    else if (type2 == null && type1 != null) {
    type = type1;
    // If neither value is null, choose the longer value
    else if (type1 != null && type2 != null) {
    type = (type1.length() > type2.length() ? type1 : type2);
    if (type == null ||
    !type.toLowerCase().startsWith("multipart/form-data")) {
    throw new IOException("Posted content type isn't multipart/form-data");
    // Get the boundary string; it's included in the content type.
    // Should look something like "------------------------12012133613061"
    String boundary = extractBoundary(type);
    if (boundary == null) {
    throw new IOException("Separation boundary was not specified");
    // Construct the special input stream we'll read from
    MultipartInputStreamHandler in =
    new MultipartInputStreamHandler(req.getInputStream(), length);
    // Read the first line, should be the first boundary
    String line = in.readLine();
    if (line == null) {
    throw new IOException("Corrupt form data: premature ending");
    // Verify that the line is the boundary
    if (!line.startsWith(boundary)) {
    throw new IOException("Corrupt form data: no leading boundary");
    // Now that we're just beyond the first boundary, loop over each part
    boolean done = false;
    while (!done) {
    done = readNextPart(in, boundary);
    // A utility method that reads an individual part. Dispatches to
    // readParameter() and readAndSaveFile() to do the actual work. A
    // subclass can override this method for a better optimized or
    // differently behaved implementation.
    protected boolean readNextPart(MultipartInputStreamHandler in,
    String boundary) throws IOException {
    // Read the first line, should look like this:
    // content-disposition: form-data; name="field1"; filename="file1.txt"
    String line = in.readLine();
    if (line == null) {
    // No parts left, we're done
    return true;
    else if (line.length() == 0) {
    // IE4 on Mac sends an empty line at the end; treat that as the end.
    // Thanks to Daniel Lemire and Henri Tourigny for this fix.
    return true;
    // Parse the content-disposition line
    String[] dispInfo = extractDispositionInfo(line);
    String disposition = dispInfo[0];
    String name = dispInfo[1];
    String filename = dispInfo[2];
    // Now onto the next line. This will either be empty
    // or contain a Content-Type and then an empty line.
    line = in.readLine();
    if (line == null) {
    // No parts left, we're done
    return true;
    // Get the content type, or null if none specified
    String contentType = extractContentType(line);
    if (contentType != null) {
    // Eat the empty line
    line = in.readLine();
    if (line == null || line.length() > 0) {  // line should be empty
    throw new
    IOException("Malformed line after content type: " + line);
    else {
    // Assume a default content type
    contentType = "application/octet-stream";
    // Now, finally, we read the content (end after reading the boundary)
    if (filename == null) {
    // This is a parameter, add it to the vector of values
    String value = readParameter(in, boundary);
    if (value.equals("")) {
    value = null; // treat empty strings like nulls
    Vector existingValues = (Vector)parameters.get(name);
    if (existingValues == null) {
    existingValues = new Vector();
    parameters.put(name, existingValues);
    existingValues.addElement(value);
    else {
    // This is a file
    readAndSaveFile(in, boundary, filename, contentType);
    if (filename.equals(NO_FILE)) {
    files.put(name, new UploadedFile(null, null, null));
    else {
    files.put(name,
    new UploadedFile(dir.toString(), filename, contentType));
    return false; // there's more to read
    // A utility method that reads a single part of the multipart request
    // that represents a parameter. A subclass can override this method
    // for a better optimized or differently behaved implementation.
    protected String readParameter(MultipartInputStreamHandler in,
    String boundary) throws IOException {
    StringBuffer sbuf = new StringBuffer();
    String line;
    while ((line = in.readLine()) != null) {
    if (line.startsWith(boundary)) break;
    sbuf.append(line + "\r\n"); // add the \r\n in case there are many lines
    if (sbuf.length() == 0) {
    return null; // nothing read
    sbuf.setLength(sbuf.length() - 2); // cut off the last line's \r\n
    return sbuf.toString(); // no URL decoding needed
    // A utility method that reads a single part of the multipart request
    // that represents a file, and saves the file to the given directory.
    // A subclass can override this method for a better optimized or
    // differently behaved implementation.
    protected void readAndSaveFile(MultipartInputStreamHandler in,
    String boundary,
    String filename,
    String contentType) throws IOException {
    OutputStream out = null;
    // A filename of NO_FILE means no file was sent, so just read to the
    // next boundary and ignore the empty contents
    if (filename.equals(NO_FILE)) {
    out = new ByteArrayOutputStream(); // write to nowhere
    // A MacBinary file goes through a decoder
    else if (contentType.equals("application/x-macbinary")){
    File f = new File(dir + File.separator + filename);
    out = new MacBinaryDecoderOutputStream(
    new BufferedOutputStream(
    new FileOutputStream(f), 8 * 1024));
    // A real file's contents are written to disk
    else {
    File f = new File(dir + File.separator + filename);
    out = new BufferedOutputStream(new FileOutputStream(f), 8 * 1024);
    byte[] bbuf = new byte[100 * 1024]; // 100K
    int result;
    String line;
    // ServletInputStream.readLine()
    // adds a \r\n to the end of the last line.
    // Since we want a byte-for-byte transfer, we have to cut those chars.
    boolean rnflag = false;
    while ((result = in.readLine(bbuf, 0, bbuf.length)) != -1) {
    // Check for boundary
    if (result > 2 && bbuf[0] == '-' && bbuf[1] == '-') { // quick pre-check
    line = new String(bbuf, 0, result, "ISO-8859-1");
    if (line.startsWith(boundary)) break;
    // Are we supposed to write \r\n for the last iteration?
    if (rnflag) {
    out.write('\r'); out.write('\n');
    rnflag = false;
    // Write the buffer, postpone any ending \r\n
    if (result >= 2 &&
    bbuf[result - 2] == '\r' &&
    bbuf[result - 1] == '\n') {
    out.write(bbuf, 0, result - 2); // skip the last 2 chars
    rnflag = true; // make a note to write them on the next iteration
    else {
    out.write(bbuf, 0, result);
    out.flush();
    out.close();
    // Extracts and returns the boundary token from a line.
    private String extractBoundary(String line) {
    // Use lastIndexOf() because IE 4.01 on Win98 has been known to send the
    // "boundary=" string multiple times. Thanks to David Wall for this fix.
    int index = line.lastIndexOf("boundary=");
    if (index == -1) {
    return null;
    String boundary = line.substring(index + 9); // 9 for "boundary="
    // The real boundary is always preceeded by an extra "--"
    boundary = "--" + boundary;
    return boundary;
    // Extracts and returns disposition info from a line, as a String array
    // with elements: disposition, name, filename. Throws an IOException
    // if the line is malformatted.
    private String[] extractDispositionInfo(String line) throws IOException {
    // Return the line's data as an array: disposition, name, filename
    String[] retval = new String[3];
    // Convert the line to a lowercase string without the ending \r\n
    // Keep the original line for error messages and for variable names.
    String origline = line;
    line = origline.toLowerCase();
    // Get the content disposition, should be "form-data"
    int start = line.indexOf("content-disposition: ");
    int end = line.indexOf(";");
    if (start == -1 || end == -1) {
    throw new IOException("Content disposition corrupt: " + origline);
    String disposition = line.substring(start + 21, end);
    if (!disposition.equals("form-data")) {
    throw new IOException("Invalid content disposition: " + disposition);
    // Get the field name
    start = line.indexOf("name=\"", end); // start at last semicolon
    end = line.indexOf("\"", start + 7); // skip name=\"
    if (start == -1 || end == -1) {
    throw new IOException("Content disposition corrupt: " + origline);
    String name = origline.substring(start + 6, end);
    // Get the filename, if given
    String filename = null;
    start = line.indexOf("filename=\"", end + 2); // start after name
    end = line.indexOf("\"", start + 10); // skip filename=\"
    if (start != -1 && end != -1) {                // note the !=
    filename = origline.substring(start + 10, end);
    // The filename may contain a full path. Cut to just the filename.
    int slash =
    Math.max(filename.lastIndexOf('/'), filename.lastIndexOf('\\'));
    if (slash > -1) {
    filename = filename.substring(slash + 1); // past last slash
    if (filename.equals("")) filename = NO_FILE; // sanity check
    // Return a String array: disposition, name, filename
    retval[0] = disposition;
    retval[1] = name;
    retval[2] = filename;
    return retval;
    // Extracts and returns the content type from a line, or null if the
    // line was empty. Throws an IOException if the line is malformatted.
    private String extractContentType(String line) throws IOException {
    String contentType = null;
    // Convert the line to a lowercase string
    String origline = line;
    line = origline.toLowerCase();
    // Get the content type, if any
    if (line.startsWith("content-type")) {
    int start = line.indexOf(" ");
    if (start == -1) {
    throw new IOException("Content type corrupt: " + origline);
    contentType = line.substring(start + 1);
    else if (line.length() != 0) {  // no content type, so should be empty
    throw new IOException("Malformed line after disposition: " + origline);
    return contentType;
    // A class to hold information about an uploaded file.
    class UploadedFile {
    private String dir;
    private String filename;
    private String type;
    UploadedFile(String dir, String filename, String type) {
    this.dir = dir;
    this.filename = filename;
    this.type = type;
    public String getContentType() {
    return type;
    public String getFilesystemName() {
    return filename;
    public File getFile() {
    if (dir == null || filename == null) {
    return null;
    else {
    return new File(dir + File.separator + filename);
    // A class to aid in reading multipart/form-data from a ServletInputStream.
    // It keeps track of how many bytes have been read and detects when the
    // Content-Length limit has been reached.
    class MultipartInputStreamHandler {
    ServletInputStream in;
    int totalExpected;
    int totalRead = 0;
    byte[] buf = new byte[8 * 1024];
    public MultipartInputStreamHandler(ServletInputStream in,
    int totalExpected) {
    this.in = in;
    this.totalExpected = totalExpected;
    // Reads the next line of input. Returns null to indicate the end
    // of stream.
    public String readLine() throws IOException {
    StringBuffer sbuf = new StringBuffer();
    int result;
    String line;
    do {
    result = this.readLine(buf, 0, buf.length); // this.readLine() does +=
    if (result != -1) {
    sbuf.append(new String(buf, 0, result, "ISO-8859-1"));
    } while (result == buf.length); // loop only if the buffer was filled
    if (sbuf.length() == 0) {
    return null; // nothing read, must be at the end of stream
    sbuf.setLength(sbuf.length() - 2); // cut off the trailing \r\n
    return sbuf.toString();
    // A pass-through to ServletInputStream.readLine() that keeps track
    // of how many bytes have been read and stops reading when the
    // Content-Length limit has been reached.
    public int readLine(byte b[], int off, int len) throws IOException {
    if (totalRead >= totalExpected) {
    return -1;
    else {
    if (len > (totalExpected - totalRead)) {
    len = totalExpected - totalRead; // keep from reading off end
    int result = in.readLine(b, off, len);
    if (result > 0) {
    totalRead += result;
    return result;
    // Class to filters MacBinary files to normal files on the fly
    // Optimized for speed more than readability
    class MacBinaryDecoderOutputStream extends FilterOutputStream {
    int bytesFiltered = 0;
    int dataForkLength = 0;
    public MacBinaryDecoderOutputStream(OutputStream out) {
    super(out);
    public void write(int b) throws IOException {
    // Bytes 83 through 86 are a long representing the data fork length
    // Check <= 86 first to short circuit early in the common case
    if (bytesFiltered <= 86 && bytesFiltered >= 83) {
    int leftShift = (86 - bytesFiltered) * 8;
    dataForkLength = dataForkLength | (b & 0xff) << leftShift;
    // Bytes 128 up to (128 + dataForkLength - 1) are the data fork
    else if (bytesFiltered < (128 + dataForkLength) && bytesFiltered >= 128) {
    out.write(b);
    bytesFiltered++;
    public void write(byte b[]) throws IOException {
    write(b, 0, b.length);
    public void write(byte b[], int off, int len) throws IOException {
    // If the write is for content past the end of the data fork, ignore
    if (bytesFiltered >= (128 + dataForkLength)) {
    bytesFiltered += len;
    // If the write is entirely within the data fork, write it directly
    else if (bytesFiltered >= 128 &&
    (bytesFiltered + len) <= (128 + dataForkLength)) {
    out.write(b, off, len);
    bytesFiltered += len;
    // Otherwise, do the write a byte at a time to get the logic above
    else {
    for (int i = 0 ; i < len ; i++) {
    write(b[off + i]);

    I am also need to rename a file and extension while uploadinf the file to the server. The oreilly example seems only save as the same file name and ext. I wonder if you have the ability chANGE OIT OR NOT. pLEASE LET ME KNOW
    thanks
    kansen

  • Change file extension in receiver file adapter

    File to File Scenario
    Posted: Sep 11, 2006 3:47 PM      Reply      E-mail this post 
    I am working on a File to File scenario.
    Source System gives out a file: abc ( with no extension)
    We need to archive it as: abc.done
    And we need to send it to a FTP server ( receiver File adapter) as abc.txt.
    How can I append a file extension when I archive and
    how can I change the file extension in the receiver File adapter?
    FYI, we are using XI as FTP server so I have created dummy message interface with no mapping.

    Hi,
    If I understood correctly once XI picks up the file it should be archieved as filename.doc and then it should be FTP'ed to a different location with a change in extension filename.txt.
    1. To Archive in the sender communication channel you can use OS Commands after prosessing (>=SP14) to rename the file and archive it. Suggested write a batch file which will rename the file and call the batch file from the OS Command of the sender file adapter. You can either use Archive functionaliy of the Sender adapter or you can write one more command in batch file to move the file to different folder. Make sure you are using fullpath while writing batch file.
    2. As said use dynamic configuration in a dummy mapping and then get the source file name and change the extension.
    http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm
    Thanks,
    Prakash

  • Automatic appending of file extension of downloaded files

    Hello,
    When downloading files with certain extensions (.doc, .xls, .ppt, .tar.bz2), Safari will append an extension to the file after the download is finished (.dot, .xla, .pot, .tar).
    I don't know what exactly is the case of the problem, but I know this is a feature meant to correct the filename of downloaded files whose extension doesn't fit their MIME or UTI, or something along the line. For me, it is quite annoying since I download a lot of these files. It is annoying enough that I adopted Firefox as my main browser even if I prefer the sleek Safari design.
    Some posts on the web point out this problem for Microsoft's extension and propose a way to fix it (modifying office package), but I am looking for a way to disable the feature from Safari. Effectively, it causes only annoyance on my computer and it has never been proved useful. I expect the file on Internet to have the correct extension and I don't like Safari trying to outsmart it.
    Is there a way to disable the renaming feature?
    Thank you,
    Jonathan

    I'm having this issue with xml files renamed to .ychat.
    I noticed this after installing Yahoo! Messenger, therefore, there msut to be a way to undo this.
    It's getting annoying since I use to download many xml files from web pages.

  • The Document Type "" will not be added because it uses a file extension that is already associated with a prior Document Type.

    I’ve removed the MMDocumentTypes.xml file from the folder Adobe Dreamweaver CC 2014 -> Configuration -> DocumentTypes and put it on the desktop. Also, I moved the Extensions.txt file the same way. After a restart, I get the same error message. I uninstalled every extension one by one in every place that I could find (Adobe Extension Manager/DMXzone Extension Manager/https://creative.adobe.com/my_addons), and I uninstalled and reinstalled Dreamweaver… I’m still getting that message. Please, tell me how I can get rid of this error message. It's driving me crazy!

    Hi Ken,
      Thanks for your reply. It all happened because of the DMXzone LESS CSS/LESS COMPILER products. When I first got CC2014 a few weeks ago, I went on a rampage downloading all the "cool" app extensions that I could find like most new CC users. That was a big mistake. Half of them don't load correctly, or they get errors. Download from the "add-ons" page at your own peril. After editing the MMDocumentTypes.xml and extensions.txt files to get rid of the original LESS definitions and redefining them, it loaded without the error, but the icons on the "Create New" section of the welcome screen were gone. I completely deleted Dreamweaver again, and this time I included all preferences. After a clean install with no preference files or extensions, I got it working properly. I have to say that the Dreamweaver cloud sync feature in CC saved a ton of time because it had my site definitions waiting for me. Stay out of the DMXzone, if you don't want to be in the damage control zone. =)

  • File Writing - Missing some files without any error

    I am executing the following code:
    String message = XMLHelper.getDocumentXML(_doc);
         File outFile = getFile();
         RandomAccessFile raf = new RandomAccessFile(outFile, "rw");
         FileChannel channel = raf.getChannel();
         ByteBuffer buf = ByteBuffer.allocateDirect(19600);
         buf.clear();
         buf.put(message.getBytes());
         buf.flip();
         channel.write(buf);
         channel.close();
         raf.close();
    This code is in a loop and it must write a lot of files. I am trying with 426 but thje problem i have is that many times i do get 425 files insted of 426 or some other times i do get 425 files. No error or exception is thrown. Other times id do get my 426 files.
    The problem increase when i process like 50000 files, the quantity it is supposed to treat.
    Please can any body tell me what happen with the missing files? How can i detect what is happening?
    Thank you very much to any one who can help me with this extrange error

    Hard to tell based on the info you supplied. How are you generating filenames? Are you accidently writing over an existing ouput file? Can you post more code, speciifcally the loop code around the code below?

Maybe you are looking for

  • How to grab system time in nano seconds?

    Is there any way to grab the system time in nano seconds? Thanks!

  • CC membership not visible in adobe ID + How to upgrade LR?

    I have a paid membership of Adobe CC since September 2013, but never updated anything after the initial download/install of Photoshop CC.  Lightroom 5 was already on my computer back then. Now for the first time I want to upgrade to LR6-CC, but when

  • Wepage not displaying content

    I am using a math homework website, Webassign.net, and certain features that were displaying normally a few days ago are suddenly not displaying now, and a link to the textbook is not displaying the content either. My plug-ins are all updated, I chec

  • Stock trasfer between plants

    I have a general question about MM side. How can we achieve this? Say we are having 10 plants. 1>When MRP runs at Plant 1 ---> creates Purchase Req in Plant 1 for the component X. (If we dont have that component X) 2>If the component X is in stock in

  • Adobe Digital Edition Ver 2.0

    Downloadi/install successful/complete.  Launching program results in Error Msg:  "Adobe Digital Edition Ver 2 has encountered a problem and needs to close.  We are sorry for the inconvenience."  This repeats with every attempt to launch the program.