VMTAR, TAR, and GZIP

I met on this issue and I just want to be sure that I have all the correct information:

(1) you must tar files/directories in the first place, that will create a .tar file, i.e.: start w/foo, finish with foo.tar

(2) then, using vmtar, you "especially" reformat the tar 'generic' file and you end up with a .vmtar file, IE: start w/foo.tar, end up w/foo.vmtar

(3) Finally, gzip file you .vmtar, that is to say: start with the foo.vmtar file, end up w/foo.vgz

Y/N?

THX.

Yes, this method works.

Tags: VMware

Similar Questions

  • How to remove UOMs of NET, TARE and GROSS weight on the trade in v6.2 sheet?

    I know we can hide UOM using JavaScript.

    Is there way to delete of the UOM of NET, TARE and GROSS weight on the card of trade at v6.2 permanently?

    Thank you

    Nefertari

    There is one line that is missing at the end of the config\Extensions\UIExtensionScripts\static\2147.js file. Please, add a line like below.

    $(document).ready(filterUOMs);  // execute filtering when page is loaded
    Sys.WebForms.PageRequestManager.getInstance().add_endRequest(filterUOMs); // execute filtering when a section is refreshed, like clicking gross weight calc
    
  • How to add / remove UOMs of NET, TARE and GROSS weight on the business page?

    How to add / remove UOMs of NET, TARE and GROSS weight on the business page?

    I've also attached the screenshot of what I want to add / remove.

    I am currently using v6111.11

    Please do the needful.

    Thank you

    Nefertari

    You can set up your display of the user interface by using the user interface extensibility. You can learn more about the extensibility of the user interface in the Pack of extensibility.

    Here is an example of javascript that you can use to filter the fields weight gross and net.  You can add a var and tare weight.  The script is the targeting of fields based on their identification. You can find their identity papers using the tools of the developer of the browser. For example, the tare weight UOM dropdown ID is "ctl01_CtlPackagingAttributeCU1_ctlCollapsibleContentContainer_ctl00_ddTareWeight" you can find all the pkids GLU in the UOM db table.

    Make sure you have no business page in the system with all UOMs filter you selected.  If so, these selections will be lost.  You can further customize this script to include the selected UOMs if you prefer.

    ----------------------------------------------

    function filterUOMs() {
      var NetWeightAllowedUOMs = ['',
    '2125C9F3D300-AA30-446E-8332-F177CD142950','2125B86219F3-9C78-4a6e-ABD2-506D34BCE275','2125AAC32296-A303-4d7f-B4EF-BA2003573D3E','21257FBD57ED-79FC-44be-8F0D-82E4045ACDD1','21252CEBFF48-9690-408c-AA79-6B7CAAA35D0A','21250E2887F6-6A3E-4862-A7FD-BDCDF75A404D','2125042958D3-E33A-4537-B029-098D065AF1A3','21256C0CC1E3-378A-43bd-B6E2-F7A0A23B42DA','2125586D8B32-95B9-4ebe-BDC1-285420735436','21255703D0DF-B497-4400-A716-38D674693954','21251C1A1522-134D-45a4-BC6B-6E3DEA51F740','212514d3bd78-29b3-495a-a852-3028f0a60b34'];
    
    var GrossWeightAllowedUOMs = ['',
    '212514d3bd78-29b3-495a-a852-3028f0a60b34','21251C1A1522-134D-45a4-BC6B-6E3DEA51F740','2125586D8B32-95B9-4ebe-BDC1-285420735436'];
    
      var majorNetWeight = $("select[id='ctl01_CtlPackagingAttributeCU1_ctlCollapsibleContentContainer_ctl00_ddContainerNetWeightMajor']"); // find Container Net weight major UOM drop down
      if (majorNetWeight.length > 0) { // if drop down exists, compare each option and remove those not in allowed UOMs
      majorNetWeight.find('option').each(function () {
      if ($.inArray(this.value, NetWeightAllowedUOMs) === -1)
      {
      $(this).remove();
      };
      });
      }
    
      var minorNetWeight = $("select[id='ctl01_CtlPackagingAttributeCU1_ctlCollapsibleContentContainer_ctl00_ddContainerNetWeightMinor']"); // find Container Net weight minor UOM drop down
      if (minorNetWeight.length > 0) {  // if drop down exists, compare each option and remove those not in allowed UOMs
      minorNetWeight.find('option').each(function () {
      if ($.inArray(this.value, NetWeightAllowedUOMs) === -1)
      {
      $(this).remove();
      };
      });
      }
    
      var GrossWeight = $("select[id='ctl01_CtlPackagingAttributeCU1_ctlCollapsibleContentContainer_ctl00_ddCUGrossWeightUOM']"); // find Container Net weight minor UOM drop down
      if (GrossWeight.length > 0) {  // if drop down exists, compare each option and remove those not in allowed UOMs
      GrossWeight.find('option').each(function () {
      if ($.inArray(this.value, GrossWeightAllowedUOMs) === -1)
      {
      $(this).remove();
      };
      });
      }
    };
    
    $(document).ready(filterUOMs);  // execute filtering when page is loaded
    Sys.WebForms.PageRequestManager.getInstance().add_endRequest(filterUOMs); // execute filtering when a section is refreshed, like clicking gross weight calc
    
  • What is the difference between TAR and SR oracle?

    Hi all


    Not sure if this is the right forum to ask this question. My question is not a technique, it's on the way to work with oracel issues and support.

    Y at - it no differnece between a TAR and a SR? If so, when we opened a TAR and in what scenarios, we open an SR?

    How to access metalink? I thought my company will create an account and provide me with a user name and password. My colleague said he enrolled in metalink with his official ID, then oracle people contacted my company, but it is a consultant/employee of my company, then they approved his registraition. It work?

    I know what you think of me. You're right, I never had access tío metalink. I saw the couple of my friend open SRs and reading documents. But I've never had my own code.

    Thanks in advance.

    SR & TAR are the same thing.
    In the past, we usually call them TAR (requests for Technical Assistance). They have just been renamed SR (Service Request).

    To access Metalink (now called My Oracle Support), your company must have a valid license of Oracle & a few CSI, which would allow you to register on their site.

  • ODIUnzip and gzip files?

    The stage of ODIunzip will be able to unzip the .gz files?

    Get error when trying... I just want to know if it is possible, before I have to try something else (such as shell script).

    -John

    No ODIUnzip does not support the Gunzip, you must use the operating system command.

  • Gzip analyzes XML

    I've seen posts about issues with extracting XML and gzip. Separately, I have no problem doing either. But I can't send a gzipinputstream to my xml parser - he just throws exception and told me no stack trace.

    I send a parameter in my http request that determines if the server should return an XML file or the gziped XML file.  When you ask gzip, I can read and analyze very well. If I ask gzip and just read steam like this...

                    byte[] data = new byte[256];
                    int len = 0;
                    int size = 0;
                    StringBuffer raw = new StringBuffer();
    
                    while ( -1 != (len = inputStream.read(data)) )
                    {
                        raw.append(new String(data, 0, len));
                        size += len;
                    }
    

    It prints like my xml... so I guess that means his power to receive the data very gzip.

    However, if I ask gzip and try to analyze using the same code that works when I just parse xml, it fails.  Is there another step I have to do to convert the inputstream so Manager xml can be read?

    httpConnection = (HttpConnection)Connector.open(url);
    inputStream = httpConnection.openDataInputStream();
    
    if(httpConnection.getResponseCode() == HttpConnection.HTTP_OK)
    {
    
        inputStream = new GZIPInputStream(inputStream);
        InputSource is = new InputSource(inputStream);
    
        is.setEncoding(desiredEncoding);
    
        SAXParserFactory factory = SAXParserFactory.newInstance();
        SAXParser parser = factory.newSAXParser();
    
        DefaultHandler hcHandler = new XMLParse();
    
        parser.parse(is,hcHandler);
    
    } //end if(httpConnection.getResponseCode() == HttpConnection.HTTP_OK)
    

    You should check to see if the content is gzip:

    String encoding = m_httpConnection.getHeaderField("Content-Encoding");
    If ((encodage! = null) & (encoding.indexOf ("gzip")! = - 1)) {}
    compressed = true;
    }

    Then, unzip it:

    If {(compressed)
    Gzip GZIPInputStream = new GZIPInputStream (dataInputStream);
    DataInputStream tmp = new DataInputStream (gzip);
    dataInputStream = tmp;
    }

    Now you can safely parse the XML code.

  • "Détarer" problem with the Torch 9800/Device Simulator

    Hello everyone,

    Im a very strange problem with the Torch 9800 (OS 6).

    I have an application developed with 5.0 SDK. Throughout the process of synchronization of this app, there is a point he gets a. tar.gz file that is unziped. For this purporse (in fact, the tar part / "détarer"), we use a tar / "détarer" 'library' we found here in the forum (http://code.google.com/p/j2metar/). This library works fine in all phones with OS 5.0 that we try and even on the simulators of somo 6.0.

    But there seems to be a problem with the torch. During the uncompress, there are an exception, because what is the reading of the structure of the tar (from the industry), load the bytes that are invalid, corrupt, dirty, memory, and it fails.

    The strange thing of all is that if I have only the routine détarer to the file (in the torch), it works! But when I run all my sinchronization, which open and close httpconnections and process the file on some points (sometimes the same point, others of different) fails.

    My question is... are at - it a known bug, issue, etc. with the BONE of the torch (touch device)? Of course, the first thing that jump to mind is "my code is incorrect, memory leaks (in Java, but perhaps odd that a stream was not getting close properly)" and so on, but I can't seam to find the problem. And like I said before, this application works fine with the same file tar.gz in other devices like the 8520 OS 5, 9780 OS 6, 8900 (OS 5).

    IM completely stuck with this problem and any help/test will be greatly appreciated.

    Here some code, the method that makes him détarer and calls the détarer/tar library:

    public static boolean "détarer" (String tarFileUrl, String destUrl) bird Exception {}

    FileConnection fconn = null;
    FileConnection tarFileConn = null;
    TarInputStream tis = null;
    Boolean bRet = false;

    try {}
    fconn = (FileConnection) Connector.open (destUrl, Connector.READ_WRITE);
    If (! fconn.exists ())
    fconn.mkdir ();   Create the folder if it does not exist
    fconn. Close();
    fconn = null;
                
    Create a TarInputStream
    tarFileConn = (FileConnection) Connector.open (tarFileUrl);
    TIS = new TarInputStream (tarFileConn.openInputStream ());
    tarFileConn.close ();

    Entry TarEntry;
    int count;
    data Byte = null;
                
    While ((input = tis.getNextEntry ())! = null) {}
    Count = 0;
    data = new ubyte [2048];

    fconn = (FileConnection) Connector.open (destUrl + entry.getName (), Connector.READ_WRITE);
    If (! fconn.exists ())
    fconn. Create();   create the file if it doesn't exist
    else {}
    fconn. Delete();    Create a new
    fconn. Create();
    }

    OutputStream os = fconn.openDataOutputStream ();
                    
    While ((count = tis.read (data))! = - 1) {}
    OS. Write (data, 0, count);

    }
                    
    OS. Flush();
    OS. Close();
                    
    fconn. Close();
    fconn = null;
               
    }

    TIS. Close();
    TIS = null;
                
    bRet = true;
                
    } catch (Exception e) {}
    e.printStackTrace ();
    throw e;
    } {Finally
    try {}
    If (tis! = null)
    TIS. Close();
    If (tarFileConn! = null)
    tarFileConn.close ();
    If (fconn! = null)
    fconn. Close();
    } catch (Exception e) {}
    }
            
    Return bRet;
    }

    Thank you!

    Santiago.

    Hello

    It is a problem with the OS 6.  I've posted about this before here:

    http://supportforums.BlackBerry.com/T5/Java-development/reading-and-writing-file-on-torch-9800/TD-p/...

    Basically, corruption may occur if you write to the stream simultaneously in different threads.  The solution is to ensure that a single file operation is occurring at a given time.  Some people have had the chance to control the size of the buffer to something as a multiple of (64 * 1024)-1. e.g. 65535.  In addition, you can rinse after each write to the buffer.  I have had no luck with this, but others.  If you look at the bug in JIRA, there is also no activity on this:

    https://www.BlackBerry.com/jira/browse/JAVAAPI-1513

    Good luck!

  • VMWare Tools installed and not installed...

    3.5.0u4 ESX3i

    I created a Ubuntu VM. Then I added VMWare tools via the settings / installation/upgrade of VMware Tools

    (in the "status, if reported panel installation has succeeded).

    Yet, when I look in the summary of this Ubuntu VM tab, it says:

    VMware Tools: not installed

    Why is it (a power power off of the virtual machine does not change it)?

    ndhert wrote:

    I created a Ubuntu VM. Then I added VMWare tools via the settings / installation/upgrade of VMware Tools

    What you were doing just before the guest system the VMware Tools CD .iso image file. On the host Windows installation should start automatically. For Linux, you will need to mount the CD, copy the files from there to the directory and use the .tar and .rpm to install the tools.

    Read this:http://pubs.vmware.com/vi3i_e35u2/admin/BSA_Creating_VMs.14.8.html

    AWo
    VCP / VMware vEXPERT 2009

    \[:o]===\[o:]

    = Due to a lack of employees, human beings humans are working here. -Treat it with care, they are rare. =

  • tar: /usr/lib/vmware/modules/source/vmnet.tar: cannot open: no such file or directory (the installation failed)

    I tried to install VMWare Server for the past few hours now, but nothing helped. I use Ubuntu 8.10.

    I have already patched, had to move manually the files, and now I'm here:

    VMware

    VMware is installed, but it has not been configured (correctly)

    for this system. To (re-) set, invoke the following command:

    usr/bin/vmware-config.pl.

    root@xxxxxx-laptop: /usr/bin/vmware-config.pl

    Ensuring services for VMware Server are stopped.

    Stopping VMware services:

    Virtual machine monitor makes

    Networks bridged on/dev/vmnet0 made

    Server DHCP on/dev/vmnet1 did

    Guest network only on/dev/vmnet1 made

    Server DHCP on/dev/vmnet8 is

    NAT service on/dev/vmnet8 is

    Guest network only on/dev/vmnet8 is

    Virtual Ethernet is

    Configure libraries GTK + 2.4 relief.

    In which directory you want to install the mime type icons?

    use

    This directory contains your desktop menu input files? These files have a

    .desktop file extension. / usr/share/applications

    In which directory you want to install the application icon?

    pixmaps

    /usr/share/applications/VMware-Server.desktop: warning: value ' vmware - server.png ' key 'Icon' in the group "Desktop Entry" is an icon of name with an extension, but there should be no extension as described in the icon theme specification if the value is not an absolute path

    /usr/share/applications/VMware-console-URI-handler.desktop: warning: value ' vmware - server.png ' key 'Icon' in the group "Desktop Entry" is an icon of name with an extension, but there should be no extension as described in the icon theme specification if the value is not an absolute path

    Try to find a vmmon module suitable for your running kernel.

    None of the vmmon modules pre-built for VMware Server is suitable for your

    kernel running.  Do you want this program to try to build the vmmon module for

    your system (you must have a C compiler installed on your system)?

    Using compiler "/ usr/bin/gcc". Environment variable CC to override.

    What is the location of the directory of C header files that match your running

    kernel? /lib/modules/2.6.27-11-generic/build/include

    Extract the sources of the vmmon module.

    The construction of the vmmon module.

    Building for VMware Server 1.0.0.

    Using 2.6.x kernel build system.

    do: enter the directory ' / tmp/vmware-config4/vmmon-only '.

    do /lib/modules/2.6.27-11-generic/build/include/ - C... SUBDIRS = $PWD SRCROOT = $PWD. modules of

    make [1]: Entering directory ' / usr/src/linux-headers-2.6.27-11-generic'

    CC /tmp/vmware-config4/vmmon-only/linux/driver.o

    CC /tmp/vmware-config4/vmmon-only/linux/driverLog.o

    CC /tmp/vmware-config4/vmmon-only/linux/hostif.o

    /tmp/vmware-config4/vmmon-only/linux/hostif.c: in function 'HostIF_SetFastClockRate ':

    /tmp/vmware-config4/vmmon-only/linux/hostif.c:3441: warning: argument passing "send_sig" 2 rejects the characterization of target of pointer type

    CC /tmp/vmware-config4/vmmon-only/common/comport.o

    CC /tmp/vmware-config4/vmmon-only/common/cpuid.o

    CC /tmp/vmware-config4/vmmon-only/common/hash.o

    CC /tmp/vmware-config4/vmmon-only/common/memtrack.o

    CC /tmp/vmware-config4/vmmon-only/common/phystrack.o

    CC /tmp/vmware-config4/vmmon-only/common/task.o

    cc1plus: WARNING: command line option "- Werror - implicit-function-declaration" is valid for C/ObjC but not for C++

    cc1plus: WARNING: command line option ' - Wdeclaration - apres-declaration "is valid for C/ObjC but not for C++

    cc1plus: WARNING: command line option ' - Wno - pointer-sign "is valid for C/ObjC but not for C++

    cc1plus: WARNING: command line option ' - Wstrict - prototypes "are valid for Ada/C/ObjC but not for C++

    In file included from /tmp/vmware-config4/vmmon-only/common/task.c:1195:

    /tmp/vmware-config4/vmmon-only/common/task_compat.h: function ' void Task_Switch_V45 (VMDriver *, Vcpuid)':

    /tmp/vmware-config4/vmmon-only/common/task_compat.h:2667: warning: 'sysenterState.SysenterStateV45::validEIP' may be used uninitialized in this function

    /tmp/vmware-config4/vmmon-only/common/task_compat.h:2667: warning: 'sysenterState.SysenterStateV45::cs' may be used uninitialized in this function

    /tmp/vmware-config4/vmmon-only/common/task_compat.h:2667: warning: 'sysenterState.SysenterStateV45::rsp' may be used uninitialized in this function

    /tmp/vmware-config4/vmmon-only/common/task_compat.h:2667: warning: 'sysenterState.SysenterStateV45::rip' may be used uninitialized in this function

    CC /tmp/vmware-config4/vmmon-only/common/vmciContext.o

    CC /tmp/vmware-config4/vmmon-only/common/vmciDatagram.o

    CC /tmp/vmware-config4/vmmon-only/common/vmciDriver.o

    CC /tmp/vmware-config4/vmmon-only/common/vmciDs.o

    CC /tmp/vmware-config4/vmmon-only/common/vmciGroup.o

    CC /tmp/vmware-config4/vmmon-only/common/vmciHashtable.o

    CC /tmp/vmware-config4/vmmon-only/common/vmciProcess.o

    CC /tmp/vmware-config4/vmmon-only/common/vmciResource.o

    CC /tmp/vmware-config4/vmmon-only/common/vmciSharedMem.o

    CC /tmp/vmware-config4/vmmon-only/common/vmx86.o

    CC /tmp/vmware-config4/vmmon-only/vmcore/compat.o

    CC /tmp/vmware-config4/vmmon-only/vmcore/moduleloop.o

    LD /tmp/vmware-config4/vmmon-only/vmmon.o

    Construction modules, step 2.

    MODPOST modules 1

    WARNING: modpost: vmmon.ko module uses the marked "init_mm" symbol is not USED

    CC /tmp/vmware-config4/vmmon-only/vmmon.mod.o

    LD /tmp/vmware-config4/vmmon-only/vmmon.ko

    make [1]: leaving directory ' / usr/src/linux-headers-2.6.27-11-generic'

    CP f vmmon.ko. /... vmmon.o

    make: leaving directory ' / tmp/vmware-config4/vmmon-only '.

    The module loads perfectly in the kernel running.

    This program already created the file/dev/vmmon and was about to remove

    He someone else apparently already made.

    You have already setup network.

    You want to skip the network configuration and keep your old settings as they are?

    (yes/no)

    Extract the module vmnet sources.

    tar: /usr/lib/vmware/modules/source/vmnet.tar: cannot open: no such file or directory

    tar: error is not recoverable: leave now

    Unable to decompress the "/ usr/lib/vmware/modules/source/vmnet.tar" file in the

    directory ' / tmp/vmware-config4.

    For more information about how to troubleshoot module, please

    visit our Web site at " " http://www.VMware.com/download/modules/modules.html "and "

    " http://www.VMware.com/support/reference/Linux/prebuilt_modules_linux.html ". "

    The execution is canceled. [/ b]

    I know that vmnet.tar was here before... and he suddenly disappeared. How do we do it back, or can I download it somewhere? Thank you.

    A little worrying that this file should simply disappear - never happened on any of my guests. Check the logs, etc. for possible reasons. You get also warnings much more when you run vmware - config.pl I've ever encountered. What files did you manually have to move?

    If you download the tarball, extract the file from here and place it in the folder "/ usr/lib/vmware/modules/source", then you should probably go further. Should also be vmci.tar, vmnet.tar and vsock.tar in there.

    ---

    If you have found this device or any other answer useful please consider the use of buttons useful or Correct to award points.

  • Problem saving and loading multiple images in the same file

    Hello

    I am having a problem, I have a thah program creates a fileOutputSteam and a gzipOutputSteam and finally an imageIO wrote several images, then I do the reverse process, a
    FileInputsteam and an inputsteam of gzip, imageIO.read read only image of frist, not the rest.

    Can someone help me?
    PS: Sorry for my bad English, I'm Spanish

    Code:
    class Lector {
    
        // Atributos
        private String ruta;
        private static Collection<Imagen> imagenes;
    
        /**
         * Clase que carga un fichero .zip lleno de imagenes
         * @param ruta: ruta donde se halla el fichero .zip a cargar
         */
        public Lector(String ruta) {
        }
        /**
         * Constructor sin parametros
         */
        public Lector() {
        }
        /**
         * Metodo que setea el archivo que queremos cargar
         * @param ruta: Ruta del fichero a cargar
         */
        public void setArchivo(String ruta) {
            this.ruta = ruta;
            imagenes = new ArrayList<Imagen>();
        }
    
        /**
         *
         * @param output: Lugar donde sera representada la salida de la carga de imagenes
         * @return retorna 1 si la carga fue bien y 0 si fue mal
         * @throws FileNotFoundException : excepcion por  no haber encontrado el fichero
         * @throws IOException: excepcion por no poder leer el fichero
         */
        public int cargarImagenes(JTextArea output) throws FileNotFoundException, IOException {
            ZipEntry entrada;
            int contador = 0;
            String archTemp = "temp.jpg";
            FileInputStream fis = new FileInputStream(ruta);
            ZipInputStream zis = new ZipInputStream(new BufferedInputStream(fis));
            BufferedOutputStream dest = null;
            byte[] data = new byte[9000];
    
            // Leemos secuencialmente el archivo zip
            while ((entrada = zis.getNextEntry()) != null) {
                File bufferTemporal = new File(archTemp);
                System.out.println("Archivo " + entrada.getName() + " cargado!");
                output.append("Archivo " + entrada.getName() + " cargado!\n");
                if (!entrada.isDirectory()) {
                    FileOutputStream fos = new FileOutputStream(bufferTemporal);
                    dest = new BufferedOutputStream(fos, 9000);
    
                    while ((contador = zis.read(data, 0, 9000)) != -1) {
                        dest.write(data, 0, contador);
                    }
                       //Cerramos los buffers
                    dest.flush();
                    dest.close();
                    fos.flush();
                    fos.close();
    
                    FileInputStream fin = new FileInputStream(bufferTemporal);
                    BufferedImage bi = ImageIO.read(fin);
                    //Guardamos el fichero
                    imagenes.add(new Imagen(bi, entrada.getName()));
                }
               bufferTemporal.delete();
            }
     
            // Cerramos los bufferes
    
            fis.close();
            zis.close();
    
           
    
            saveAsGzip("dato.gz");
            loadAsGzip("dato.gz");
            return 1;
        }
        /**
         * Funcion que carga la simagenes de dentro del .zip y las guarda en el objeto Imagen
         * @return retorna 1 si la carga fue exitosa
         * @throws FileNotFoundException: Excepcion por no encontrar el archivo
         * @throws IOException: Excepcion por no poder leer el archivo
         */
        public int cargarImagenes() throws FileNotFoundException, IOException {
            ZipEntry entrada;
            int contador = 0;
            String archTemp = "temp.jpg";
            FileInputStream fis = new FileInputStream(ruta);
            ZipInputStream zis = new ZipInputStream(new BufferedInputStream(fis));
            BufferedOutputStream dest = null;
            byte[] data = new byte[9000];
    
            // Leemos secuencialmente el archivo zip
            while ((entrada = zis.getNextEntry()) != null) {
                File bufferTemporal = new File(archTemp);
                System.out.println("Archivo " + entrada.getName() + " cargado!");
    
                if (!entrada.isDirectory()) {
                    FileOutputStream fos = new FileOutputStream(bufferTemporal);
                    dest = new BufferedOutputStream(fos, 9000);
    
                    while ((contador = zis.read(data, 0, 9000)) != -1) {
                        dest.write(data, 0, contador);
                    }
    
                    dest.flush();
                    dest.close();
                    fos.flush();
                    fos.close();
                    java.io.FileInputStream fin = new FileInputStream(bufferTemporal);
                    BufferedImage bi = ImageIO.read(fin);
    
                    imagenes.add(new Imagen(bi, entrada.getName()));
                }
               
            }
    
            // Cerramos los bufferes
            fis.close();
            zis.close();
    
            dest.flush();
            dest.close();
    
            
            return 1;
        }
        /**
         * Funcion que retorna el array de peliculas
         * @return retorna el array de peliculas
         */
        public Collection<Imagen> getImagenes() {
            return imagenes;
        }
        public int saveAsGzip(String pathFichero) throws FileNotFoundException, IOException{
    
            FileOutputStream fos = new FileOutputStream(new File(pathFichero));
         //GZIPOutputStream gzip = new GZIPOutputStream(fos);
            BufferedImage temp2;
            Imagen img;
    
            Iterator ite = imagenes.iterator();
            while(ite.hasNext()){
                img = (Imagen) ite.next();
                temp2=img.getBufferedImagen();
                
                boolean i= ImageIO.write(temp2, "JPEG", fos);
                System.out.println(i);
    
            }
            System.out.println();
    
            //gzip.finish();
            fos.flush();
             
            fos.close();
           
            //gzip.close();
    
            return 1;
        }
        public int loadAsGzip(String pathFichero) throws FileNotFoundException, IOException{
    
            imagenes.clear();
            
            FileInputStream fos = new FileInputStream(new File(pathFichero));
         //GZIPInputStream gzip = new GZIPInputStream(fos);
            BufferedImage img;
    
    
                for(int i=0;i<=100; i++){
                    
    
                 
                    img=ImageIO.read(fos);
    
                    
                    if (img != null){System.out.println(img);
                    imagenes.add(new Imagen(img, String.valueOf(i)));}
                       
                    
    
    
            
                }
    
    
    
    
           // gzip.close();
            fos.close();
    
            return 1;
        }
    }
    Published by: sabre150 on October 28, 2010 01:43

    Moderator action: added
     tags to source.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

    805814 wrote:
    Oh, sorry again, Ii have commented on all of the code not clear in my best English and posted the image of class:

    (sigh) OK, it's an improvement, but it is not yet an NBS! I think it would take me less time to write code that is a NBS that try to explain more (perhaps an example is better here?). In all cases, your code still seems to be mixing the two Zip and GZip. I've never dealt with GZip and could not be disturbed from now just for this problem, so I focused on using the Zip classes.

    Try this code:

    import java.awt.*;
    import java.awt.image.*;
    import javax.swing.*;
    import javax.imageio.*;
    import java.util.*;
    import java.util.zip.*;
    import java.io.*;
    
    /** SSCCE that demonstrates how to:
    1) Create some random images.
    2) Store them to a Zip File.
    3) Restore them from a Zip File
    Please study the code carefully, and note how in a single Java source of less
    than 100 lines of code, it manages to achieve the entire demo.!
    @author Andrew Thompson */
    class StoreImagesAsZip {
    
        static Random random;
        static int size = 60;
    
        public static BufferedImage getRandomImage() {
            BufferedImage bi = new BufferedImage(size,size,BufferedImage.TYPE_INT_RGB);
    
            Graphics2D g = bi.createGraphics();
            GradientPaint gp = new GradientPaint(
                (float)random.nextInt(size),
                (float)random.nextInt(size),
                new Color(random.nextInt(255),random.nextInt(255),random.nextInt(255) ),
                (float)random.nextInt(size),
                (float)random.nextInt(size),
                new Color(random.nextInt(255),random.nextInt(255),random.nextInt(255) )
                );
            g.setPaint(gp);
            g.fillRect(0,0,size,size);
    
            return bi;
        }
    
        static public void writeImagesToZip(File file, BufferedImage[] images) throws Exception {
            OutputStream os = new FileOutputStream(file);
            ZipOutputStream zos = new ZipOutputStream(os);
            // Zip does nothing for otherwise compressed media formats such as JPEG and PNG
            zos.setLevel( ZipOutputStream.STORED );
    
            for (int ii=0; ii< images.length; ii++) {
                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                ImageIO.write(images[ii], "png", baos);
    
                ZipEntry ze = new ZipEntry( ii + ".png" );
                zos.putNextEntry( ze );
                zos.write( baos.toByteArray() );
                zos.closeEntry();
            }
            zos.flush();
            zos.close();
        }
    
        static public BufferedImage[] readImagesFromZip(File file) throws Exception {
            ArrayList images = new ArrayList();
    
            ZipFile zipFile = new ZipFile(file);
            Enumeration en = zipFile.entries();
            while (en.hasMoreElements()) {
                ZipEntry ze = (ZipEntry)en.nextElement();
                InputStream is = zipFile.getInputStream(ze);
                BufferedImage bi = ImageIO.read(is);
                images.add(bi);
            }
    
            BufferedImage[] imageArray = new BufferedImage[images.size()];
            for (int ii=0; ii
    

    Also note that I now invested a lot of time trying to help you. If you like what I've done, the best way to show that is on the occasion of my responses as "Helpful" or "correct". If the problem is "answered", make sure that mark also.

  • Nightly icon does not appear in Debian GNOME SHELL

    Hi, I'm Tiago.
    The Nightly icon does not appear on GNOME 3. I used Ubuntu and it works very well. But now, I use Debian with GNOME 3 and after extract the .tar and create the 'Nightly.desktop (necessary to pin the menu icon)", the icon does not appear (look at the screenshot below).
    But also, I only am not settled every night my default browser.
    then so are the bugs? I have to report? What can I do?
    Grateful for the support and sorry for my bad English

    This also happens with the developer edition of Firefox (channel Aurora)?

  • 100 requests to continue POST deal with error in Firefox 24

    BUG Firefox 24!
    24 Firefox manages POST requests with the error: when 100 continue answers are preceded by 200 OK response, and then Firefox does not deal with other responses (including 200 OK response) after receipt of the response to continue first 100.
    Earlier versions more handle 100 continue properly.

    I'm sorry, I tested my script with Mozilla Firefox 25 - was the same problem. But then I spilled http connection - the newspaper said then 100 response continues and 100 OK data are mixed and gzip'ped. Then I disable deflate module for my Apache Server - and all become Okey! So, I just disable the compaction modules incorrect return data to solve the problem. Web server: apache2-mpm-itk on Debian Linux winded 7.

  • HARD SMART reallocated sector count 269, reallocated disk number of events 20

    I have a Toshiba MK6476GSXN HD about 2 years on my laptop (my computer only).

    Recently, I plugged a defective SD/USB converter, which caused all kinds of startup failures.
    Before I identified the converter failed, I thought that my HD was dying.

    I run cygwin smartmontools and he compared with those of 2 years ago.
    To interpret the results, I relied on google with the Wikipedia page http://en.wikipedia.org/wiki/S.M.A.R.T. More normalized values are better, and it seems that 100 was chosen as the reference value in health for most of the attributes.

    Selected from the smartctl output columns are displayed at http://oi58.tinypic.com/6psq3q.jpg
    with the current output (as opposed to 2 years) being a hybrid of switches x smartctl - and - one.

    I'm not entirely sure whether 3 of these attributes are abnormal, and these are marked by asterisks triple.
    The average marked attribute (#191, G-Sense_Error_Rate) is probably not an indicator of the health of the HD, because errors are due to physical jerks. The other two attributes are #5 (Reallocated_Sector_Ct = 269) and #196 (Reallocated_Event_Count = 20).

    There is no clear consensus on the issue of whether this is bad (for example, see http://superuser.com/questions/26842/can-i-trust-a-hard-drive-that-has-had-to-reallocate-sectors), so I intend to keep an eye on her and migrate off the coast of the HD over the long term.

    I'm afraid the time commitment to do so, as I do occasional snapshots of the user content (admin & non-administrator accounts) selectively using find, tar, and zip on a disc.

    I didn't used to use my backup utility Norton $ 60 (from 2 years) because I want to see myself I selected all relevant content and relevant content. Where this content tends to move with the years.

    Those who have more experience with HD technology can comment on this point, based on the results of smartctl?

    Did I miss something important that I have not already noticed?

    Hi bookworm,.

    I don t have much experience using this health HARD drive diagnostic software and to be honest, the importance of the values on your screenshots is unknown to me.

    But many different tools of diagnosis of HARD drive (IE HDD health) provide clear State of the HARD disk as: temperature or current health status of HARD drive.
    Recommends to check the health of the HARD drive by using these tools.

    On the other hand the data backup should be done periodically because even if the software would show you a good state of health of the HARD drive, the HARD drive could begin to malfunction. You know it; things always seem to happen when you expect least them. ;)

  • Powder dosing machine? Direct control of the engines?

    Hello world

    I hope it was not shown below, but I start my worki with nxt and labviev and a certain problem.

    I want to build a dosing of powder, which consists of two conductors of powder (driven by motors) and the weight of lab controlled by RS232.

    The goal is to be able to make precise mixtures in order to weigh the empty box of weight, tare, and then adds a charger of the weight of the powder (A) checks how much gave - if not enough adds some etc... etc... continued with 2 powder and mix to...

    The problem is that I know that I can write the labview NXT program to run the NXT brick, but it would be very complicated to use - the best way would be to take direct control over the engine via NXT - therefore when I want the engine to move a few degrees it should not start the program in the nxt brick do the program level LAbview... IS this possible? Can I use brick NXT as a controller of engine itself?

    Thank you

    Marek

    Marek,

    This is possible in 2009 in Module NXT and NXT earlier toolkits.  In 2009, just write your code NXT in a VI that is not the target of the NXT (e.g. it is targeted at the Instance of the Application My Computer/hand).  The VI NXT know when they are targeted on the computer and automatically send direct orders to the NXT brick via USB or Bluetooth.

    In previous versions of the tool NXT, you must use the Direct screw of NXT to accomplish the same task, which is not as transparent as the new method, but all works the same.  Please let us know if you have any questions about how to apply this.

    See you soon,.

  • Update Dell DR4100

    EU struggling to upgrade Dr4100.

    Has started yesterday with the GUI upgrade failed. tried to move from the cli, no not even with several reboots.

    Yet once I tried today with a GUI in maintenance mode and always failed. CLI upgrade failed.

    I have re-uploaded DR - UM - 3.2.0194.0.tar and went through the process with the same results.

    Anyone encountered this problem before? DR4100 was unfortunately very commercialized to the customer regarding deduplication ratios to predict.

    Regarding Setup, use 1 x 10 GbE interface connected dell N4032F switch. The device has interfaces 2 x 10 G and 4 x 1 G, I believe all bonded.

    I hope that someone out there encountered this problem of before upgrade.

    Thank you in anticipation

    VKS

    Ok. This work therefore finally got. Was it not the easiest upgrade due to the failure.

    I entered the two commands below to operate

    maintenance - remote_access - racreset

    System - init

    After going through the initialization process, I entered

    start [to reboot the device] - system

    After the reboot, I did the upgrade again

    upgrade - system

    After about 10 minutes, that's

    A system restart as above and now unable to work.

Maybe you are looking for

  • How can I get hardware reset a XT1039

    Hi people, I am at a loss. I think I have tried everything I found on the net and looked in the forums. The problem is that I lost access to my phone. There is an access of reason that I don't remember, but there is nothing there that I care, so I wa

  • M30X: battery is not charging

    Hello, I have a m30X, and I noticed that the battery does not load. I checked the power meter, and it says its empty. I tried to remove the battery and replace it to see if it was seated properly but nothing. When the laptop is on the led turns off a

  • Can I use hp photosmart d5300 for windows 8

    I HAVE THE NEW HP PAVILION SLIMLINE-314 400 PC, WINDOWS 8 - I HAVE AN OLD PRINTER HP PHOTOSMART D5300 SERIES SO CAN I USE THIS AS MY PRINTER?     PLEASE LET ME KNOW AS SOON AS POSSIBLE TO THE [email protected]

  • HP ENVY TouchSmart-j100 17t: HP Envy 17 t hinge

    When I open/close the laptop, I feel the rear move left.  It seems that the hinge is moving and part of the capital and then separates the lowercase.   I can push the pieces in place, but the next time that I open/close the case the same thing happen

  • Problem when using SOAP requests with HTTP POST function

    Hello! Using the vi of HTTP POST to send SOAP requests to a device, I encountered a problem. Take care of the HTTP header for you HTTP POST vi and defines the type of 'content' as "Content-Type: application/x-www-formulaires-urlencoded. Who is consid