本文整理汇总了Java中com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream类的典型用法代码示例。如果您正苦于以下问题:Java UnsyncByteArrayOutputStream类的具体用法?Java UnsyncByteArrayOutputStream怎么用?Java UnsyncByteArrayOutputStream使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UnsyncByteArrayOutputStream类属于com.liferay.portal.kernel.io.unsync包,在下文中一共展示了UnsyncByteArrayOutputStream类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: translateThrowable
import com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream; //导入依赖的package包/类
public static Throwable translateThrowable(Throwable throwable) {
if (_useReflectionToTranslateThrowable) {
try {
UnsyncByteArrayOutputStream unsyncByteArrayOutputStream = new UnsyncByteArrayOutputStream();
ObjectOutputStream objectOutputStream = new ObjectOutputStream(unsyncByteArrayOutputStream);
objectOutputStream.writeObject(throwable);
objectOutputStream.flush();
objectOutputStream.close();
UnsyncByteArrayInputStream unsyncByteArrayInputStream = new UnsyncByteArrayInputStream(unsyncByteArrayOutputStream.unsafeGetByteArray(),
0, unsyncByteArrayOutputStream.size());
Thread currentThread = Thread.currentThread();
ClassLoader contextClassLoader = currentThread.getContextClassLoader();
ObjectInputStream objectInputStream = new ClassLoaderObjectInputStream(unsyncByteArrayInputStream,
contextClassLoader);
throwable = (Throwable)objectInputStream.readObject();
objectInputStream.close();
return throwable;
}
catch (SecurityException se) {
if (_log.isInfoEnabled()) {
_log.info("Do not use reflection to translate throwable");
}
_useReflectionToTranslateThrowable = false;
}
catch (Throwable throwable2) {
_log.error(throwable2, throwable2);
return throwable2;
}
}
Class<?> clazz = throwable.getClass();
String className = clazz.getName();
if (className.equals(PortalException.class.getName())) {
return new PortalException();
}
if (className.equals(SystemException.class.getName())) {
return new SystemException();
}
return throwable;
}
开发者ID:baxtheman,项目名称:mqtt-liferay-plugins,代码行数:56,代码来源:ClpSerializer.java
示例2: translateThrowable
import com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream; //导入依赖的package包/类
public static Throwable translateThrowable(Throwable throwable) {
if (_useReflectionToTranslateThrowable) {
try {
UnsyncByteArrayOutputStream unsyncByteArrayOutputStream = new UnsyncByteArrayOutputStream();
ObjectOutputStream objectOutputStream = new ObjectOutputStream(unsyncByteArrayOutputStream);
objectOutputStream.writeObject(throwable);
objectOutputStream.flush();
objectOutputStream.close();
UnsyncByteArrayInputStream unsyncByteArrayInputStream = new UnsyncByteArrayInputStream(unsyncByteArrayOutputStream.unsafeGetByteArray(),
0, unsyncByteArrayOutputStream.size());
Thread currentThread = Thread.currentThread();
ClassLoader contextClassLoader = currentThread.getContextClassLoader();
ObjectInputStream objectInputStream = new ClassLoaderObjectInputStream(unsyncByteArrayInputStream,
contextClassLoader);
throwable = (Throwable)objectInputStream.readObject();
objectInputStream.close();
return throwable;
}
catch (SecurityException se) {
if (_log.isInfoEnabled()) {
_log.info("Do not use reflection to translate throwable");
}
_useReflectionToTranslateThrowable = false;
}
catch (Throwable throwable2) {
_log.error(throwable2, throwable2);
return throwable2;
}
}
Class<?> clazz = throwable.getClass();
String className = clazz.getName();
if (className.equals(PortalException.class.getName())) {
return new PortalException();
}
if (className.equals(SystemException.class.getName())) {
return new SystemException();
}
if (className.equals(
"org.oep.core.processmgt.NoSuchDossierProcessException")) {
return new org.oep.core.processmgt.NoSuchDossierProcessException();
}
if (className.equals(
"org.oep.core.processmgt.NoSuchDossierStepException")) {
return new org.oep.core.processmgt.NoSuchDossierStepException();
}
return throwable;
}
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:66,代码来源:ClpSerializer.java
示例3: translateThrowable
import com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream; //导入依赖的package包/类
public static Throwable translateThrowable(Throwable throwable) {
if (_useReflectionToTranslateThrowable) {
try {
UnsyncByteArrayOutputStream unsyncByteArrayOutputStream = new UnsyncByteArrayOutputStream();
ObjectOutputStream objectOutputStream = new ObjectOutputStream(unsyncByteArrayOutputStream);
objectOutputStream.writeObject(throwable);
objectOutputStream.flush();
objectOutputStream.close();
UnsyncByteArrayInputStream unsyncByteArrayInputStream = new UnsyncByteArrayInputStream(unsyncByteArrayOutputStream.unsafeGetByteArray(),
0, unsyncByteArrayOutputStream.size());
Thread currentThread = Thread.currentThread();
ClassLoader contextClassLoader = currentThread.getContextClassLoader();
ObjectInputStream objectInputStream = new ClassLoaderObjectInputStream(unsyncByteArrayInputStream,
contextClassLoader);
throwable = (Throwable)objectInputStream.readObject();
objectInputStream.close();
return throwable;
}
catch (SecurityException se) {
if (_log.isInfoEnabled()) {
_log.info("Do not use reflection to translate throwable");
}
_useReflectionToTranslateThrowable = false;
}
catch (Throwable throwable2) {
_log.error(throwable2, throwable2);
return throwable2;
}
}
Class<?> clazz = throwable.getClass();
String className = clazz.getName();
if (className.equals(PortalException.class.getName())) {
return new PortalException();
}
if (className.equals(SystemException.class.getName())) {
return new SystemException();
}
if (className.equals("org.oep.core.logging.NoSuchNewUserLogException")) {
return new org.oep.core.logging.NoSuchNewUserLogException();
}
if (className.equals("org.oep.core.logging.NoSuchUserActivityException")) {
return new org.oep.core.logging.NoSuchUserActivityException();
}
return throwable;
}
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:64,代码来源:ClpSerializer.java
示例4: translateThrowable
import com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream; //导入依赖的package包/类
public static Throwable translateThrowable(Throwable throwable) {
if (_useReflectionToTranslateThrowable) {
try {
UnsyncByteArrayOutputStream unsyncByteArrayOutputStream = new UnsyncByteArrayOutputStream();
ObjectOutputStream objectOutputStream = new ObjectOutputStream(unsyncByteArrayOutputStream);
objectOutputStream.writeObject(throwable);
objectOutputStream.flush();
objectOutputStream.close();
UnsyncByteArrayInputStream unsyncByteArrayInputStream = new UnsyncByteArrayInputStream(unsyncByteArrayOutputStream.unsafeGetByteArray(),
0, unsyncByteArrayOutputStream.size());
Thread currentThread = Thread.currentThread();
ClassLoader contextClassLoader = currentThread.getContextClassLoader();
ObjectInputStream objectInputStream = new ClassLoaderObjectInputStream(unsyncByteArrayInputStream,
contextClassLoader);
throwable = (Throwable)objectInputStream.readObject();
objectInputStream.close();
return throwable;
}
catch (SecurityException se) {
if (_log.isInfoEnabled()) {
_log.info("Do not use reflection to translate throwable");
}
_useReflectionToTranslateThrowable = false;
}
catch (Throwable throwable2) {
_log.error(throwable2, throwable2);
return throwable2;
}
}
Class<?> clazz = throwable.getClass();
String className = clazz.getName();
if (className.equals(PortalException.class.getName())) {
return new PortalException();
}
if (className.equals(SystemException.class.getName())) {
return new SystemException();
}
if (className.equals("org.oep.core.ssomgt.NoSuchApplicationException")) {
return new org.oep.core.ssomgt.NoSuchApplicationException();
}
if (className.equals("org.oep.core.ssomgt.NoSuchAppMessageException")) {
return new org.oep.core.ssomgt.NoSuchAppMessageException();
}
if (className.equals("org.oep.core.ssomgt.NoSuchAppRoleException")) {
return new org.oep.core.ssomgt.NoSuchAppRoleException();
}
if (className.equals(
"org.oep.core.ssomgt.NoSuchAppRole2EmployeeException")) {
return new org.oep.core.ssomgt.NoSuchAppRole2EmployeeException();
}
if (className.equals(
"org.oep.core.ssomgt.NoSuchAppRole2JobPosException")) {
return new org.oep.core.ssomgt.NoSuchAppRole2JobPosException();
}
if (className.equals("org.oep.core.ssomgt.NoSuchUserSyncException")) {
return new org.oep.core.ssomgt.NoSuchUserSyncException();
}
return throwable;
}
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:82,代码来源:ClpSerializer.java
示例5: translateThrowable
import com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream; //导入依赖的package包/类
public static Throwable translateThrowable(Throwable throwable) {
if (_useReflectionToTranslateThrowable) {
try {
UnsyncByteArrayOutputStream unsyncByteArrayOutputStream = new UnsyncByteArrayOutputStream();
ObjectOutputStream objectOutputStream = new ObjectOutputStream(unsyncByteArrayOutputStream);
objectOutputStream.writeObject(throwable);
objectOutputStream.flush();
objectOutputStream.close();
UnsyncByteArrayInputStream unsyncByteArrayInputStream = new UnsyncByteArrayInputStream(unsyncByteArrayOutputStream.unsafeGetByteArray(),
0, unsyncByteArrayOutputStream.size());
Thread currentThread = Thread.currentThread();
ClassLoader contextClassLoader = currentThread.getContextClassLoader();
ObjectInputStream objectInputStream = new ClassLoaderObjectInputStream(unsyncByteArrayInputStream,
contextClassLoader);
throwable = (Throwable) objectInputStream.readObject();
objectInputStream.close();
return throwable;
} catch (SecurityException se) {
if (_log.isInfoEnabled()) {
_log.info("Do not use reflection to translate throwable");
}
_useReflectionToTranslateThrowable = false;
} catch (Throwable throwable2) {
_log.error(throwable2, throwable2);
return throwable2;
}
}
Class<?> clazz = throwable.getClass();
String className = clazz.getName();
if (className.equals(PortalException.class.getName())) {
return new PortalException();
}
if (className.equals(SystemException.class.getName())) {
return new SystemException();
}
if (className.equals("com.govapps.persistence.NoSuchConcernException")) {
return new com.govapps.persistence.NoSuchConcernException();
}
return throwable;
}
开发者ID:fraunhoferfokus,项目名称:govapps,代码行数:58,代码来源:ClpSerializer.java
示例6: translateThrowable
import com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream; //导入依赖的package包/类
public static Throwable translateThrowable(Throwable throwable) {
if (_useReflectionToTranslateThrowable) {
try {
UnsyncByteArrayOutputStream unsyncByteArrayOutputStream = new UnsyncByteArrayOutputStream();
ObjectOutputStream objectOutputStream = new ObjectOutputStream(unsyncByteArrayOutputStream);
objectOutputStream.writeObject(throwable);
objectOutputStream.flush();
objectOutputStream.close();
UnsyncByteArrayInputStream unsyncByteArrayInputStream = new UnsyncByteArrayInputStream(unsyncByteArrayOutputStream.unsafeGetByteArray(),
0, unsyncByteArrayOutputStream.size());
Thread currentThread = Thread.currentThread();
ClassLoader contextClassLoader = currentThread.getContextClassLoader();
ObjectInputStream objectInputStream = new ClassLoaderObjectInputStream(unsyncByteArrayInputStream,
contextClassLoader);
throwable = (Throwable) objectInputStream.readObject();
objectInputStream.close();
return throwable;
} catch (SecurityException se) {
if (_log.isInfoEnabled()) {
_log.info("Do not use reflection to translate throwable");
}
_useReflectionToTranslateThrowable = false;
} catch (Throwable throwable2) {
_log.error(throwable2, throwable2);
return throwable2;
}
}
Class<?> clazz = throwable.getClass();
String className = clazz.getName();
if (className.equals(PortalException.class.getName())) {
return new PortalException();
}
if (className.equals(SystemException.class.getName())) {
return new SystemException();
}
if (className.equals(
"br.gov.camara.edemocracia.portlets.wikilegis.NoSuchArtigoException")) {
return new br.gov.camara.edemocracia.portlets.wikilegis.NoSuchArtigoException();
}
if (className.equals(
"br.gov.camara.edemocracia.portlets.wikilegis.NoSuchContribuicaoException")) {
return new br.gov.camara.edemocracia.portlets.wikilegis.NoSuchContribuicaoException();
}
if (className.equals(
"br.gov.camara.edemocracia.portlets.wikilegis.NoSuchEstruturaException")) {
return new br.gov.camara.edemocracia.portlets.wikilegis.NoSuchEstruturaException();
}
return throwable;
}
开发者ID:camaradosdeputadosoficial,项目名称:edemocracia,代码行数:69,代码来源:ClpSerializer.java
示例7: translateThrowable
import com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream; //导入依赖的package包/类
public static Throwable translateThrowable(Throwable throwable) {
if (_useReflectionToTranslateThrowable) {
try {
UnsyncByteArrayOutputStream unsyncByteArrayOutputStream = new UnsyncByteArrayOutputStream();
ObjectOutputStream objectOutputStream = new ObjectOutputStream(unsyncByteArrayOutputStream);
objectOutputStream.writeObject(throwable);
objectOutputStream.flush();
objectOutputStream.close();
UnsyncByteArrayInputStream unsyncByteArrayInputStream = new UnsyncByteArrayInputStream(unsyncByteArrayOutputStream.unsafeGetByteArray(),
0, unsyncByteArrayOutputStream.size());
Thread currentThread = Thread.currentThread();
ClassLoader contextClassLoader = currentThread.getContextClassLoader();
ObjectInputStream objectInputStream = new ClassLoaderObjectInputStream(unsyncByteArrayInputStream,
contextClassLoader);
throwable = (Throwable) objectInputStream.readObject();
objectInputStream.close();
return throwable;
} catch (SecurityException se) {
if (_log.isInfoEnabled()) {
_log.info("Do not use reflection to translate throwable");
}
_useReflectionToTranslateThrowable = false;
} catch (Throwable throwable2) {
_log.error(throwable2, throwable2);
return throwable2;
}
}
Class<?> clazz = throwable.getClass();
String className = clazz.getName();
if (className.equals(PortalException.class.getName())) {
return new PortalException();
}
if (className.equals(SystemException.class.getName())) {
return new SystemException();
}
return throwable;
}
开发者ID:camaradosdeputadosoficial,项目名称:edemocracia,代码行数:54,代码来源:ClpSerializer.java
示例8: translateThrowable
import com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream; //导入依赖的package包/类
public static Throwable translateThrowable(Throwable throwable) {
if (_useReflectionToTranslateThrowable) {
try {
UnsyncByteArrayOutputStream unsyncByteArrayOutputStream = new UnsyncByteArrayOutputStream();
ObjectOutputStream objectOutputStream = new ObjectOutputStream(unsyncByteArrayOutputStream);
objectOutputStream.writeObject(throwable);
objectOutputStream.flush();
objectOutputStream.close();
UnsyncByteArrayInputStream unsyncByteArrayInputStream = new UnsyncByteArrayInputStream(unsyncByteArrayOutputStream.unsafeGetByteArray(),
0, unsyncByteArrayOutputStream.size());
Thread currentThread = Thread.currentThread();
ClassLoader contextClassLoader = currentThread.getContextClassLoader();
ObjectInputStream objectInputStream = new ClassLoaderObjectInputStream(unsyncByteArrayInputStream,
contextClassLoader);
throwable = (Throwable) objectInputStream.readObject();
objectInputStream.close();
return throwable;
} catch (SecurityException se) {
if (_log.isInfoEnabled()) {
_log.info("Do not use reflection to translate throwable");
}
_useReflectionToTranslateThrowable = false;
} catch (Throwable throwable2) {
_log.error(throwable2, throwable2);
return throwable2;
}
}
Class<?> clazz = throwable.getClass();
String className = clazz.getName();
if (className.equals(PortalException.class.getName())) {
return new PortalException();
}
if (className.equals(SystemException.class.getName())) {
return new SystemException();
}
if (className.equals(
"br.gov.camara.edemocracia.portlets.chat.NoSuchChatRoomException")) {
return new br.gov.camara.edemocracia.portlets.chat.NoSuchChatRoomException();
}
if (className.equals(
"br.gov.camara.edemocracia.portlets.chat.NoSuchChatRoomMessageException")) {
return new br.gov.camara.edemocracia.portlets.chat.NoSuchChatRoomMessageException();
}
if (className.equals(
"br.gov.camara.edemocracia.portlets.chat.NoSuchChatRoomTwitterException")) {
return new br.gov.camara.edemocracia.portlets.chat.NoSuchChatRoomTwitterException();
}
if (className.equals(
"br.gov.camara.edemocracia.portlets.chat.NoSuchChatRoomUserException")) {
return new br.gov.camara.edemocracia.portlets.chat.NoSuchChatRoomUserException();
}
if (className.equals(
"br.gov.camara.edemocracia.portlets.chat.NoSuchChatRoomVideoException")) {
return new br.gov.camara.edemocracia.portlets.chat.NoSuchChatRoomVideoException();
}
return throwable;
}
开发者ID:camaradosdeputadosoficial,项目名称:edemocracia,代码行数:79,代码来源:ClpSerializer.java
示例9: translateThrowable
import com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream; //导入依赖的package包/类
public static Throwable translateThrowable(Throwable throwable) {
if (_useReflectionToTranslateThrowable) {
try {
UnsyncByteArrayOutputStream unsyncByteArrayOutputStream = new UnsyncByteArrayOutputStream();
ObjectOutputStream objectOutputStream = new ObjectOutputStream(unsyncByteArrayOutputStream);
objectOutputStream.writeObject(throwable);
objectOutputStream.flush();
objectOutputStream.close();
UnsyncByteArrayInputStream unsyncByteArrayInputStream = new UnsyncByteArrayInputStream(unsyncByteArrayOutputStream.unsafeGetByteArray(),
0, unsyncByteArrayOutputStream.size());
Thread currentThread = Thread.currentThread();
ClassLoader contextClassLoader = currentThread.getContextClassLoader();
ObjectInputStream objectInputStream = new ClassLoaderObjectInputStream(unsyncByteArrayInputStream,
contextClassLoader);
throwable = (Throwable) objectInputStream.readObject();
objectInputStream.close();
return throwable;
} catch (SecurityException se) {
if (_log.isInfoEnabled()) {
_log.info("Do not use reflection to translate throwable");
}
_useReflectionToTranslateThrowable = false;
} catch (Throwable throwable2) {
_log.error(throwable2, throwable2);
return throwable2;
}
}
Class<?> clazz = throwable.getClass();
String className = clazz.getName();
if (className.equals(PortalException.class.getName())) {
return new PortalException();
}
if (className.equals(SystemException.class.getName())) {
return new SystemException();
}
if (className.equals(
"br.gov.camara.edemocracia.portlets.guiadiscussao.NoSuchAcaoException")) {
return new br.gov.camara.edemocracia.portlets.guiadiscussao.NoSuchAcaoException();
}
if (className.equals(
"br.gov.camara.edemocracia.portlets.guiadiscussao.NoSuchConfiguracaoException")) {
return new br.gov.camara.edemocracia.portlets.guiadiscussao.NoSuchConfiguracaoException();
}
if (className.equals(
"br.gov.camara.edemocracia.portlets.guiadiscussao.NoSuchFaseException")) {
return new br.gov.camara.edemocracia.portlets.guiadiscussao.NoSuchFaseException();
}
return throwable;
}
开发者ID:camaradosdeputadosoficial,项目名称:edemocracia,代码行数:69,代码来源:ClpSerializer.java
示例10: translateThrowable
import com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream; //导入依赖的package包/类
public static Throwable translateThrowable(Throwable throwable) {
if (_useReflectionToTranslateThrowable) {
try {
UnsyncByteArrayOutputStream unsyncByteArrayOutputStream = new UnsyncByteArrayOutputStream();
ObjectOutputStream objectOutputStream = new ObjectOutputStream(unsyncByteArrayOutputStream);
objectOutputStream.writeObject(throwable);
objectOutputStream.flush();
objectOutputStream.close();
UnsyncByteArrayInputStream unsyncByteArrayInputStream = new UnsyncByteArrayInputStream(unsyncByteArrayOutputStream.unsafeGetByteArray(),
0, unsyncByteArrayOutputStream.size());
Thread currentThread = Thread.currentThread();
ClassLoader contextClassLoader = currentThread.getContextClassLoader();
ObjectInputStream objectInputStream = new ClassLoaderObjectInputStream(unsyncByteArrayInputStream,
contextClassLoader);
throwable = (Throwable) objectInputStream.readObject();
objectInputStream.close();
return throwable;
} catch (SecurityException se) {
if (_log.isInfoEnabled()) {
_log.info("Do not use reflection to translate throwable");
}
_useReflectionToTranslateThrowable = false;
} catch (Throwable throwable2) {
_log.error(throwable2, throwable2);
return throwable2;
}
}
Class<?> clazz = throwable.getClass();
String className = clazz.getName();
if (className.equals(PortalException.class.getName())) {
return new PortalException();
}
if (className.equals(SystemException.class.getName())) {
return new SystemException();
}
if (className.equals(
"br.gov.camara.edemocracia.portlets.priorizacao.NoSuchConfiguracaoException")) {
return new br.gov.camara.edemocracia.portlets.priorizacao.NoSuchConfiguracaoException();
}
if (className.equals(
"br.gov.camara.edemocracia.portlets.priorizacao.NoSuchEixoException")) {
return new br.gov.camara.edemocracia.portlets.priorizacao.NoSuchEixoException();
}
if (className.equals(
"br.gov.camara.edemocracia.portlets.priorizacao.NoSuchPropostaException")) {
return new br.gov.camara.edemocracia.portlets.priorizacao.NoSuchPropostaException();
}
if (className.equals(
"br.gov.camara.edemocracia.portlets.priorizacao.NoSuchVotoException")) {
return new br.gov.camara.edemocracia.portlets.priorizacao.NoSuchVotoException();
}
return throwable;
}
开发者ID:camaradosdeputadosoficial,项目名称:edemocracia,代码行数:74,代码来源:ClpSerializer.java
示例11: translateThrowable
import com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream; //导入依赖的package包/类
public static Throwable translateThrowable(Throwable throwable) {
if (_useReflectionToTranslateThrowable) {
try {
UnsyncByteArrayOutputStream unsyncByteArrayOutputStream = new UnsyncByteArrayOutputStream();
ObjectOutputStream objectOutputStream = new ObjectOutputStream(unsyncByteArrayOutputStream);
objectOutputStream.writeObject(throwable);
objectOutputStream.flush();
objectOutputStream.close();
UnsyncByteArrayInputStream unsyncByteArrayInputStream = new UnsyncByteArrayInputStream(unsyncByteArrayOutputStream.unsafeGetByteArray(),
0, unsyncByteArrayOutputStream.size());
Thread currentThread = Thread.currentThread();
ClassLoader contextClassLoader = currentThread.getContextClassLoader();
ObjectInputStream objectInputStream = new ClassLoaderObjectInputStream(unsyncByteArrayInputStream,
contextClassLoader);
throwable = (Throwable) objectInputStream.readObject();
objectInputStream.close();
return throwable;
} catch (SecurityException se) {
if (_log.isInfoEnabled()) {
_log.info("Do not use reflection to translate throwable");
}
_useReflectionToTranslateThrowable = false;
} catch (Throwable throwable2) {
_log.error(throwable2, throwable2);
return throwable2;
}
}
Class<?> clazz = throwable.getClass();
String className = clazz.getName();
if (className.equals(PortalException.class.getName())) {
return new PortalException();
}
if (className.equals(SystemException.class.getName())) {
return new SystemException();
}
if (className.equals(
"br.gov.camara.edemocracia.portlets.graficos.NoSuchContadorAcessoException")) {
return new br.gov.camara.edemocracia.portlets.graficos.NoSuchContadorAcessoException();
}
return throwable;
}
开发者ID:camaradosdeputadosoficial,项目名称:edemocracia,代码行数:59,代码来源:ClpSerializer.java
示例12: translateThrowable
import com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream; //导入依赖的package包/类
public static Throwable translateThrowable(Throwable throwable) {
if (_useReflectionToTranslateThrowable) {
try {
UnsyncByteArrayOutputStream unsyncByteArrayOutputStream = new UnsyncByteArrayOutputStream();
ObjectOutputStream objectOutputStream = new ObjectOutputStream(unsyncByteArrayOutputStream);
objectOutputStream.writeObject(throwable);
objectOutputStream.flush();
objectOutputStream.close();
UnsyncByteArrayInputStream unsyncByteArrayInputStream = new UnsyncByteArrayInputStream(unsyncByteArrayOutputStream.unsafeGetByteArray(),
0, unsyncByteArrayOutputStream.size());
Thread currentThread = Thread.currentThread();
ClassLoader contextClassLoader = currentThread.getContextClassLoader();
ObjectInputStream objectInputStream = new ClassLoaderObjectInputStream(unsyncByteArrayInputStream,
contextClassLoader);
throwable = (Throwable)objectInputStream.readObject();
objectInputStream.close();
return throwable;
}
catch (SecurityException se) {
if (_log.isInfoEnabled()) {
_log.info("Do not use reflection to translate throwable");
}
_useReflectionToTranslateThrowable = false;
}
catch (Throwable throwable2) {
_log.error(throwable2, throwable2);
return throwable2;
}
}
Class<?> clazz = throwable.getClass();
String className = clazz.getName();
if (className.equals(PortalException.class.getName())) {
return new PortalException();
}
if (className.equals(SystemException.class.getName())) {
return new SystemException();
}
if (className.equals(
"com.rivetlogic.microsite.NoSuchMicroSiteException")) {
return new com.rivetlogic.microsite.NoSuchMicroSiteException();
}
if (className.equals(
"com.rivetlogic.microsite.NoSuchSiteRequestException")) {
return new com.rivetlogic.microsite.NoSuchSiteRequestException();
}
return throwable;
}
开发者ID:rivetlogic,项目名称:liferay-microsite-manager,代码行数:66,代码来源:ClpSerializer.java
示例13: translateThrowable
import com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream; //导入依赖的package包/类
public static Throwable translateThrowable(Throwable throwable) {
if (_useReflectionToTranslateThrowable) {
try {
UnsyncByteArrayOutputStream unsyncByteArrayOutputStream = new UnsyncByteArrayOutputStream();
ObjectOutputStream objectOutputStream = new ObjectOutputStream(unsyncByteArrayOutputStream);
objectOutputStream.writeObject(throwable);
objectOutputStream.flush();
objectOutputStream.close();
UnsyncByteArrayInputStream unsyncByteArrayInputStream = new UnsyncByteArrayInputStream(unsyncByteArrayOutputStream.unsafeGetByteArray(),
0, unsyncByteArrayOutputStream.size());
Thread currentThread = Thread.currentThread();
ClassLoader contextClassLoader = currentThread.getContextClassLoader();
ObjectInputStream objectInputStream = new ClassLoaderObjectInputStream(unsyncByteArrayInputStream,
contextClassLoader);
throwable = (Throwable) objectInputStream.readObject();
objectInputStream.close();
return throwable;
} catch (SecurityException se) {
if (_log.isInfoEnabled()) {
_log.info("Do not use reflection to translate throwable");
}
_useReflectionToTranslateThrowable = false;
} catch (Throwable throwable2) {
_log.error(throwable2, throwable2);
return throwable2;
}
}
Class<?> clazz = throwable.getClass();
String className = clazz.getName();
if (className.equals(PortalException.class.getName())) {
return new PortalException();
}
if (className.equals(SystemException.class.getName())) {
return new SystemException();
}
if (className.equals(
"com.knowarth.portlets.themepersonalizer.NoSuchAvailablePersonalizedThemeException")) {
return new com.knowarth.portlets.themepersonalizer.NoSuchAvailablePersonalizedThemeException();
}
if (className.equals(
"com.knowarth.portlets.themepersonalizer.NoSuchUserPersonalizedThemeException")) {
return new com.knowarth.portlets.themepersonalizer.NoSuchUserPersonalizedThemeException();
}
return throwable;
}
开发者ID:knowarth-technologies,项目名称:theme-personalizer,代码行数:64,代码来源:ClpSerializer.java
示例14: translateThrowable
import com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream; //导入依赖的package包/类
public static Throwable translateThrowable(Throwable throwable) {
if (_useReflectionToTranslateThrowable) {
try {
UnsyncByteArrayOutputStream unsyncByteArrayOutputStream = new UnsyncByteArrayOutputStream();
ObjectOutputStream objectOutputStream = new ObjectOutputStream(unsyncByteArrayOutputStream);
objectOutputStream.writeObject(throwable);
objectOutputStream.flush();
objectOutputStream.close();
UnsyncByteArrayInputStream unsyncByteArrayInputStream = new UnsyncByteArrayInputStream(unsyncByteArrayOutputStream.unsafeGetByteArray(),
0, unsyncByteArrayOutputStream.size());
Thread currentThread = Thread.currentThread();
ClassLoader contextClassLoader = currentThread.getContextClassLoader();
ObjectInputStream objectInputStream = new ClassLoaderObjectInputStream(unsyncByteArrayInputStream,
contextClassLoader);
throwable = (Throwable)objectInputStream.readObject();
objectInputStream.close();
return throwable;
}
catch (SecurityException se) {
if (_log.isInfoEnabled()) {
_log.info("Do not use reflection to translate throwable");
}
_useReflectionToTranslateThrowable = false;
}
catch (Throwable throwable2) {
_log.error(throwable2, throwable2);
return throwable2;
}
}
Class<?> clazz = throwable.getClass();
String className = clazz.getName();
if (className.equals(PortalException.class.getName())) {
return new PortalException();
}
if (className.equals(SystemException.class.getName())) {
return new SystemException();
}
if (className.equals("de.ancud.shorturl.NoSuchShortUrlException")) {
return new de.ancud.shorturl.NoSuchShortUrlException();
}
return throwable;
}
开发者ID:moddavid,项目名称:Ancud_ShortURL-portlet,代码行数:60,代码来源:ClpSerializer.java
示例15: translateThrowable
import com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream; //导入依赖的package包/类
public static Throwable translateThrowable(Throwable throwable) {
if (_useReflectionToTranslateThrowable) {
try {
UnsyncByteArrayOutputStream unsyncByteArrayOutputStream = new UnsyncByteArrayOutputStream();
ObjectOutputStream objectOutputStream = new ObjectOutputStream(unsyncByteArrayOutputStream);
objectOutputStream.writeObject(throwable);
objectOutputStream.flush();
objectOutputStream.close();
UnsyncByteArrayInputStream unsyncByteArrayInputStream = new UnsyncByteArrayInputStream(unsyncByteArrayOutputStream.unsafeGetByteArray(),
0, unsyncByteArrayOutputStream.size());
Thread currentThread = Thread.currentThread();
ClassLoader contextClassLoader = currentThread.getContextClassLoader();
ObjectInputStream objectInputStream = new ClassLoaderObjectInputStream(unsyncByteArrayInputStream,
contextClassLoader);
throwable = (Throwable)objectInputStream.readObject();
objectInputStream.close();
return throwable;
}
catch (SecurityException se) {
if (_log.isInfoEnabled()) {
_log.info("Do not use reflection to translate throwable");
}
_useReflectionToTranslateThrowable = false;
}
catch (Throwable throwable2) {
_log.error(throwable2, throwable2);
return throwable2;
}
}
Class<?> clazz = throwable.getClass();
String className = clazz.getName();
if (className.equals(PortalException.class.getName())) {
return new PortalException();
}
if (className.equals(SystemException.class.getName())) {
return new SystemException();
}
if (className.equals(
"gr.open.marketplace.NoSuchAdminIPConfigurationException")) {
return new gr.open.marketplace.NoSuchAdminIPConfigurationException();
}
if (className.equals(
"gr.open.marketplace.NoSuchAdminIPValidationDataException")) {
return new gr.open.marketplace.NoSuchAdminIPValidationDataException();
}
return throwable;
}
开发者ID:technopolis,项目名称:role-access-lists,代码行数:66,代码来源:ClpSerializer.java
示例16: translateThrowable
import com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream; //导入依赖的package包/类
public static Throwable translateThrowable(Throwable throwable) {
if (_useReflectionToTranslateThrowable) {
try {
UnsyncByteArrayOutputStream unsyncByteArrayOutputStream = new UnsyncByteArrayOutputStream();
ObjectOutputStream objectOutputStream = new ObjectOutputStream(unsyncByteArrayOutputStream);
objectOutputStream.writeObject(throwable);
objectOutputStream.flush();
objectOutputStream.close();
UnsyncByteArrayInputStream unsyncByteArrayInputStream = new UnsyncByteArrayInputStream(unsyncByteArrayOutputStream.unsafeGetByteArray(),
0, unsyncByteArrayOutputStream.size());
Thread currentThread = Thread.currentThread();
ClassLoader contextClassLoader = currentThread.getContextClassLoader();
ObjectInputStream objectInputStream = new ClassLoaderObjectInputStream(unsyncByteArrayInputStream,
contextClassLoader);
throwable = (Throwable)objectInputStream.readObject();
objectInputStream.close();
return throwable;
}
catch (SecurityException se) {
if (_log.isInfoEnabled()) {
_log.info("Do not use reflection to translate throwable");
}
_useReflectionToTranslateThrowable = false;
}
catch (Throwable throwable2) {
_log.error(throwable2, throwable2);
return throwable2;
}
}
Class<?> clazz = throwable.getClass();
String className = clazz.getName();
if (className.equals(PortalException.class.getName())) {
return new PortalException();
}
if (className.equals(SystemException.class.getName())) {
return new SystemException();
}
if (className.equals(
"com.marcelmika.lims.persistence.generated.NoSuchConversationException")) {
return new com.marcelmika.lims.persistence.generated.NoSuchConversationException();
}
if (className.equals(
"com.marcelmika.lims.persistence.generated.NoSuchMessageException")) {
return new com.marcelmika.lims.persistence.generated.NoSuchMessageException();
}
if (className.equals(
"com.marcelmika.lims.persistence.generated.NoSuchPanelException")) {
return new com.marcelmika.lims.persistence.generated.NoSuchPanelException();
}
if (className.equals(
"com.marcelmika.lims.persistence.generated.NoSuchParticipantException")) {
return new com.marcelmika.lims.persistence.generated.NoSuchParticipantException();
}
if (className.equals(
"com.marcelmika.lims.persistence.generated.NoSuchSettingsException")) {
return new com.marcelmika.lims.persistence.generated.NoSuchSettingsException();
}
return throwable;
}
开发者ID:marcelmika,项目名称:lims,代码行数:81,代码来源:ClpSerializer.java
示例17: translateThrowable
import com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream; //导入依赖的package包/类
public static Throwable translateThrowable(Throwable throwable) {
if (_useReflectionToTranslateThrowable) {
try {
UnsyncByteArrayOutputStream unsyncByteArrayOutputStream = new UnsyncByteArrayOutputStream();
ObjectOutputStream objectOutputStream = new ObjectOutputStream(unsyncByteArrayOutputStream);
objectOutputStream.writeObject(throwable);
objectOutputStream.flush();
objectOutputStream.close();
UnsyncByteArrayInputStream unsyncByteArrayInputStream = new UnsyncByteArrayInputStream(unsyncByteArrayOutputStream.unsafeGetByteArray(),
0, unsyncByteArrayOutputStream.size());
Thread currentThread = Thread.currentThread();
ClassLoader contextClassLoader = currentThread.getContextClassLoader();
ObjectInputStream objectInputStream = new ClassLoaderObjectInputStream(unsyncByteArrayInputStream,
contextClassLoader);
throwable = (Throwable)objectInputStream.readObject();
objectInputStream.close();
return throwable;
}
catch (SecurityException se) {
if (_log.isInfoEnabled()) {
_log.info("Do not use reflection to translate throwable");
}
_useReflectionToTranslateThrowable = false;
}
catch (Throwable throwable2) {
_log.error(throwable2, throwable2);
return throwable2;
}
}
Class<?> clazz = throwable.getClass();
String className = clazz.getName();
if (className.equals(PortalException.class.getName())) {
return new PortalException();
}
if (className.equals(SystemException.class.getName())) {
return new SystemException();
}
if (className.equals(
"org.politaktiv.meinungsbild.infrastructure.NoSuchRatingException")) {
return new org.politaktiv.meinungsbild.infrastructure.NoSuchRatingException();
}
if (className.equals(
"org.politaktiv.meinungsbild.infrastructure.NoSuchSubtopicException")) {
return new org.politaktiv.meinungsbild.infrastructure.NoSuchSubtopicException();
}
if (className.equals(
"org.politaktiv.meinungsbild.infrastructure.NoSuchTopicException")) {
return new org.politaktiv.meinungsbild.infrastructure.NoSuchTopicException();
}
return throwable;
}
开发者ID:PolitAktiv,项目名称:politaktiv-aktuelles-meinungsbild-portlet,代码行数:71,代码来源:ClpSerializer.java
示例18: translateThrowable
import com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream; //导入依赖的package包/类
public static Throwable translateThrowable(Throwable throwable) {
if (_useReflectionToTranslateThrowabl
|
请发表评论