Terry.Li-彬

虚其心,可解天下之问;专其心,可治天下之学;静其心,可悟天下之理;恒其心,可成天下之业。

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  143 随笔 :: 344 文章 :: 130 评论 :: 0 Trackbacks
  1. package  com.supben.util;  
  2.   
  3. import  java.awt.Dimension;  
  4. import  java.awt.Image;  
  5. import  java.awt.Point;  
  6. import  java.awt.Rectangle;  
  7. import  java.awt.image.BufferedImage;  
  8. import  java.io.File;  
  9. import  java.io.FileInputStream;  
  10. import  java.io.FileOutputStream;  
  11. import  java.io.IOException;  
  12. import  java.util.Iterator;  
  13. import  javax.imageio.ImageIO;  
  14. import  javax.imageio.ImageReadParam;  
  15. import  javax.imageio.ImageReader;  
  16. import  javax.imageio.stream.ImageInputStream;  
  17.   
  18. import  org.apache.log4j.Logger;  
  19.   
  20. import  com.sun.image.codec.jpeg.JPEGCodec;  
  21. import  com.sun.image.codec.jpeg.JPEGEncodeParam;  
  22. import  com.sun.image.codec.jpeg.JPEGImageEncoder;  
  23.   
  24. public   class  ImageUtil {  
  25.     private static final Logger log = Logger.getLogger(ImageUtil.class);  
  26.       
  27.     /** 
  28.      * 切割图片 
  29.      * @param x 截点横坐标 (从左开始计数) 
  30.      * @param y 截点纵坐标 (从上开始计数) 
  31.      * @param width 截取的宽度 
  32.      * @param height 截取的长度 
  33.      * @param oldpath 图片位置 
  34.      * @param newpath 新生成的图片位置 
  35.      */   
  36.     public static void cutImage(int x, int y, int width, int height, String oldpath, String newpath) {  
  37.   
  38.         FileInputStream is = null;  
  39.         ImageInputStream iis = null;  
  40.           
  41.         //这个是获取图片扩展名的方法,比如:jpg。我这里有现成的,如果没有,自己实现  
  42.         String imgType = StringUtil.getExt(oldpath);  
  43.   
  44.         try {  
  45.             is = new FileInputStream(oldpath);  
  46.             Iterator<ImageReader> it = ImageIO.getImageReadersByFormatName(imgType);  
  47.             ImageReader reader = it.next();  
  48.             iis = ImageIO.createImageInputStream(is);  
  49.             reader.setInput(iis, true);  
  50.             ImageReadParam param = reader.getDefaultReadParam();  
  51.             Point p = new Point();  
  52.             p.setLocation(x, y);  
  53.   
  54.             Dimension d = new Dimension();  
  55.             d.setSize(width, height);  
  56.             Rectangle rect = new Rectangle(p, d);  
  57.             param.setSourceRegion(rect);  
  58.   
  59.             BufferedImage bi = reader.read(0, param);  
  60.             ImageIO.write(bi, imgType, new File(newpath));  
  61.   
  62.             is.close();  
  63.             iis.close();  
  64.         } catch (Exception e) {  
  65.             log.error(e);  
  66.         }  
  67.     }  
  68.       
  69.     /** 
  70.      * 缩略图片 
  71.      * @param oldpath 原图片 
  72.      * @param newpath 新生成的图片存放地址 
  73.      * @param wdith   缩略后的宽 
  74.      * @param height  缩略后的高 
  75.      */   
  76.     public static void scaleImage(String oldpath, String newpath, int wdith, int height) {  
  77.         // 获取老的图片  
  78.         File oldimg = new File(oldpath);  
  79.   
  80.         try {  
  81.             BufferedImage bi = ImageIO.read(oldimg);  
  82.             Image Itemp = bi.getScaledInstance(wdith, height, BufferedImage.SCALE_SMOOTH);  
  83.             BufferedImage thumbnail = new BufferedImage(wdith, height, BufferedImage.TYPE_INT_RGB);  
  84.             thumbnail.getGraphics().drawImage(Itemp, 00null);  
  85.   
  86.             // 缩略后的图片路径  
  87.             File newimg = new File(newpath);  
  88.             FileOutputStream out = new FileOutputStream(newimg);  
  89.   
  90.             // 绘图  
  91.             JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);  
  92.             JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(thumbnail);  
  93.             param.setQuality(1.0f, false);  
  94.             encoder.encode(thumbnail);  
  95.             out.close();  
  96.             bi.flush();  
  97.             bi = null;  
  98.         } catch (IOException e) {  
  99.             log.error(e);  
  100.         }  
  101.   
  102.     }  
  103.       
  104.       
  105.       
  106.   
  107.     public static void main(String[] args) {  
  108.         scaleImage("D:/2.jpg""D:/3.jpg"5050);  
  109.     }  
  110. }








  1. import  java.awt.Color;   
  2. import  java.awt.Graphics;   
  3. import  java.awt.Graphics2D;   
  4. import  java.awt.Rectangle;   
  5. import  java.awt.RenderingHints;   
  6. import  java.awt.geom.AffineTransform;   
  7. import  java.awt.image.BufferedImage;   
  8. import  java.awt.image.ColorModel;   
  9. import  java.awt.image.WritableRaster;   
  10. import  java.io.File;   
  11. import  java.io.FileInputStream;   
  12. import  java.io.FileOutputStream;   
  13. import  java.io.IOException;   
  14. import  java.io.InputStream;   
  15. import  javax.imageio.ImageIO;   
  16. import  com.sun.image.codec.jpeg.JPEGCodec;   
  17. import  com.sun.image.codec.jpeg.JPEGImageEncoder;   
  18.   
  19. /**  
  20.  * 图片工具类,完成图片的截取  
  21.  *   
  22.  * @author inc062977  
  23.  *   
  24.  */   
  25. public   class  ImageHepler {   
  26.      /**  
  27.      * 实现图像的等比缩放  
  28.      * @param source  
  29.      * @param targetW  
  30.      * @param targetH  
  31.      * @return  
  32.      */   
  33.      private   static  BufferedImage resize(BufferedImage source,  int  targetW,   
  34.              int  targetH) {   
  35.          // targetW,targetH分别表示目标长和宽    
  36.          int  type = source.getType();   
  37.         BufferedImage target =  null ;   
  38.          double  sx = ( double ) targetW / source.getWidth();   
  39.          double  sy = ( double ) targetH / source.getHeight();   
  40.          // 这里想实现在targetW,targetH范围内实现等比缩放。如果不需要等比缩放    
  41.          // 则将下面的if else语句注释即可    
  42.          if  (sx < sy) {   
  43.             sx = sy;   
  44.             targetW = ( int ) (sx * source.getWidth());   
  45.         }  else  {   
  46.             sy = sx;   
  47.             targetH = ( int ) (sy * source.getHeight());   
  48.         }   
  49.          if  (type == BufferedImage.TYPE_CUSTOM) {  // handmade    
  50.             ColorModel cm = source.getColorModel();   
  51.             WritableRaster raster = cm.createCompatibleWritableRaster(targetW,   
  52.                     targetH);   
  53.              boolean  alphaPremultiplied = cm.isAlphaPremultiplied();   
  54.             target =  new  BufferedImage(cm, raster, alphaPremultiplied,  null );   
  55.         }  else   
  56.             target =  new  BufferedImage(targetW, targetH, type);   
  57.         Graphics2D g = target.createGraphics();   
  58.          // smoother than exlax:    
  59.         g.setRenderingHint(RenderingHints.KEY_INTERPOLATION,   
  60.                 RenderingHints.VALUE_INTERPOLATION_BICUBIC);   
  61.         g.drawRenderedImage(source, AffineTransform.getScaleInstance(sx, sy));   
  62.         g.dispose();   
  63.          return  target;   
  64.     }   
  65.   
  66.      /**  
  67.      * 实现图像的等比缩放和缩放后的截取  
  68.      * @param inFilePath 要截取文件的路径  
  69.      * @param outFilePath 截取后输出的路径  
  70.      * @param width 要截取宽度  
  71.      * @param hight 要截取的高度  
  72.      * @param proportion  
  73.      * @throws Exception  
  74.      */   
  75.        
  76.      public   static   void  saveImageAsJpg(String inFilePath, String outFilePath,   
  77.              int  width,  int  hight,  boolean  proportion) throws  Exception {   
  78.          File file =  new  File(inFilePath);   
  79.          InputStream in =  new  FileInputStream(file);   
  80.          File saveFile =  new  File(outFilePath);   
  81.   
  82.         BufferedImage srcImage = ImageIO.read(in);   
  83.          if  (width >  0  || hight >  0 ) {   
  84.              // 原图的大小    
  85.              int  sw = srcImage.getWidth();   
  86.              int  sh = srcImage.getHeight();   
  87.              // 如果原图像的大小小于要缩放的图像大小,直接将要缩放的图像复制过去    
  88.              if  (sw > width && sh > hight) {   
  89.                 srcImage = resize(srcImage, width, hight);   
  90.             }  else  {   
  91.                 String fileName = saveFile.getName();   
  92.                 String formatName = fileName.substring(fileName   
  93.                         .lastIndexOf( '.' ) +  1 );   
  94.                 ImageIO.write(srcImage, formatName, saveFile);   
  95.                  return ;   
  96.             }   
  97.         }   
  98.          // 缩放后的图像的宽和高    
  99.          int  w = srcImage.getWidth();   
  100.          int  h = srcImage.getHeight();   
  101.          // 如果缩放后的图像和要求的图像宽度一样,就对缩放的图像的高度进行截取    
  102.          if  (w == width) {   
  103.              // 计算X轴坐标    
  104.              int  x =  0 ;   
  105.              int  y = h /  2  - hight /  2 ;   
  106.             saveSubImage(srcImage,  new  Rectangle(x, y, width, hight), saveFile);   
  107.         }   
  108.          // 否则如果是缩放后的图像的高度和要求的图像高度一样,就对缩放后的图像的宽度进行截取    
  109.          else   if  (h == hight) {   
  110.              // 计算X轴坐标    
  111.              int  x = w /  2  - width /  2 ;   
  112.              int  y =  0 ;   
  113.             saveSubImage(srcImage,  new  Rectangle(x, y, width, hight), saveFile);   
  114.         }   
  115.         in.close();   
  116.     }   
  117.      /**  
  118.      * 实现缩放后的截图  
  119.      * @param image 缩放后的图像  
  120.      * @param subImageBounds 要截取的子图的范围  
  121.      * @param subImageFile 要保存的文件  
  122.      * @throws IOException  
  123.      */   
  124.      private   static   void  saveSubImage(BufferedImage image,   
  125.             Rectangle subImageBounds, File subImageFile)  throws  IOException {   
  126.          if  (subImageBounds.x <  0  || subImageBounds.y <  0   
  127.                 || subImageBounds.width - subImageBounds.x > image.getWidth()   
  128.                 || subImageBounds.height - subImageBounds.y > image.getHeight()) {   
  129.             System.out.println( "Bad   subimage   bounds" );   
  130.              return ;   
  131.         }   
  132.         BufferedImage subImage = image.getSubimage(subImageBounds.x,subImageBounds.y, subImageBounds.width, subImageBounds.height);   
  133.         String fileName = subImageFile.getName();   
  134.         String formatName = fileName.substring(fileName.lastIndexOf( '.' ) +  1 );   
  135.         ImageIO.write(subImage, formatName, subImageFile);   
  136.     }   
  137.   
  138.   
  139. }





  1. import  java.awt.AlphaComposite;  
  2. import  java.awt.Color;  
  3. import  java.awt.Font;  
  4. import  java.awt.Graphics2D;  
  5. import  java.awt.Image;  
  6. import  java.awt.geom.AffineTransform;  
  7. import  java.awt.image.AffineTransformOp;  
  8. import  java.awt.image.BufferedImage;  
  9. import  java.io.File;  
  10. import  java.io.IOException;  
  11.   
  12. import  javax.imageio.ImageIO;  
  13.   
  14. /** 
  15.  * @author Eric Xu 
  16.  * 
  17.  */   
  18. public   final   class  ImageUtils {  
  19.     /** 
  20.      * 图片水印 
  21.      * @param pressImg 水印图片 
  22.      * @param targetImg 目标图片 
  23.      * @param x 修正值 默认在中间 
  24.      * @param y 修正值 默认在中间 
  25.      * @param alpha 透明度 
  26.      */   
  27.     public final static void pressImage(String pressImg, String targetImg, int x, int y, float alpha) {  
  28.         try {  
  29.             File img = new File(targetImg);  
  30.             Image src = ImageIO.read(img);  
  31.             int wideth = src.getWidth(null);  
  32.             int height = src.getHeight(null);  
  33.             BufferedImage image = new BufferedImage(wideth, height, BufferedImage.TYPE_INT_RGB);  
  34.             Graphics2D g = image.createGraphics();  
  35.             g.drawImage(src, 00, wideth, height, null);  
  36.             //水印文件  
  37.             Image src_biao = ImageIO.read(new File(pressImg));  
  38.             int wideth_biao = src_biao.getWidth(null);  
  39.             int height_biao = src_biao.getHeight(null);  
  40.             g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_ATOP, alpha));  
  41.             g.drawImage(src_biao, (wideth - wideth_biao) / 2, (height - height_biao) / 2, wideth_biao, height_biao, null);  
  42.             //水印文件结束  
  43.             g.dispose();  
  44.             ImageIO.write((BufferedImage) image, "jpg", img);  
  45.         } catch (Exception e) {  
  46.             e.printStackTrace();  
  47.         }  
  48.     }  
  49.   
  50.     /** 
  51.      * 文字水印 
  52.      * @param pressText 水印文字 
  53.      * @param targetImg 目标图片 
  54.      * @param fontName 字体名称 
  55.      * @param fontStyle 字体样式 
  56.      * @param color 字体颜色 
  57.      * @param fontSize 字体大小 
  58.      * @param x 修正值 
  59.      * @param y 修正值 
  60.      * @param alpha 透明度 
  61.      */   
  62.     public static void pressText(String pressText, String targetImg, String fontName, int fontStyle, Color color, int fontSize, int x, int y, float alpha) {  
  63.         try {  
  64.             File img = new File(targetImg);  
  65.             Image src = ImageIO.read(img);  
  66.             int width = src.getWidth(null);  
  67.             int height = src.getHeight(null);  
  68.             BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);  
  69.             Graphics2D g = image.createGraphics();  
  70.             g.drawImage(src, 00, width, height, null);  
  71.             g.setColor(color);  
  72.             g.setFont(new Font(fontName, fontStyle, fontSize));  
  73.             g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_ATOP, alpha));  
  74.             g.drawString(pressText, (width - (getLength(pressText) * fontSize)) / 2 + x, (height - fontSize) / 2 + y);  
  75.             g.dispose();  
  76.             ImageIO.write((BufferedImage) image, "jpg", img);  
  77.         } catch (Exception e) {  
  78.             e.printStackTrace();  
  79.         }  
  80.     }  
  81.   
  82.     /** 
  83.      * 缩放 
  84.      * @param filePath 图片路径 
  85.      * @param height 高度 
  86.      * @param width 宽度 
  87.      * @param bb 比例不对时是否需要补白 
  88.      */   
  89.     public static void resize(String filePath, int height, int width, boolean bb) {  
  90.         try {  
  91.             double ratio = 0.0//缩放比例   
  92.             File f = new File(filePath);  
  93.             BufferedImage bi = ImageIO.read(f);  
  94.             Image itemp = bi.getScaledInstance(width, height, bi.SCALE_SMOOTH);  
  95.             //计算比例  
  96.             if ((bi.getHeight() > height) || (bi.getWidth() > width)) {  
  97.                 if (bi.getHeight() > bi.getWidth()) {  
  98.                     ratio = (new Integer(height)).doubleValue() / bi.getHeight();  
  99.                 } else {  
  100.                     ratio = (new Integer(width)).doubleValue() / bi.getWidth();  
  101.                 }  
  102.                 AffineTransformOp op = new AffineTransformOp(AffineTransform.getScaleInstance(ratio, ratio), null);  
  103.                 itemp = op.filter(bi, null);  
  104.             }  
  105.             if (bb) {  
  106.                 BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);  
  107.                 Graphics2D g = image.createGraphics();  
  108.                 g.setColor(Color.white);  
  109.                 g.fillRect(00, width, height);  
  110.                 if (width == itemp.getWidth(null))  
  111.                     g.drawImage(itemp, 0, (height - itemp.getHeight(null)) / 2, itemp.getWidth(null), itemp.getHeight(null), Color.white, null);  
  112.                 else  
  113.                     g.drawImage(itemp, (width - itemp.getWidth(null)) / 20, itemp.getWidth(null), itemp.getHeight(null), Color.white, null);  
  114.                 g.dispose();  
  115.                 itemp = image;  
  116.             }  
  117.             ImageIO.write((BufferedImage) itemp, "jpg", f);  
  118.         } catch (IOException e) {  
  119.             e.printStackTrace();  
  120.         }  
  121.     }  
  122.   
  123.     public static void main(String[] args) throws IOException {  
  124.         pressImage("G:\\imgtest\\sy.jpg""G:\\imgtest\\test1.jpg"000.5f);  
  125.         pressText("我是文字水印""G:\\imgtest\\test1.jpg""黑体"36, Color.white, 80000.3f);  
  126.         resize("G:\\imgtest\\test1.jpg"500500true);  
  127.     }  
  128.   
  129.     public static int getLength(String text) {  
  130.         int length = 0;  
  131.         for (int i = 0; i < text.length(); i++) {  
  132.             if (new String(text.charAt(i) + "").getBytes().length > 1) {  
  133.                 length += 2;  
  134.             } else {  
  135.                 length += 1;  
  136.             }  
  137.         }  
  138.         return length / 2;  
  139.     }  





  1. import  java.awt.Color;   
  2. import  java.awt.Graphics;   
  3. import  java.awt.Graphics2D;   
  4. import  java.awt.Rectangle;   
  5. import  java.awt.RenderingHints;   
  6. import  java.awt.geom.AffineTransform;   
  7. import  java.awt.image.BufferedImage;   
  8. import  java.awt.image.ColorModel;   
  9. import  java.awt.image.WritableRaster;   
  10. import  java.io.File;   
  11. import  java.io.FileInputStream;   
  12. import  java.io.FileOutputStream;   
  13. import  java.io.IOException;   
  14. import  java.io.InputStream;   
  15. import  javax.imageio.ImageIO;   
  16. import  com.sun.image.codec.jpeg.JPEGCodec;   
  17. import  com.sun.image.codec.jpeg.JPEGImageEncoder;   
  18.   
  19. /**  
  20.  * 图片工具类,完成图片的截取  
  21.  *   
  22.  * @author inc062977  
  23.  *   
  24.  */   
  25. public   class  ImageHepler {   
  26.      /**  
  27.      * 实现图像的等比缩放  
  28.      * @param source  
  29.      * @param targetW  
  30.      * @param targetH  
  31.      * @return  
  32.      */   
  33.      private   static  BufferedImage resize(BufferedImage source,  int  targetW,   
  34.              int  targetH) {   
  35.          // targetW,targetH分别表示目标长和宽    
  36.          int  type = source.getType();   
  37.         BufferedImage target =  null ;   
  38.          double  sx = ( double ) targetW / source.getWidth();   
  39.          double  sy = ( double ) targetH / source.getHeight();   
  40.          // 这里想实现在targetW,targetH范围内实现等比缩放。如果不需要等比缩放    
  41.          // 则将下面的if else语句注释即可    
  42.          if  (sx < sy) {   
  43.             sx = sy;   
  44.             targetW = ( int ) (sx * source.getWidth());   
  45.         }  else  {   
  46.             sy = sx;   
  47.             targetH = ( int ) (sy * source.getHeight());   
  48.         }   
  49.          if  (type == BufferedImage.TYPE_CUSTOM) {  // handmade    
  50.             ColorModel cm = source.getColorModel();   
  51.             WritableRaster raster = cm.createCompatibleWritableRaster(targetW,   
  52.                     targetH);   
  53.              boolean  alphaPremultiplied = cm.isAlphaPremultiplied();   
  54.             target =  new  BufferedImage(cm, raster, alphaPremultiplied,  null );   
  55.         }  else   
  56.             target =  new  BufferedImage(targetW, targetH, type);   
  57.         Graphics2D g = target.createGraphics();   
  58.          // smoother than exlax:    
  59.         g.setRenderingHint(RenderingHints.KEY_INTERPOLATION,   
  60.                 RenderingHints.VALUE_INTERPOLATION_BICUBIC);   
  61.         g.drawRenderedImage(source, AffineTransform.getScaleInstance(sx, sy));   
  62.         g.dispose();   
  63.          return  target;   
  64.     }   
  65.   
  66.      /**  
  67.      * 实现图像的等比缩放和缩放后的截取  
  68.      * @param inFilePath 要截取文件的路径  
  69.      * @param outFilePath 截取后输出的路径  
  70.      * @param width 要截取宽度  
  71.      * @param hight 要截取的高度  
  72.      * @param proportion  
  73.      * @throws Exception  
  74.      */   
  75.        
  76.      public   static   void  saveImageAsJpg(String inFilePath, String outFilePath,   
  77.              int  width,  int  hight,  boolean  proportion) throws  Exception {   
  78.          File file =  new  File(inFilePath);   
  79.          InputStream in =  new  FileInputStream(file);   
  80.          File saveFile =  new  File(outFilePath);   
  81.   
  82.         BufferedImage srcImage = ImageIO.read(in);   
  83.          if  (width >  0  || hight >  0 ) {   
  84.              // 原图的大小    
  85.              int  sw = srcImage.getWidth();   
  86.              int  sh = srcImage.getHeight();   
  87.              // 如果原图像的大小小于要缩放的图像大小,直接将要缩放的图像复制过去    
  88.              if  (sw > width && sh > hight) {   
  89.                 srcImage = resize(srcImage, width, hight);   
  90.             }  else  {   
  91.                 String fileName = saveFile.getName();   
  92.                 String formatName = fileName.substring(fileName   
  93.                         .lastIndexOf( '.' ) +  1 );   
  94.                 ImageIO.write(srcImage, formatName, saveFile);   
  95.                  return ;   
  96.             }   
  97.         }   
  98.          // 缩放后的图像的宽和高    
  99.          int  w = srcImage.getWidth();   
  100.          int  h = srcImage.getHeight();   
  101.          // 如果缩放后的图像和要求的图像宽度一样,就对缩放的图像的高度进行截取    
  102.          if  (w == width) {   
  103.              // 计算X轴坐标    
  104.              int  x =  0 ;   
  105.              int  y = h /  2  - hight /  2 ;   
  106.             saveSubImage(srcImage,  new  Rectangle(x, y, width, hight), saveFile);   
  107.         }   
  108.          // 否则如果是缩放后的图像的高度和要求的图像高度一样,就对缩放后的图像的宽度进行截取    
  109.          else   if  (h == hight) {   
  110.              // 计算X轴坐标    
  111.              int  x = w /  2  - width /  2 ;   
  112.              int  y =  0 ;   
  113.             saveSubImage(srcImage,  new  Rectangle(x, y, width, hight), saveFile);   
  114.         }   
  115.         in.close();   
  116.     }   
  117.      /**  
  118.      * 实现缩放后的截图  
  119.      * @param image 缩放后的图像  
  120.      * @param subImageBounds 要截取的子图的范围  
  121.      * @param subImageFile 要保存的文件  
  122.      * @throws IOException  
  123.      */   
  124.      private   static   void  saveSubImage(BufferedImage image,   
  125.             Rectangle subImageBounds, File subImageFile)  throws  IOException {   
  126.          if  (subImageBounds.x <  0  || subImageBounds.y <  0   
  127.                 || subImageBounds.width - subImageBounds.x > image.getWidth()   
  128.                 || subImageBounds.height - subImageBounds.y > image.getHeight()) {   
  129.             System.out.println( "Bad   subimage   bounds" );   
  130.              return ;   
  131.         }   
  132.         BufferedImage subImage = image.getSubimage(subImageBounds.x,subImageBounds.y, subImageBounds.width, subImageBounds.height);   
  133.         String fileName = subImageFile.getName();   
  134.         String formatName = fileName.substring(fileName.lastIndexOf( '.' ) +  1 );   
  135.         ImageIO.write(subImage, formatName, subImageFile);   
  136.     }   
  137.   
  138.   
  139. }  



posted on 2010-11-20 12:26 礼物 阅读(1162) 评论(0)  编辑  收藏 所属分类: java