author | Jaroslav Tulach <jaroslav.tulach@apidesign.org> |
Thu, 07 Feb 2013 13:07:22 +0100 | |
branch | emul |
changeset 695 | dbcd1a21f3f8 |
permissions | -rw-r--r-- |
jaroslav@672 | 1 |
/** |
jaroslav@672 | 2 |
* Back 2 Browser Bytecode Translator |
jaroslav@672 | 3 |
* Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org> |
jaroslav@672 | 4 |
* |
jaroslav@672 | 5 |
* This program is free software: you can redistribute it and/or modify |
jaroslav@672 | 6 |
* it under the terms of the GNU General Public License as published by |
jaroslav@672 | 7 |
* the Free Software Foundation, version 2 of the License. |
jaroslav@672 | 8 |
* |
jaroslav@672 | 9 |
* This program is distributed in the hope that it will be useful, |
jaroslav@672 | 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
jaroslav@672 | 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
jaroslav@672 | 12 |
* GNU General Public License for more details. |
jaroslav@672 | 13 |
* |
jaroslav@672 | 14 |
* You should have received a copy of the GNU General Public License |
jaroslav@672 | 15 |
* along with this program. Look for COPYING file in the top folder. |
jaroslav@672 | 16 |
* If not, see http://opensource.org/licenses/GPL-2.0. |
jaroslav@672 | 17 |
*/ |
jaroslav@672 | 18 |
package org.apidesign.vm4brwsr; |
jaroslav@672 | 19 |
|
jaroslav@672 | 20 |
import java.io.IOException; |
jaroslav@672 | 21 |
import java.io.InputStream; |
jaroslav@672 | 22 |
import org.apidesign.bck2brwsr.emul.lang.ManifestInputStream; |
jaroslav@672 | 23 |
|
jaroslav@672 | 24 |
/** |
jaroslav@672 | 25 |
* |
jaroslav@672 | 26 |
* @author Jaroslav Tulach <jtulach@netbeans.org> |
jaroslav@672 | 27 |
*/ |
jaroslav@672 | 28 |
final class ParseCPAttr extends ManifestInputStream { |
jaroslav@672 | 29 |
private String cp; |
jaroslav@672 | 30 |
|
jaroslav@672 | 31 |
public ParseCPAttr(InputStream is) throws IOException { |
jaroslav@672 | 32 |
super(is); |
jaroslav@672 | 33 |
readAttributes(new byte[512]); |
jaroslav@672 | 34 |
} |
jaroslav@672 | 35 |
|
jaroslav@672 | 36 |
@Override |
jaroslav@672 | 37 |
protected String putValue(String key, String value) { |
jaroslav@672 | 38 |
if ("Class-Path".equals(key)) { |
jaroslav@672 | 39 |
cp = value; |
jaroslav@672 | 40 |
} |
jaroslav@672 | 41 |
return null; |
jaroslav@672 | 42 |
} |
jaroslav@672 | 43 |
|
jaroslav@672 | 44 |
@Override |
jaroslav@672 | 45 |
public String toString() { |
jaroslav@672 | 46 |
return cp; |
jaroslav@672 | 47 |
} |
jaroslav@672 | 48 |
|
jaroslav@672 | 49 |
} |