com.adobe.fontengine.font.mac.versResourceHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aem-sdk-api Show documentation
Show all versions of aem-sdk-api Show documentation
The Adobe Experience Manager SDK
package com.adobe.fontengine.font.mac;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
import com.adobe.internal.mac.resource.BasicResourceHandler;
import com.adobe.internal.mac.resource.ResourceParser.ResourceEntry;
public class versResourceHandler extends BasicResourceHandler
{
private static final byte[] vers = {'v', 'e', 'r', 's'};
public versResourceHandler()
{
super(vers);
}
public void handleResource(ResourceEntry entry, long length, InputStream stream)
{
// System.out.println("@@@ Resource Handler Plugin for type " + new String(handlerType));
// System.out.println("\ttype = " + new String(type));
// System.out.println("\tattributes = " + attributes);
// System.out.println("\tname = " + name);
// System.out.println("\tlength = " + length);
// try {
// dumpInputStreamAsBytes(stream, System.out);
// } catch (IOException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// }
}
public static void dumpInputStreamAsBytes(InputStream stream, PrintStream ps)
throws IOException
{
int b;
int pos = 0;
while ((b = stream.read()) != -1)
{
if (pos != 0)
{
ps.print(", ");
}
ps.print(Integer.toHexString(b));
pos++;
if (pos == 16)
{
ps.println();
pos = 0;
}
}
ps.println();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy