The disk or volume to which files go.

Forum,
My MacBook Pro has three volumes.
The internal disk is partitioned into two volumes.
"SYSTEM' which contains the OS and Applications.
"OTHER" which started empty but now contains :
Final Cut Pro Documents
Audio render Files
Autosave Vault
Capture Scratch
Reder Files
Waveform Cache Files
Thumbnail Cache Files
I think this this is normal
There is a third volume,"VIDEO FILES" which is an external drive and to which I have downloaded the video files.
I have been using Compressor and DVD Studio and although I choose for the MPEG2 files resulting from Compressor to be downloaded to the desk top I could not locate them despite an Icon appearing there
Well,I thought they would be in" VIDEO FILES" but found them in "SYSTEM"
I am very confused.
Can any one comment on this.
Thank you
Michael Craven.

Hi Michael,
before you submit a job with compressor you may want to double check the destination of your compressed file. If you did not set your destination in the "destination" tab, next to settings tab then before you submit you can go to main menu>target>destination and choose the destination of your MPEG2 and AC3 files. Your choice will appear in the rectangle including project name, icon, settings and destination of your project. If you chose desktop as destination then the files will not go to the external drive that you called "VIDEO FILES" but to your "SYSTEM VOLUME".
When the encoding is over the history window reports the process as successful. Still in the History window (right lower corner of Compressor interface or hit command +1 to see it) if you click/open the little arrow before the title of the project you can see that more info appears, more specifically the name of your encoded files plus on the far right you can see two small magnifiers icon one for the audio file and the other for the video. If you click on them Compressor will show you where your encoded files are.
Hope that helps,
Best,
G.

Similar Messages

  • Disk Repair notified me it could not repair the HD.  Iam to reformat the disk and restore backed up files.  OS Utilities give me a "Restore From Time Machine Backup" option.  I have not reformatted the disk;  does this restore option do both?

    Disk Repair reported that it could not repair the HD Disk.  I am to reformat the disk and restore backed up files. OSX Utilities give me a choice of restoring from time machine backup (which I have on MyPassport) but no information on reformatting the disk, which I assume I have to do first.  How do I reformat the HD ...or does the restore from Time Machine do both things?

    Boot OS X Recovery and use Disk Utility.
    If Disk Utility reported the disk cannot be repaired though, you should replace it with a new one.

  • IMac won't launch, disk utility says I cannot repair my Macintosh HD, back up files, reformat the disk and restore backed up files. How do I do all that? Help!

    iMac won't start up, disk utility tried to repair disk it shows "keys out of order" error message in red and advises me to back up files, reformat disk and restore backed up files. I have no idea how to back up and restore etc... Help! Please!

    Get an external drive of sufficient capacity to hold everything on your internal drive.
    Partition and format the external drive.
    Drive Partition and Format
    1. Open Disk Utility in your Utilities folder.
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Click on the Options button, set the partition scheme to GUID then click on the OK button. Set the format type to Mac OS Extended (Journaled.) Click on the Apply button and wait until the process has completed.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled.) Click on the Security button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process can take up to several hours depending upon the drive size.
    Clone your internal drive to the external drive.
    Clone Mavericks, Lion/Mountain Lion using Restore Option of Disk Utility
    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
         1. Select Disk Utility from the main menu then press the Continue
             button.
         2. Select the destination volume from the left side list.
         3. Click on the Restore tab in the DU main window.
         4. Select the destination volume from the left side list and drag it
             to the Destination entry field.
         5. Select the source volume from the left side list and drag it to
             the Source entry field.
         6. Double-check you got it right, then click on the Restore button.
    Destination means the external backup drive. Source means the internal startup drive.
    Boot from the external drive.
    Boot Using OPTION key:
      1. Restart the computer.
      2. Immediately after the chime press and hold down the
          "OPTION" key.
      3. Release the key when the boot manager appears.
      4. Select the external disk icon from which you want to boot.
      5. Click on the arrow button below the icon.
    Reformat the internal drive and install OS X.
    Install or Reinstall Mavericks, Lion/Mountain Lion from Scratch
    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Erase the hard drive:
      1. Select Disk Utility from the main menu and click on the Continue button.
      2. After DU loads select your startup volume (usually Macintosh HD) from the
          left side list. Click on the Erase tab in the DU main window.
      3. Set the format type to Mac OS Extended (Journaled.) Optionally, click on
          the Security button and set the Zero Data option to one-pass. Click on
          the Erase button and wait until the process has completed.
      4. Quit DU and return to the main menu.
    Reinstall Lion/Mountain Lion, Mavericks: Select Reinstall Lion/Mountain Lion, Mavericks and click on the Install button.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible
                because it is three times faster than wireless.
    Open Startup Disk preferences and set the internal drive as the startup volume, then click on the Restart button.
    Restore your data from your external drive backup.

  • Disk Utility stopped repairing the disk. I was instructed to backup as many of my files as possible.reformat the disk and store my backed files.  I am using an I Mac 2010.  I am not sure what caused this problem.   I use time machine

    Disk Utility stopped repairing the disk. I was instructed to backup as many of my files as possible.reformat the disk and restore my backed up files.  Since I use time machine, can I assume that all my files and programs can be restored from my recent back ups? 

    Hi jeromefrodia, 
    Welcome to the Apple Support Community!
    I understand that you are concerned about your data before reformatting the disk. Because you use Time Machine your information should be safe. Please refer to the attached article for information about what Time Machine backs up and how to restore from that backup. 
    Mac Basics: Time Machine backs up your Mac
    Cheers,
    Joe

  • How do I import a large iPhoto library into an iMac running Yosemite without losing the existing division of the library into albums?which file do I look for on the older Mac, running Snow Leopard?

    Import of library

    You don't import one library into another.  Simply copy the library from the older Mac to the Pictures folder on iMac.  If you already have a library on the iMac rename it first.
    Next launch iPhoto on the new iMac with the Option key held down and select the newly copied library.
    If you have photos in the original library on the iMac you can merge that library into the larger, copied library with the paid version of  iPhoto Library Manager.  Or if you also have Aperture 3.3 you can use it to merge the two libraries.

  • Time machine: I get the following message: The backup disk image "/Volumes/Data-1/Clemens's iMac.sparsebundle" is already in use - what to do? Where and how do I find that file and get rid of it?

    time machine: I get the following message: The backup disk image “/Volumes/Data-1/Clemens’s iMac.sparsebundle” is already in use - what to do? Where and how do I find that file and get rid of it?

    I'm on Mountain Lion and have version 6.1 of AirPort utility so there is no button to "Disconnect All Users"and the only other option of "removing and re-selecting the drive via Time Machine Prefs" doesn't work either. So this will work.
    Launch Airport Utility and select the TC "Edit" button, then select the Disks tab. Deselect "Enable File Sharing" and click "Update". The TC will reboot then follow the same procedure and reselect "Enable File Sharing" and click "Update". After TC reboots again you'll be up and running. Not the neatest way to do it but saves having to unplug the TC which risks disk damage and the whole procedure takes less than a minute.The "Enable File Sharing" button seems to have replaced the "Disconnect All Users" button but with the slight disadvantage that it reboots the TC which takes up additional time.

  • HT201250 The backup disk image "/Volumes/Data/Lucio Bernal's iMac.sparsebundle" is already in use.

    I am getting this message when Timemachine tries to back up. 
    The backup disk image “/Volumes/Data/Lucio Bernal’s iMac.sparsebundle” is already in use.
    Does it have something to do with Moutain Lion that I just installed?

    had the same problem and this fixed it, thanks!
    finepiks wrote:
    This will fix your problems:
    Launch Airport Utility and select the TC "Edit" button, then select the Disks tab. Deselect "Enable File Sharing" and click "Update". The TC will reboot then follow the same procedure and reselect "Enable File Sharing" and click "Update". After TC reboots again you'll be up and running. Not the neatest way to do it but saves having to unplug the TC which risks disk damage and the whole procedure takes less than a minute.
    I don't take credit for this fix but found it here:http://apple.stackexchange.com/questions/45569/disconnecting-disks-from-airport- extreme

  • Why does iTunes create disk errors when deleting movie files?

    I use a Macbook Pro, OSX 10.7.5. When I delete movie file from my iTunes library I get disk errors. I need to option boot select the recovery disk and repair the disk.  Deleting a movie file I have placed on my desktop with finder does not create any errors.  Most of the movie files are created as .m4v movies. They all play just fine with my Apple TV. I have tried turning off the Apple TV and rebooting before I delee files but nothing seems to work.
    Any ideas?
    Lance

    If you let iTunes organise your media folders then that is the way it is. An option would be to change the Media Kind to TV Show which would gather them togther in one folder, but in a different part of the library.
    tt2

  • HT201372 Failed to start erase of disk due to error (-9999, 0). A error occurred erasing the disk.

    Tried the recommendations in this article, however ran into the  error posted below.
    Creating a bootable OS X installer in OS X Mavericks
    sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath "/Applications/Install OS X Mavericks.app"
    Ready to start.
    To continue we need to erase the disk at /Volumes/Untitled.
    If you wish to continue type (Y) then press return: Y
    Failed to start erase of disk due to error (-9999, 0).
    A error occurred erasing the disk.
    Is there an updated document ?
    MacBook 13" white - Early 2009 model

    Oh, createinstallmedia only runs on OS 10.9!  Oh!  The 9999 is if you try to run it on an earlier OS!  Oh! Linc means to update the current drive to Mavericks, and then one will be able to run createinstallmedia, if one has first saved away a copy of the installer.
    But if, like me, you are trying to create an installer to do a clean install on an empty drive, without replacing the earlier OS on your current drive, then...
    You must use the slightly more complicated instructions you can find all over the place that look like
    Right click "Install OS X Mavericks.app" and show package contents
    Find a certain .dmg file and double click
    Find a hidden .dmg within the drive that mounts from the first .dmg
    Double-click or use "mount" on the hidden .dmg within the .dmg
    Use Disk Utility to "restore" the second disk image onto the erased USB drive
    Then replace an alias folder with a copy of a huge folder within the first disk image
    I had success with the "Option 2: Use Disk Utility" section here.

  • Disk utility can't repair disk, back up and restore files......I need help, I'm worried I'll lose all my photos, files etc

    Mac started hanging up while streamlining a kids show. Restarted and got the screen with the apple and the circle. restarted with control-option p and r. Ran disk repairitem got the following results;
    invalid index key,
    it rebuilds catalog b-tree,
    volume repair complete,
    updating boot support partitions for the volume as required,
    Error disk utility can't repair disk
    I'm then prompted to back up all files, reformat the disk and restore backed up files.
    Obviously need help here as I think I'm in danger of losing my files, photos etc if I don't do this right.
    Can anyone help
    Steve

    You might want to back up the disk as soon as possible, do the repair, then back it up again. First time will have the issues that Disk Utility can't fix, however, you'll have the data saved.  Then, once you get things repaired, make a new backup, and go from there.
    If you're going to use a hard drive directly connected to your iMac for backup, this is what I mentioned earlier: http://twelvesouth.com/products/backpack/ Great way to use space behind the iMac without adding something else to the desk top. You can buy it through Apple online/stores or Amazon, and there are probably other sources too.
    For external hard drives, I like those sold by OWC at http://eshop.macsales.com/shop/firewire/ as many of them use Oxford chip sets, wihch work well with macs (I've used several for years with no issues). Most pre-packaged drive/cases have a 3 year warranty, although you can buy a case and add your own hard drive. I like Western Digital Scorpio Blacks that have a 5 year warranty.

  • I have a powerbook g4 and i am having trouble erasing the disk.

    I want to dispose of this computer. I go to Utility, Erase, and select the disk, but volume format and name both stay grayed out so I can't continue. Any suggestions?I

    Are you possibly using Disk Utility installed on the internal hard disk? If you wish to completely erase a startup disk, you would have to start the computer from another disc/disk. See, for example, the link below:
    http://macs.about.com/od/applications/ss/diskutilformat_5.htm
    If you do not have access to a suitable system disc, you may want to try an Internet search for an old PowerPC version (dban-2.0.0_powerpc.iso) of a data erasure utility called DBAN instead. Once a bootable CD-R has been created from a downloaded iso file, you could test whether that disc would let you boot the PowerBook G4 (while holding down the C key). Then follow  instructions on screen.
    Jan

  • How to display the source code for this friggin' file.

    Below is a rather lengthy bit of code that provides the behavior and attributes of a web server for OpenCyc. I need to know if I can enter some java to have the HTML source code displayed in a separate text file whenever this class returns some resulting webpage. If you have any ideas it will be greatly appreciated.
    -"Will code for foo."
    package org.opencyc.webserver;
    * Class WebServer is simple multithreaded HTTP server
    * with CGI limited to a Cyc connection on default port 3600.
    * <p>
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import java.util.jar.*;
    import java.text.*;
    import org.opencyc.util.*;
    public class WebServer extends Thread {
         * Singleton WebServer instance.
        public static WebServer current;
         * Default HTTP port.
        protected static int DEFAULT_PORT = 80;
         * Default Cyc base port.
        protected static int DEFAULT_CYC_PORT = 3600;
         * Default directory to serve files from on non-Windows OS.
        protected static String DEFAULT_DIR = "/";
         * Default directory to serve files from on Windows.
        //protected static String DEFAULT_WIN_DIR = "C:\\";
        protected static String DEFAULT_WIN_DIR = "k:\\opencyc\\run\\httpd\\htdocs";
         * File cache capacity.
        protected static final int CACHE_CAPACITY = 100;
         * File cache to improve file serving performance.
        protected static Hashtable fileCache = new Hashtable(CACHE_CAPACITY);
         * Number of files served from this web server.
        protected static long nbrFilesServed = 0;
         * Number of files served from this web server that were found in the cache.
        protected static long nbrCacheHits = 0;
         * Server socket for accepting connections.
        protected ServerSocket server;
         * Directories to serve files from.
        protected ArrayList dirs;
         * Map from String (jar root) to JarFile[] (jar class path).
        protected HashMap map;
         * Webserver HTTP port.
        protected int port;
         * Cyc HTML host.
        protected String cycHost = "localhost";
         * Cyc HTML port.
        protected int cycPort;
         * Expand jar tress.
        protected boolean trees;
         * Requests flag.
        protected boolean traceRequests;
         * Constructs a WebServer object.
         * @param port the port to use
         * @param directories the directory to serve files from
         * @param trees true if files within jar files should be served up
         * @param traceRequests true if client's request text should be logged.
         * @exception IOException if the listening socket cannot be opened, or problem opening jar files.
        public WebServer() throws IOException {
            getProperties();
            server = new ServerSocket(port);
            processDirectories();
         * Class Task processes a single HTTP request.
        protected class Task extends Thread {
             * Socket for the incoming request.
            protected Socket sock;
             * Client socket to the Cyc KB HTML server.
            protected Socket cycHtmlSocket;
             * Output tcp stream.
            protected DataOutputStream out;
             * Contains the file request path for a not-found error message.
            protected String notFoundPath;
             * Contains the first line of a request message.
            protected String methodLine;
             * Contains the body of a POST method.
            protected String bodyLine;
             * Constructs a Task object.
             * @param sock the socket assigned for this request.
            public Task(Socket sock) {
                this.sock = sock;
             * Processes the HTTP request.
            public void run() {
                if (traceRequests)
                    Log.current.println("connection accepted from " + sock.getInetAddress());
                notFoundPath = "";
                try {
                    out = new DataOutputStream(sock.getOutputStream());
                    try {
                        getBytes();
                    catch (Exception e) {
                        Log.current.println("file not found: " + notFoundPath);
                        try {
                            out.writeBytes("HTTP/1.1 404 Not Found\r\n");
                            out.writeBytes("Server: Cyc WebServer\r\n");
                            out.writeBytes("Connection: close\r\n");
                            out.writeBytes("Content-Type: text/html\r\n\r\n");
                            out.writeBytes("<HTML><HEAD>\n");
                            out.writeBytes("<TITLE>404 Not Found</TITLE>\n");
                            out.writeBytes("</HEAD><BODY>\n");
                            out.writeBytes("<H1>404 - Not Found</H1>\n");
                            out.writeBytes("</BODY></HTML>");
                            out.flush();
                        catch (SocketException se) {
                catch (Exception e) {
                    Log.current.printStackTrace(e);
                finally {
                    try {
                        sock.close();
                    catch (IOException e) {
             * Reads the HTTP request and obtains the response.
             * @exception IOException when HTTP request has an invalid format.
            private void getBytes() throws IOException {
                // Below logic is complex because web browsers do not close the
                // socket after sending the request, so must parse message to find
                // the end.
                BufferedReader in = new BufferedReader(new InputStreamReader(sock.getInputStream()));
                ArrayList inBytes = new ArrayList(200);
                int ch = 0;
                boolean postMethod;
                methodLine = in.readLine();
                //if (traceRequests)
                //    Log.current.println("methodLine=" + methodLine);
                bodyLine = "";
                if (methodLine.startsWith("POST /"))
                    postMethod = true;
                else
                    postMethod = false;
                //if (traceRequests)
                //    Log.current.println("postMethod=" + postMethod);
                int ch1 = -1;
                int ch2 = -1;
                int ch3 = -1;
                int ch4 = -1;
                // Read the HTTP request headers.
                while (true) {
                    ch = in.read();
                    inBytes.add(new Integer(ch));
                    ch1 = ch2;
                    ch2 = ch3;
                    ch3 = ch4;
                    ch4 = ch;
                    if (ch1 == '\r' && ch2 == '\n' && ch3 == '\r' && ch4 == '\n')
                        break;
                    if ((! postMethod) &&
                        (! in.ready()) &&
                        ch1 == -1 &&
                        ch2 == -1 &&
                        ch3 == '\r' &&
                        ch4 == '\n') {
                        inBytes.add(new Integer('\r'));
                        inBytes.add(new Integer('\n'));
                        break;
                byte[] byteArray = new byte[inBytes.size()];
                for (int i = 0; i < inBytes.size(); i++) {
                    Integer ich = (Integer) inBytes.get(i);
                    byteArray[i] = ich.byteValue();
                String headers = new String(byteArray);
                if (postMethod) {
                    String lcHeaders = headers.toLowerCase();
                    int i = lcHeaders.indexOf("content-length: ");
                    String contentLength = lcHeaders.substring(i + 16);
                    int j = contentLength.indexOf("\r\n");
                    contentLength = contentLength.substring(0, j);
                    int bodyLen = (new Integer(contentLength)).intValue();
                    for (int k = 0; k < bodyLen; k++) {
                        bodyLine = bodyLine + (new Character((char) in.read())).toString();
                String line = methodLine + "\r\n" + headers + bodyLine;
                if (traceRequests)
                    Log.current.println(line);
                if (postMethod)
                    processHttpPost();
                else
                    if (line.startsWith("GET /"))
                        processHttpGet(line.substring(4));
                    else {
                        Log.current.println("Invalid request = " + line);
                        throw new IOException();
             * Processes an HTTP GET method.
             * @param httpGetPath the path of the file to get.
             * @exception IOException if the file is not found.
            private void processHttpGet(String httpGetPath) throws IOException {
                int i = httpGetPath.indexOf(' ');
                if (i > 0)
                    httpGetPath = httpGetPath.substring(0, i);
                Log.current.println(methodLine + " from " + sock.getInetAddress().getHostName());
                i = httpGetPath.indexOf("cg?");
                if (i > 0) {
                    cycHtmlRequest(httpGetPath.substring(i + 3));
                    return;
                notFoundPath = httpGetPath;
                i = httpGetPath.indexOf('/');
                if (i < 0 || map == null) {
                    if (map == null || httpGetPath.endsWith(".jar")) {
                        for (int j = 0; j < dirs.size(); j++) {
                            String dir = (String) dirs.get(j);
                            String nativePath = dir + httpGetPath;
                            nativePath = nativePath.replace('/', File.separatorChar);
                            if (fileCache.containsKey(nativePath)) {
                                writeDataBytes((byte[]) fileCache.get(nativePath));
                                Log.current.println("...cached");
                                nbrCacheHits++;
                                nbrFilesServed++;
                                return;
                            try {
                                File f = new File(nativePath);
                                byte[] fileBytes = getBytes(new FileInputStream(f), f.length());
                                writeDataBytes(fileBytes);
                                if (fileCache.size() >= CACHE_CAPACITY)
                                    fileCache.clear();
                                fileCache.put(nativePath, fileBytes);
                                Log.current.println("...from " + nativePath);
                                nbrFilesServed++;
                                return;
                            catch (IOException e) {
                    throw new IOException();
                String jar = httpGetPath.substring(0, i);
                httpGetPath = httpGetPath.substring(i + 1);
                JarFile[] jfs = (JarFile[]) map.get(jar);
                if (jfs == null)
                    throw new IOException();
                for (i = 0; i < jfs.length; i++) {
                    JarEntry je = jfs.getJarEntry(httpGetPath);
    if (je == null)
    continue;
    writeDataBytes(getBytes(jfs[i].getInputStream(je), je.getSize()));
    nbrFilesServed++;
    return;
    throw new IOException();
    * Processes an HTTP POST method.
    * @exception IOException if the file is not found.
    private void processHttpPost() throws IOException {
    Log.current.println("POST " + bodyLine + " from " + sock.getInetAddress().getHostName());
    cycHtmlRequest(bodyLine);
    * Reads the specified number of bytes and always close the stream.
    * @param in the file to be read for subsequent downloading.
    * @param length the number of bytes to read from the file.
    * @return An array of bytes from the file.
    * @exception IOException if an error occurs when processing the file.
    private byte[] getBytes(InputStream in, long length) throws IOException {
    DataInputStream din = new DataInputStream(in);
    byte[] bytes = new byte[ (int) length];
    try {
    din.readFully(bytes);
    finally {
    din.close();
    return bytes;
    * Sends the HTML request to Cyc.
    * @param cycPath the portion of the URL which is given to the Cyc HTML server.
    private void cycHtmlRequest(String cycPath) {
    String request = sock.getInetAddress().getHostName() + "&" + cycPath + "#";
    System.out.println("request=" + request);
    ArrayList bytes = new ArrayList(10000);
    try {
    cycHtmlSocket = new Socket(cycHost, cycPort);
    System.out.println("cycHost=" + cycHost + " cycPort=" + cycPort);
    BufferedReader cycIn = new BufferedReader(new InputStreamReader(cycHtmlSocket.getInputStream()));
    PrintWriter cycOut = new PrintWriter(cycHtmlSocket.getOutputStream(), true);
    cycOut.println(request);
    cycOut.flush();
    int ch = 0;
    while (ch >= 0) {
    ch = cycIn.read();
    bytes.add(new Integer(ch));
    catch (Exception e) {
    Log.current.printStackTrace(e);
    byte[] byteArray = new byte[bytes.size()];
    for (int i = 0; i < bytes.size() - 1; i++) {
    Integer ich = (Integer) bytes.get(i);
    byteArray[i] = ich.byteValue();
    try {
    writeTextBytes(byteArray);
    catch (Exception e) {
    Log.current.println(e.getMessage());
    * Responds to the HTTP client with data content from the requested URL.
    * @param bytes the array of bytes from the URL.
    * @exception IOException if there is an error writing to the HTTP client.
    public void writeDataBytes(byte[] bytes) throws IOException {
    out.writeBytes("HTTP/1.1 200 OK\r\n");
    out.writeBytes("Server: Cyc WebServer\r\n");
    out.writeBytes("Connection: close\r\n");
    out.writeBytes("Content-Length: " + bytes.length + "\r\n");
    String prefix = (new String(bytes)).toLowerCase();
    if (prefix.indexOf("<html>") > -1)
    out.writeBytes("Content-Type: text/html\r\n\r\n");
    else
    out.writeBytes("Content-Type: application/java\r\n\r\n");
    out.write(bytes);
    out.flush();
    * Respond to the HTTP client with text content from the requested URL.
    * @param bytes the array of bytes from the URL.
    * @exception IOException if there is an error writing to the HTTP client.
    public void writeTextBytes(byte[] bytes) throws IOException {
    out.writeBytes("HTTP/1.1 200 OK\r\n");
    out.writeBytes("Server: Cyc WebServer\r\n");
    out.writeBytes("Connection: close\r\n");
    out.writeBytes("Content-Length: " + bytes.length + "\r\n");
    out.writeBytes("Content-Type: text/html\r\n\r\n");
    out.write(bytes);
    out.flush();
    * Gets properties governing the web server's behavior.
    private void getProperties() {
    port = DEFAULT_PORT;
    String portProperty = System.getProperty("org.opencyc.webserver.port", "");
    if (! portProperty.equalsIgnoreCase(""))
    port = (new Integer(portProperty)).intValue();
    Log.current.println("Listening on port " + port);
    cycPort = DEFAULT_CYC_PORT;
    String cycPortProperty = System.getProperty("org.opencyc.webserver.cycPort", "");
    if (! cycPortProperty.equalsIgnoreCase(""))
    cycPort = (new Integer(cycPortProperty)).intValue();
    Log.current.println("Cyc connections directed to port " + cycPort);
    String dirsProperty = System.getProperty("org.opencyc.webserver.dirs", "");
    dirs = new ArrayList(3);
    StringTokenizer st = new StringTokenizer(dirsProperty, ";", false);
    while (st.hasMoreTokens()) {
    String dir = st.nextToken();
    dirs.add(dir);
    trees = false;
    String treesProperty = System.getProperty("org.opencyc.webserver.trees", "");
    if (! treesProperty.equalsIgnoreCase(""))
    trees = true;
    traceRequests = false;
    String traceRequestsProperty = System.getProperty("org.opencyc.webserver.traceRequests", "");
    if (! traceRequestsProperty.equalsIgnoreCase("")) {
    traceRequests = true;
    Log.current.println("tracing requests");
    * Adds transitive Class-Path jars to jfs.
    * @param jar the jar file
    * @param jfs the list of jar files to serve.
    * @param dir the jar file directory.
    * @exception IOException if an I/O error has occurred with the jar file.
    private void addJar(String jar, ArrayList jfs, String dir) throws IOException {
    Log.current.println("Serving jar files from: " + dir + jar);
    JarFile jf = new JarFile(dir + jar);
    jfs.add(jf);
    Manifest man = jf.getManifest();
    if (man == null)
    return;
    Attributes attrs = man.getMainAttributes();
    if (attrs == null)
    return;
    String val = attrs.getValue(Attributes.Name.CLASS_PATH);
    if (val == null)
    return;
    dir = dir + jar.substring(0, jar.lastIndexOf(File.separatorChar) + 1);
    StringTokenizer st = new StringTokenizer(val);
    while (st.hasMoreTokens()) {
    addJar(st.nextToken().replace('/', File.separatorChar), jfs, dir);
    * Administrative accessor method that obtains list of directories from which files are served.
    public ArrayList getDirs() {
    return dirs;
    * Administrative method that updates the list of directories from which files are served.
    public synchronized void setDirs(ArrayList dirs) throws IOException {
    this.dirs = dirs;
    fileCache.clear();
    processDirectories();
    * Administrative accessor method that obtains number of files served.
    * @return The number of files served.
    public long getNbrFilesServed() {
    return nbrFilesServed;
    * Administrative accessor method that obtains number of files served from cache.
    * @return The number of files served from the cache.
    public long getNbrCacheHits() {
    return nbrCacheHits;
    * Administrative method that clears the file cache.
    public synchronized void clearFileCache() {
    Log.current.println("Clearing file cache");
    fileCache.clear();
    nbrFilesServed = 0;
    nbrCacheHits = 0;
    * Processes the directories from which files are served, expanding jar trees if
    * directed.
    * @exception IOException if problem occurs while processing the jar files.
    private void processDirectories() throws IOException {
    if (dirs.size() == 0)
    if (File.separatorChar == '\\')
    dirs.add(DEFAULT_WIN_DIR);
    else
    dirs.add(DEFAULT_DIR);
    Iterator directories = dirs.iterator();
    while (directories.hasNext())
    Log.current.println("Serving from " + directories.next());
    if (trees) {
    map = new HashMap();
    for (int j = 0; j < dirs.size(); j++) {
    String dir = (String) dirs.get(j);
    String[] files = new File(dir).list();
    for (int i = 0; i < files.length; i++) {
    String jar = files[i];
    if (!jar.endsWith(".jar"))
    continue;
    ArrayList jfs = new ArrayList(1);
    addJar(jar, jfs, dir);
    map.put(jar.substring(0, jar.length() - 4), jfs.toArray(new JarFile[jfs.size()]));
    * Provides the command line interface for creating an HTTP server.
    * The properties are:
    * <pre>
    * org.opencyc.webserver.port=<HTTP listening port>
    * </pre>
    * which defaults to 80.
    * <pre>
    * org.opencyc.webserver.cycPort=<Cyc connection port>
    * </pre>
    * which defaults to 3600.
    * <pre>
    * org.opencyc.webserver.dirs=<path>;<path> ... ;<path>
    * </pre>
    * with the argument enclosed in quotes if any path contains an
    * embedded space.
    * The default directory on Windows is C:
    * and the default on other systems is / the default
    * can be overridden with this property. By default, all files
    * under this directory (including all subdirectories) are served
    * up via HTTP. If the pathname of a file is <var>path</var> relative
    * to the top-level directory, then the file can be downloaded using
    * the URL
    * <pre>
    * http://<var>host</var>:<var>port</var>/<var>path</var>
    * </pre>
    * Caching of file contents is performed.
    * <pre>
    * org.opencyc.util.log=all
    * </pre>
    * If the all value is given, then all attempts to download files
    * are output.
    * <pre>
    * org.opencyc.webserver.traceRequests
    * </pre>
    * If this property has any value, then the client HTTP requests are
    * output.<p>
    * <pre>
    * org.opencyc.webserver.trees
    * </pre>
    * This property can be used to serve up individual files stored
    * within jar files in addition to the files that are served up by
    * default. If the property has any value, the server finds all jar files
    * in the top-level directory (not in subdirectories). For each
    * jar file, if the name of the jar file is <var>name</var>.jar, then any
    * individual file named <var>file</var> within that jar file (or within
    * the jar or zip files referenced transitively in the Class-Path manifest
    * attribute, can be downloaded using a URL of the form:
    * <pre>
    * http://<var>host</var>:<var>port</var>/<var>name</var>/<var>file</var>
    * </pre>
    * When this property has any value, an open file descriptor and cached
    * information are held for each jar file, for the life of the process.
    * @param args an unused array of command line arguments.
    public static void main(String[] args) {
    Log.makeLog();
    System.out.println("OpenCyc Web Server");
    try {
    // Launch thread to accept HTTP connections.
    current = new WebServer();
    current.start();
    catch (IOException e) {
    e.printStackTrace();
    * Just keep looping, spawning a new thread for each incoming request.
    public void run() {
    try {
    while (true) {
    // Launch thread to process one HTTP request.
    new Task(server.accept()).start();
    catch (IOException e) {
    e.printStackTrace();

    JLundan,
    I want to thank you for responding to the thread I started on the forum at java.sun.com. Your solution to my problem of needing to print the code of the html pages that the file I included generates was just what I was looking for. However, I have some further questions to ask, if you don't mind. To clarify my task I should say that your rephrasing of the problem is accurate: "You wan't to display the contents of the HTML file that the web server produces in response of client's request?"
    Yes, this is what I need to do, but also it needs to display the source code of that html file that the server produces in response to the client's request. Also, in this case, I am the client requesting that the server return some html file, and I'm not sure where the server is. But the webserver.java file that I shared on the forum is on my local machine. I was wondering if I could modify this webserver.java file at my home so that any html file the server returns to me would automatically display the source code. This is a school project of mine and I am stuck on this one thing here.
    Further, where would I put the "foo.html" file so it can be written to?
    FileOuputStream fos = new FileOutputStream("foo.html");
    fos.write(bytes);
    fos.close();
    Thanks so much for your help. I look forward to your response, at your convenience.
    Regards

  • OpenScript: Which files to put under Version Control?

    Hi,
    According to JB's description of [how to enable Subversion|https://forums.oracle.com/forums/thread.jspa?messageID=10677356] for OpenScript, I have now an active version control.
    The next question is now: which files I should put under version control? Obviously, the script.java is a good decision, but there are many more, such as java, properties, but also specific folders like "recorded data" and "results" folder.
    Which once I should put under version control, any recommendation?
    Thanks a lot in advance!
    Volker

    Thanks for your replies,
    it's nice to know that I was going the right way.. :)
    But how do you handle these little bugs, that I mentioned in my first message? Do you check-out all files in the project before work? Or they are TeamSystem - specific?
    Best wishes, Serg.

  • Which file do I need and how do I install it so I can run firefox v19?

    I've been told by Bosch tech support that I need version 18 or 19 of Firefox in order to be able to connect to and program one of their fire alarm panels. I've found the list of old versions, which file do I need? This is exceptionally important as it is for a Fire Alarm.

    Use Portable Firefox 19.0 for that. You can install it without it affecting your Firefox 25.0.1 installation. Then use Firefox 25.0.1 for everything else.
    You can get Portable Firefox 19.0 - scroll down the page a bit. <br />
    http://sourceforge.net/projects/portableapps/files/Mozilla%20Firefox,%20Portable%20Ed./

  • Changing which files are opened automatically when opening a solution

    When I open a solution, VS automatically opens various files in the editor.   There must be a configuration setting somewhere in the solution that tells VS which files to open but I'm unable to find that setting.  Anyone know where this setting
    can be found?

    It's in the .suo file.
    If you have a Foo.sln then you will also have a (hidden) Foo.v12.suo file and that's where this information is stored.
    The .suo is a binary file in an undisclosed format.
    Solution User Options, I believe, is what .suo stands for.  (At least, that's what I say in my head when I see .suo.)
    It's user-specific and machine-specific, and therefore not something that should be committed to your revision control system.

Maybe you are looking for

  • Setting up airport extremes with mobile netbook cart

    I work in a school environment, running windows.  We have four mobile carts in the high school.  We have an airport extreme for each of the carts.  In our situation, the airport extremes are mobile.  They do not stay in one location all the time.  Th

  • Relationship between Table BKPF and RBKP

    Hello Developers, I need to fetch value of field BKTXT  from table BKPF and this value need to insert in internal table i_tab. in the below situation: select bebeln bebelp bwerks ausnam alifnr abelnr          abldat abudat          caedat cekgrp cbuk

  • Import Multiple Records to a PDF Form

    Hi, I produce a separate XML file for every voucher sent to a client on a golf tour.  Using a form created in LiveCycle Designer 8.0 I create a corresponding PDF document for each voucher and import the data using Acrobat XI Pro. However I need a bet

  • [JS][CS6] Change hyperlink page destination

    Hi people! I bet this is simple, but I can't work it out.. and documentation is scarce. I want to change the PageDestination of a certain hyperlink via javascript. Lets go with this: app.activeDocument.hyperlinks.itemByName("Hyperlänk 8").destination

  • Big Data example

    Hi all,  I hear the term big data for quite some time now... Whenever I look on the web I only find infrastructure explanation... What does it mean in terms of T-Sql coding? structural storage on sql server (are tables used?)? Is there a "Hello World