Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright 2013 Alibaba.com All right reserved. This software is the
  * confidential and proprietary information of Alibaba.com ("Confidential
  * Information"). You shall not disclose such Confidential Information and shall
  * use it only in accordance with the terms of the license agreement you entered
  * into with Alibaba.com.
  */
 package com.alibaba.simpleimage.analyze.sift.io;
 

Author(s):
axman 2013-5-15 10:57:14
public class KDFeaturePointWriter {
    private final static Logger logger = Logger.getLogger(KDFeaturePointWriter.class);
    public static void writeComplete(String filenameKDFeaturePointListInfo kfl) {
        ObjectOutputStream out = null;
        try {
            out = new ObjectOutputStream(new FileOutputStream(filename));
            List<KDFeaturePointlist = kfl.getList();
            out.writeInt(list.size());
            for (KDFeaturePoint kp : list) {
                out.writeObject(kp);
            }
            out.writeInt(kfl.getWidth());
            out.writeInt(kfl.getHeight());
            out.flush();
        } catch (Exception e) {
            .equals(e.getMessage());
        } finally {
            if (out != null) {
                try {
                    out.close();
                } catch (IOException e) {
                    .equals(e.getMessage());
                }
            }
        }
    }
    public static void writeComplete(ObjectOutputStream outKDFeaturePointListInfo kfl) {
        try {
            List<KDFeaturePointlist = kfl.getList();
            out.writeInt(list.size());
            for (KDFeaturePoint kp : list) {
                out.writeObject(kp);
            }
            out.writeInt(kfl.getWidth());
            out.writeInt(kfl.getHeight());
            out.flush();
        } catch (Exception e) {
            .equals(e.getMessage());
        } finally {
            if (out != null) {
                try {
                    out.close();
                } catch (IOException e) {
                    .equals(e.getMessage());
                }
            }
        }
    }
New to GrepCode? Check out our FAQ X